Valhalla Legends Forums Archive | Battle.net Bot Development | Clarifying D2GS

AuthorMessageTime
OnlyMeat
From what i have found their appears to be multiple formats for S-->C D2GS packets and i would like to clarify this situation.

Take for example the first couple packets sent to you from the server when first connected:-

[code]
RECV | D2GS (0xae)
AE 01 00 00 00 00

RECV | D2GS (0x05)
05 7A 09 2E EF 00
[/code]

This has a format of:-
(BYTE) ID (This also appears to be the length of the packet in most cases)
(DATA)

Of course the packets are supposed to be compressed but again this appears to only apply to certain packets namely ones with larger sizes.

The main problem is inconsistencies while trying to perform generic processing of these packets.

Compressed packets for someone sending a chat message in game:-

(BYTE) Uncompressed length
(BYTE) 0x0f always this for some reason

Example:-
[code]
RECV | D2GS (Unknown ID)
1D 0F 1E BF CA 22 D8 CA 34 0D AA C6 81 90 F4 42 16 55 9E 9E 8C A3 5C B4 33 0D 2B 07 18
[/code]

The first byte here is the packet length but the packet seems to be compressed so the question would be how to extract the real packet length?
and is their an ID for these compressed packets if so which offset are they located at?

From the looks of sample decompression code on this forum it does something with the first 2 bytes to calculate the real length, can this be confirmed and is this standard huffman as my knowlege of it is limited.

And finally is the actual decompression standard huffman or maybe a variant?

Any ideas or thoughts would be appreciated.
July 18, 2004, 7:29 AM
K
Although I have never done any work with this, I believe you are correct that is compressed with huffman. There is some code posted around here somewhere that decompresses the packets, but I have also heard that it fails to handle several cases properly. I'll search and post back.

Edit:
Check here; also if you go to the search, choose advanced search, search for posts containing "huffman" (you may need to change the default date to something older), you should find more conversations on the topic.
July 18, 2004, 3:43 PM
PiaNKA
https://davnit.net/bnet/vL/phpbbs/index.php?board=31;action=display;threadid=4109;start=msg33961#msg33961
July 19, 2004, 2:29 PM
OnlyMeat
[quote author=PiaNKA link=board=17;threadid=7752;start=0#msg71298 date=1090247385]
https://davnit.net/bnet/vL/phpbbs/index.php?board=31;action=display;threadid=4109;start=msg33961#msg33961
[/quote]

Got it working now :), albeit a little messy.
July 19, 2004, 3:28 PM

Search