forked from Nisalon/IntWars
-
Notifications
You must be signed in to change notification settings - Fork 45
Stats
Intline9 edited this page Jul 16, 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 | Name | Description |
1 | 00001 | - | - |
2 | 00010 | - | - |
4 | 00100 | - | - |
8 | 01000 | - | - |
16 | 10000 | - | - |
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)
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 | - | - |
Of course you can and each field with each other so you could update multiple master fields like 10110 would update 3 fields.