FILE DESCRIPTION   (Part 2, where we meet volatile datas)
All the status datas are somewhat optional. Wheter one is present or not, depends of one bit of the status flags. Because of that, it's impossible to give explicit offsets where the datas can be find. For instance, when you go up a level, you have 5 statut points and 1 skill point to dispatch. But most of the time you have no statut points : the statut points data will not be equal to zero : the corresponding bit will be cleared, and the data will not be present at all ! Another easy example : if all your gold is in your stash, then the stash data will be present, but the gold data will be absent. Here is a last (but tricky) example : if the player is in hardcore mode AND is dead, then the current life data will be absent.
At the moment, only the first 2 flags are used. It's provide a total of 16 bits, and all of them corresponds to a data. That's the reason why I called the byte which follow the fisrt 2 flags, the reserved flag. It's always set to zero, like if Blizzard projected to use it as another flag. The flags are named after the datas that are most likely to be absent. The 1st flag (at the offset 232h) is the Stat / Skill flag. The corresponding datas are :
The bit 0 is the lowest bit and the bit 7 is the highest bit, of course.
It will be perfect if all the datas will be the same size. Well, it isn't. Some must be read with 4 bytes, some with 2 bytes, and it exists 2 tricky datas of 1 byte each. Let's check it. In general, all the datas are 4 bytes size. Like always, they are in the Intel's order. Starting with offset 235h, here is the datas that you can find, but ONLY if their flag's bit are set !
Now we can continue with the normal reading of datas, with an exeption : this datas are 2 bytes. Just after are another 2 bytes with sometimes zero, sometimes funny values. Again, I don't figure out what they means. It seems they appears when some current datas are greater than the max data. For instance when Life current is greater than Life max (due to magical items).
After that, all the datas are again 4 bytes size.
Back to Part 1 : Easy Hacking |