forked from spudgy/IntWars
-
Notifications
You must be signed in to change notification settings - Fork 64
Stats
Intline9 edited this page Jul 17, 2012
·
3 revisions
Every game object has stats, like hp, exp, current hp, etc. LoL has made a quite fancy system to compress as much info as possible with as much efficiently.
| Type | Offset | name | Description |
| GameHeader | 0 | header | Header |
| uint8 | 9 | updateNo | The amount of blocks to update |
| - | - | - | <Repeating block for updateNo> |
| uint8 | 10 | masterMask | The master update mask in binary. Like 11111 |
| uint32 | 11 | netId | The net id |
| - | - | - | <Repeating block for every bit in the masterMask> |
| uint32 | 15 | fieldMask | There are 16 fields to update per masterMask once again in binary defined |
| float | 19 | value | The value to set it to (value for each bit in fieldMask) |
The master mask has 5 maps to update, each of those maps contain an X amount of sub fields
| Value | Bit Mask | FM Table | Name | Description |
| 1 | 00001 | 1 | - | - |
| 2 | 00010 | 2 | - | - |
| 4 | 00100 | 3 | - | - |
| 8 | 01000 | 4 | - | - |
| 16 | 10000 | 5 | - | - |
Of course you can and each field with each other so you could update multiple master fields like 10110 would update 3 master blocks.
The field mask has probably a max field per master mask. But in theory there are 32 fields to update (as FFFFFFFF = 11111111111111111111111111111111) Of course you can and each field with each other so you could update multiple master fields like 10110 would update 3 fields.
| Value | Bit Mask | Name | Description |
| 1 | 0000000000000001 | gold | The current amount of gold |
| 2 | 0000000000000010 | - | - |
| 4 | 0000000000000100 | - | - |
| 8 | 0000000000001000 | - | - |
| 0x10 | 0000000000010000 | - | - |
| 0x20 | 0000000000100000 | - | - |
| 0x40 | 0000000001000000 | - | - |
| 0x80 | 0000000010000000 | - | - |
| 0x100 | 0000000100000000 | - | - |
| 0x200 | 0000001000000000 | - | - |
| 0x400 | 0000010000000000 | - | - |
| 0x800 | 0000100000000000 | - | - |
| 0x1000 | 0001000000000000 | - | - |
| 0x2000 | 0010000000000000 | - | - |
| 0x4000 | 0100000000000000 | - | - |
| 0x8000 | 1000000000000000 | - | - |
| Value | Bit Mask | Name | Description |
| 1 | 0000000000000001 | - | - |
| 2 | 0000000000000010 | - | - |
| 4 | 0000000000000100 | - | - |
| 8 | 0000000000001000 | - | - |
| 0x10 | 0000000000010000 | ad | once again strange |
| 0x20 | 0000000000100000 | ap | Base ability power |
| 0x40 | 0000000001000000 | - | - |
| 0x80 | 0000000010000000 | crit | The crit chance ranging from 0.0 to 1.0 (where 1.0=100%) |
| 0x100 | 0000000100000000 | armor | The armor in a flat number |
| 0x200 | 0000001000000000 | magicResist | The magic armor |
| 0x400 | 0000010000000000 | hp5 | Health regeneration, but its strangely encoded |
| 0x800 | 0000100000000000 | mp5 | Mana regeneration, but its strangely encoded |
| 0x1000 | 0001000000000000 | range | The attack range |
| 0x2000 | 0010000000000000 | ad | Bonus dammage |
| 0x4000 | 0100000000000000 | ad | Some kind of mask |
| 0x8000 | 1000000000000000 | bonusAp | Bonus ability Power |
| Value | Bit Mask | Name | Description |
| 1 | 0000000000000001 | - | - |
| 2 | 0000000000000010 | - | - |
| 4 | 0000000000000100 | - | - |
| 8 | 0000000000001000 | - | - |
| 0x10 | 0000000000010000 | - | - |
| 0x20 | 0000000000100000 | - | - |
| 0x40 | 0000000001000000 | - | - |
| 0x80 | 0000000010000000 | - | - |
| 0x100 | 0000000100000000 | - | - |
| 0x200 | 0000001000000000 | - | - |
| 0x400 | 0000010000000000 | - | - |
| 0x800 | 0000100000000000 | - | - |
| 0x1000 | 0001000000000000 | - | - |
| 0x2000 | 0010000000000000 | - | - |
| 0x4000 | 0100000000000000 | - | - |
| 0x8000 | 1000000000000000 | - | - |
| Value | Bit Mask | Name | Description |
| 1 | 0000000000000001 | currentHp | The current hp |
| 2 | 0000000000000010 | currentMana | The current mana |
| 4 | 0000000000000100 | maxHp | The maxhp |
| 8 | 0000000000001000 | maxMp | The maximum mana |
| 0x10 | 0000000000010000 | exp | currentExp |
| 0x20 | 0000000000100000 | - | - |
| 0x40 | 0000000001000000 | - | - |
| 0x80 | 0000000010000000 | - | - |
| 0x100 | 0000000100000000 | visionRange | The vision range |
| 0x200 | 0000001000000000 | moreVision | More vision (this increases much quicker but is not a mult) |
| 0x400 | 0000010000000000 | movementSpeed | The movement speed |
| 0x800 | 0000100000000000 | modelSize | The size of the model, 1 = normal, 2 is twice size etc |
| 0x1000 | 0001000000000000 | levelSomething | The level of hero but not encoded normally and not bit mask |
| 0x2000 | 0010000000000000 | - | - |
| 0x4000 | 0100000000000000 | - | - |
| 0x8000 | 1000000000000000 | - | - |
| Value | Bit Mask | Name | Description |
| 1 | 0000000000000001 | - | - |
| 2 | 0000000000000010 | - | - |
| 4 | 0000000000000100 | - | - |
| 8 | 0000000000001000 | - | - |
| 0x10 | 0000000000010000 | - | - |
| 0x20 | 0000000000100000 | - | - |
| 0x40 | 0000000001000000 | - | - |
| 0x80 | 0000000010000000 | - | - |
| 0x100 | 0000000100000000 | - | - |
| 0x200 | 0000001000000000 | - | - |
| 0x400 | 0000010000000000 | - | - |
| 0x800 | 0000100000000000 | - | - |
| 0x1000 | 0001000000000000 | - | - |
| 0x2000 | 0010000000000000 | - | - |
| 0x4000 | 0100000000000000 | - | - |
| 0x8000 | 1000000000000000 | - | - |