Sha256: 7bec9b0c12eb2cd14e4a28102821d9518dc3fa8c368f523aa8df554746f6e7c2

Contents?: true

Size: 732 Bytes

Versions: 3

Compression:

Stored size: 732 Bytes

Contents

module Wc3Protocol
  module Protocol
    BYTE_MAGIC = {
      'f7' => 'LAN',
      'ff' => 'BATTLE_NET'
    }
    BYTE_OP_CODE = {
      '2f' => :LAN_GAME_QUERY,
      '30' => :GAME_INFORMATION,
      '31' => :GAME_CREATED,
      '32' => :PLAYERS_CHANGED,
      '33' => :GAME_CANCELLED,
      '01' => :KEEP_ALIVE,
      '04' => :JOINED_PLAYER_INFORMATION,
      '06' => :PLAYER_INFO,
      '07' => :PLAYER_LEFT_GAME,
      '08' => :PLAYER_LOADED_GAME,
      '09' => :SLOTS_CHANGED,
      '0a' => :HOST_STARTED_GAME,
      '0b' => :START_LOADING_INFO,
      '0f' => :CHAT_RECEIVERS,
      # TODO: more bytes available
    }
    BYTE_GAME_TYPE = {
      'W3XP' => 'The Frozen Throne',
      'WAR3' => 'Realms of Chaos'
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wc3_protocol-0.0.3 lib/wc3_protocol/protocol.rb
wc3_protocol-0.0.2 lib/wc3_protocol/protocol.rb
wc3_protocol-0.0.1 lib/wc3_protocol/protocol.rb