CGPlayer_C
struct · objectlayer · 11340 bytes
- Vtable
0x80af78- Meaning
- Holds a player other than the active one, whose heap block is 26648 bytes; the unit plus the player section
- Confidence
- verified, proof one
- Finding
- objectlayer/classes#class-sizes-and-pools
Finding: Class sizes and pools in objectlayer: classes
Each type's allocation size is its members, its field array and a second per-field array, in
bytes base + 4·N; N comes from a small function per type. At startup the manager creates one
pool per type 1 to 7 with that size, the class name and a block count. An object comes from its
type's pool, which stores the pool handle at +0x10; the active player instead gets a heap block
of 26648 bytes.
| type | class | base | N | size | block |
|---|---|---|---|---|---|
| 0 | CGObject_C | 0x128 | 3 | 308 (no pool) | |
| 1 | CGItem_C | 0x408 | 35 | 1172 | 512 |
| 2 | CGContainer_C | 0x8c8 | 107 | 2676 | 32 |
| 3 | CGUnit_C | 0x1158 | 170 | 5120 | 64 |
| 4 | CGPlayer_C | 0x2508 | 465 | 11340 | 64 |
| 5 | CGGameObject_C | 0x2f0 | 8 | 784 | 64 |
| 6 | CGDynamicObject_C | 0x1e0 | 3 | 492 | 32 |
| 7 | CGCorpse_C | 0x350 | 6 | 872 | 32 |
The derivation is in the doc.
Fields 19
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0e68 | 4 | uint32_t * | m_playerFields | Points at field 188, the player section, written by 0x5dd2a0 | verified, proof one | objectlayer/classes#field-storage |
0x0e6c | 4 | uint32_t * | m_playerWatchCopy | Points at the player section's watch copy, past the unit's 170, written by 0x5dd2a0 | verified, proof one | objectlayer/classes#field-storage |
0x0e70 | 3576 | uint32_t[894] | m_playerWatcherLists | Holds the 298 player field watcher lists of 12 bytes that the constructor empties | verified, proof one | objectlayer/players#the-player-object |
0x1c68 | 4 | void * | m_activeWatcherBlock | Points at the active player's block of 796 more watcher lists, past the watch copy | verified, proof one | objectlayer/players#the-player-object |
0x1c70 | 4 | uint32_t | m_farSightFlags | Holds bit 0, set from the 0x27a with 1 until far sight ends | verified, proof one | objectlayer/interaction#far-sight |
0x1c74 | 40 | uint8_t[40] | m_tradeSkillLines | Holds the hash table of TRADESKILLLINE nodes, its vtable 0x80b044 and its mask at +0x1c98 | verified, proof one | objectlayer/players#the-player-object |
0x1c9c | 40 | uint8_t[40] | m_proficiencySpells | Holds the hash table of PROFICIENCYSPELL nodes, its vtable 0x80b034 and its mask at +0x1cc0 | verified, proof one | objectlayer/players#the-player-object |
0x1cc4 | 12 | uint32_t[3] | m_pendingExpirations | Holds the list of pending item expirations: link offset, then the links at +0x1cc8 | verified, proof one | objectlayer/players#the-player-object |
0x1cd0 | 64 | uint8_t[64] | m_tabSpells | Holds four 16-byte spell arrays, indexed by the spell's Spell.dbc +0x0c | verified, proof one | objectlayer/players#the-player-object |
0x1d10 | 16 | uint32_t[4] | m_effect47Spells | Holds four spell ids, indexed by an effect-47 spell's misc value | verified, proof one | objectlayer/players#the-player-object |
0x1d20 | 4 | uint32_t | m_pendingDisplays | Holds the count of equipment displays waiting on an item record | verified, proof one | objectlayer/players#the-player-object |
0x1d28 | 8 | uint64_t | m_lootGuid | Holds the GUID being looted | verified, proof one | objectlayer/players#the-player-object |
0x1d30 | 1 | uint8_t | m_autoLoot | Holds the auto-loot byte: the Shift state of the last interaction that set it, cleared by a sweep | verified, proof one | objectlayer/interaction#the-auto-loot-byte |
0x1d38 | 4 | uint32_t | m_inventoryCount | Holds the inventory slot count, 0x71 for the active player and 0 otherwise | verified, proof one | objectlayer/players#the-player-object |
0x1d3c | 4 | uint64_t * | m_inventoryGuids | Points at the inventory GUIDs, PLAYER_FIELD_INV_SLOT_HEAD in the player fields | verified, proof one | objectlayer/players#the-player-object |
0x1d40 | 8 | uint64_t | m_inventoryOwner | Holds the player's GUID as the inventory's owner | verified, proof one | objectlayer/players#the-player-object |
0x1d48 | 1 | uint8_t | m_inventoryOwn | Holds 1, the inventory's own-flag | verified, proof one | objectlayer/players#the-player-object |
0x1d50 | 24 | uint8_t[24] | m_handWeapons | Holds each hand's weapon record, 8 bytes apart: class, subclass and three more bytes | verified, proof one | objectlayer/playercombat#hand-weapons |
0x1d68 | 4 | uint32_t | m_localStandState | Holds the active player's local stand state | verified, proof one | objectlayer/players#the-player-object |