Valhalla Legends Forums Archive | Battle.net Bot Development | Re:Country abbreviation

AuthorMessageTime
Camel
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?
September 19, 2003, 9:40 PM
iago
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.
September 20, 2003, 12:54 AM
Camel
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.
September 20, 2003, 1:00 AM
iago
I think I remember seeing that Country[3] was set to NULL before being put into a register and sent..
September 20, 2003, 1:43 AM

Search