Valhalla Legends Forums Archive | Battle.net Bot Development | MCP_CHARLIST2 (0x19): Properly finding ladder flag

AuthorMessageTime
Ramadash
Hi, I have a problem with the MCP_CHARLIST2 packet and can't seem to detect the ladder flag correctly for nonladder characters that were created on a previous ladder and that got moved to nonladder during a reset. It seem that those characters are still flagged as ladder (or perhaps d2smells is just wrong).

Ok so below is a packet log, there is 3 characters on that account.

Non-ladder character that was created on ladder and moved onto non ladder:
Name: ezlejart, Class: Barbarian, Level: 1, Flags: Noob, Expansion, Ladder, Realm, Title: DoublePlusNooblar, Act: 1, Expires: 9/29/2008 6:26:20 PM, ClientVersion: 132,

newly created non ladder character (no ladder flag here)
Name: efireuhgwikhewr, Class: Barbarian, Level: 1, Flags: Noob, Expansion, Realm, Title: DoublePlusNooblar, Act: 1, Expires: 7/4/2009 11:08:14 AM, ClientVersion: 132,

ladder character (same flags as character #1)
Name: fewkqjfhbglkjer, Class: Barbarian, Level: 1, Flags: Noob, Expansion, Ladder, Realm, Title: DoublePlusNooblar, Act: 1, Expires: 7/4/2009 11:08:22 AM, ClientVersion: 132

Is there something funky going around here that would mean that d2 client detect ladder status in another way? or maby d2smell just screw up and does not display the right info?
raw packet:
19 08 00 03 00 00 00 03 00 0c 56 e1 48 65 7a 6c 65 6a 61 72 74 00 84 80 ff ff ff ff ff ff ff ff ff ff ff 05 ff ff ff ff ff ff ff ff ff ff ff 01 e1 80 80 80 ff ff ff 00 5e 70 4f 4a 65 66 69 72 65 75 68 67 77 69 6b 68 65 77 72 00 84 80 ff ff ff ff ff ff ff ff ff ff ff 05 ff ff ff ff ff ff ff ff ff ff ff 01 a1 80 80 80 ff ff ff 00 66 70 4f 4a 66 65 77 6b 71 6a 66 68 62 67 6c 6b 6a 65 72 00 84 80 ff ff ff ff ff ff ff ff ff ff ff 05 ff ff ff ff ff ff ff ff ff ff ff 01 e1 80 80 80 05 ff ff 00


June 23, 2009, 3:26 PM
Ribose
From what I've seen, the ladder byte (which is stored in the 31st byte of the statstring data, when character name, realm name, and the commas are removed, or in the MCP character data string) is a number < 255, which is the ladder season number, or 255 (0xFF), meaning started non-ladder.

Here, I'll look at your packet:
[quote]
?? ?? - you lost the packet length WORD when you pasted this...
19 - packet id, MCP_CHARLIST2
08 00 - requested, 8
03 00 - on this account, 3
00 00 - 0
03 00 - returned, 3
0c 56 e1 48 - expire
65 7a 6c 65 6a 61 72 74 00 - character name, "ezlejart"
84 80 ff ff ff ff ff ff ff ff ff ff ff 05 ff ff ff ff ff ff ff ff ff ff ff 01 [color=red]e1[/color] 80 80 80 [color=yellow]ff[/color] ff ff 00 - data string
5e 70 4f 4a - expire
65 66 69 72 65 75 68 67 77 69 6b 68 65 77 72 00 - character name, "efireuhgwikhewr"
84 80 ff ff ff ff ff ff ff ff ff ff ff 05 ff ff ff ff ff ff ff ff ff ff ff 01 [color=red]a1[/color] 80 80 80 [color=yellow]ff[/color] ff ff 00 - data string
66 70 4f 4a - expire
66 65 77 6b 71 6a 66 68 62 67 6c 6b 6a 65 72 00 - character name, "fewkqjfhbglkjer"
84 80 ff ff ff ff ff ff ff ff ff ff ff 05 ff ff ff ff ff ff ff ff ff ff ff 01 [color=red]e1[/color] 80 80 80 [color=yellow]05[/color] ff ff 00 - data string
[/quote]
The ladder byte (#31, yellow) says that the first two are non-ladder and the third is ladder (season 5).
I looked more, and the flags byte (#27, red) has the ladder flag (0x40) OR'd on there for both characters that the program is reporting as ladder.
So I have to conclude, the flags byte (#27) contains all of the flags you provided on creating your character (ladder - 0x40, expansion - 0x20, hardcore - 0x04), and doesn't change when ladder is reset.
The ladder byte (#31), contains the ladder season number (currently 5) or 0xFF for non-ladder, and is set to 0xFF when ladder resets.

So, that program needs to be updated to check the ladder byte and not the flag byte for current ladder status, instead of returning what the character was originally created on.
June 23, 2009, 8:32 PM
Ramadash
Thanks alot! that explain's everything!
June 24, 2009, 11:54 PM

Search