Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Camel on September 19, 2003, 04:40 PM

Title: Country abbreviation
Post by: Camel on September 19, 2003, 04:40 PM
In battle.snp, Starcraft appears to get LOCALE_SABBREVCTRYNAME, and then chop it off after three bytes, load its value into eax, and put it back in the buffer. I would have assumed, having not looked at it, that the country abbreviation is intereperated by battle.net as a null terminated string. Should I be treating it as a dword instead, and if so does it actually have to end with a null byte?
Title: Re:Country abbreviation
Post by: iago on September 19, 2003, 07:54 PM
Yes, it's treated as a dword, at least on client side, and it's stored in a register at one point.  I'm not too sure how it's stored remotely, though, so it's probably safest to leave it null-terminated.
Title: Re:Country abbreviation
Post by: Camel on September 19, 2003, 08:00 PM
Is it safe to assume that LOCALE_SABBREVCTRYNAME will always yield 3 bytes + null? MSDN is spazzing out on me so I can't check.
Title: Re:Country abbreviation
Post by: iago on September 19, 2003, 08:43 PM
I think I remember seeing that Country[3] was set to NULL before being put into a register and sent..