S>C 0x44 SID_WARCRAFTGENERAL

Transport Layer:Transmission Control Protocol (TCP)
Application Layer:Battle.net v1 TCP Messages (SID)
Message Id:0x44
Message Name:SID_WARCRAFTGENERAL
Direction:Server to Client
Options: In Research
Used By:Warcraft III Reign of Chaos, Warcraft III The Frozen Throne
Message Format:
(does not include protocol header)
(UINT8) Subcommand ID

Subcommand 0x00 WID_GAMESEARCH:
    (UINT32) Cookie
    (UINT32) Status
            0x00000000: Search Started
            0x00000004: Banned CD-Key

Subcommand 0x02 WID_MAPLIST:
    (UINT32) Cookie
     (UINT8) Number of responses
     For each response:
         (UINT32) ID
         (UINT32) Checksum
          (UINT16) Decompressed length
          (UINT16) Compressed length
          (VOID) Compressed data
     (UINT8) Remaining Packets

Subcommand 0x03 WID_CANCELSEARCH:
     (UINT32) Cookie from WID_GAMESEARCH

Subcommand 0x04 WID_USERRECORD:
     (UINT32) Cookie
     (UINT32) Icon ID
      (UINT8) Number of ladder records to read; this will be between 0 and 3.
      For each ladder record:
          (UINT32) Ladder type ID
           (UINT16) Number of wins
           (UINT16) Number of losses
           (UINT8) Level
           (UINT8) Unknown*
           (UINT16) Experience
          (UINT32) Rank (will be 0 if unranked)
      (UINT8) Number of race records to read; this will be 5 for WAR3 and 6 for W3XP.
      For each race record:
           (UINT16) Wins
           (UINT16) Losses
      (UINT8) Number of team records to read.
      For each team record:
          (UINT32) Team type ID
           (UINT16) Number of wins
           (UINT16) Number of losses
           (UINT8) Level
           (UINT8) Unknown*
           (UINT16) Experience
          (UINT32) Rank (will be 0 if unranked)
       (FILETIME) Time of last game played
           (UINT8) Number of partners
         (STRING)[] Names of partners

Subcommand 0x07 WID_TOURNAMENT:
     (UINT32) Cookie
      (UINT8) Status
             0x00: No Tournament
             0x01: Starting Soon
             0x02: Ending Soon
             0x03: Started
             0x04: Last Call
  (FILETIME) Last Status Update Time
      (UINT16) Unknown
      (UINT16) Unknown
      (UINT8) Wins
      (UINT8) Losses
      (UINT8) Draws
      (UINT8) Unknown
      (UINT8) Unknown
      (UINT8) Unknown
      (UINT8) Unknown

Subcommand 0x08 WID_CLANRECORD:
     (UINT32) Cookie
      (UINT8) Number of ladder records to read; this will be between 0 and 4.
      For each ladder record:
          (UINT32) Ladder type ID
          (UINT32) Number of wins
          (UINT32) Number of losses
           (UINT8) Level
           (UINT8) Unknown*
          (UINT32) Experience
          (UINT32) Rank (will be 0 if unranked)
      (UINT8) Number of race records to read; this will be 5 for WAR3 and 6 for W3XP.
      For each race record:
          (UINT32) Wins
          (UINT32) Losses

Subcommand 0x09 WID_ICONLIST:
     (UINT32) Cookie
     (UINT32) Selected Icon
      (UINT8) Tiers
      (UINT8) Count
      For each Icon:
          (UINT32) Icon ID
          (UINT32) Unit ID**
           (UINT8) Race
           (UINT16) Wins required
           (UINT8) Enabled

Remarks

This message is still being researched!

This message is used for multiple purposes on Warcraft III. Known and validated purposes are listed here.

The following UINT32 identifiers are similar to Product IDs and clan tags, 4-byte strings reversed by endian.

  • Icon IDs are the identifiers used in icons-WAR3.bni (an MPQ file) and found reversed in user statstrings (for example 'W3O1' is Orc Peon).
  • Ladder type ID (WID_USERRECORD): 'SOLO', 'TEAM', or 'FFA ' (where the last character is a space, 0x20).
  • Team type ID (WID_USERRECORD): '2VS2', '3VS3', or '4VS4'.
  • Ladder type ID (WID_CLANRECORD): 'CLNS' (solo), 'CNL2' (2v2), 'CLN3' (3v3), 'CLN4' (4v4).

* The field was formerly labeled as "Hours until XP decay", but as no evidence to support this claim has ever been verified (and through personal testing has been found to be altogether false), it has been renamed as unknown for the time being. More information on this value would be appreciated.

** This is the name of the unit for which this icon should be displayed for. The names can be found in the war3.mpq/Units/UnitData.slk.

| Edited: Leaky

Comments

RichardNixon

I'd like to submit a couple updates to this based on the PvPGN source.

(http://svn.berlios.de/svnroot/repos/pvpgn/trunk/pvpgn/src/bnetd/handle_anongame.cpp)

(http://svn.berlios.de/svnroot/repos/pvpgn/trunk/pvpgn/src/common/anongame_protocol.h)

Subcommand 0x09:

  • the second DWORD is the ID of the currently selected icon
  • the second DWORD of each icon is the W3 unit ID - these IDs are listed in war3.mpq\Units\UnitData.slk
  • last BYTE of each icon is 0 if disabled in user icon selection, 1 if enabled

There's also several other subcommands related to setting up PG and AT games. The packet structures can be found in the PvPGN source files that I listed above.

RichardNixon

They apply to both. This is how the official client interprets the 0x09 response fields, regardless of the server implementation (BNet or PvPGN). I've tested these out with my own server.

Caaaaarrrrlll

Updated. Thanks for your addition, RichardNixon.

xpeh

these IDs are listed in war3.mpq\Units\UnitData.slk

Or War3x.mpq respectively.

What should this mean?

0x00 (WID_GAMESEARCH):
        0x00000004: Banned CD-Key
xpeh

What compression algorithm is used here?

Edit: nevermind.

BNi-PoweR.

For WID_GAMESEARCH, a status of 0x00000006 means you have reached the maximum games (~200 or so is the limit) and you have to wait a period of time before playing again.