CGUnit_C
struct · objectlayer · 5120 bytes
- Vtable
0x80c4f8- Meaning
- Holds a unit: the object, the unit members with their field pointers, the unit fields and watch copy
- 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 45
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0110 | 4 | uint32_t * | m_unitFields | Points at field 6, the unit section, written by 0x5fad10 | verified, proof one | objectlayer/classes#field-storage |
0x0114 | 4 | uint32_t * | m_unitWatchCopy | Points at the unit section's watch copy, past the object's 3, written by 0x5fad10 | verified, proof one | objectlayer/classes#field-storage |
0x0118 | 4 | CMovement * | m_movementPtr | Points at the unit's own CMovement at +0x9a8, set by 0x5fad50 | verified, proof one | objectlayer/units#the-unit-object |
0x011c | 2184 | uint32_t[546] | m_watcherLists | Holds the 182 field watcher lists of 12 bytes that 0x5fad50 empties and 0x5fb5e0 unlinks | verified, proof one | objectlayer/units#the-unit-object |
0x09a8 | 352 | CMovement | m_movement | Holds the unit's CMovement, built in place by the unit constructor 0x5fad50 through 0x616fa0 | verified, proof one | collision/mover#construction |
0x0b18 | 4 | uint32_t | m_soundRace | Holds +0x34 of the unit's ChrRaces row, written by 0x5fb880 | verified, proof one | objectlayer/units#lifecycle |
0x0b1c | 4 | void * | m_speechSound | Holds the playing greeting or farewell sound, written by 0x60c270 and 0x60c3b0 | verified, proof one | objectlayer/unitnames#greetings-and-unit-sounds |
0x0b2c | 4 | void * | m_questMarker | Holds the marker model hung over the head, written by 0x607480 and cleared by 0x6073f0 | verified, proof one | objectlayer/unitnames#quest-markers |
0x0b30 | 4 | void * | m_creatureRecord | Holds the creature cache record, written by 0x60afb0, 0x604600 and 0x604660 | verified, proof one | objectlayer/unitnames#unit-names |
0x0b34 | 4 | void * | m_displayRecord | Holds the CreatureDisplayInfo row, written by 0x60afb0 | verified, proof one | objectlayer/unitdisplay#display-records |
0x0b38 | 4 | void * | m_displayExtraRecord | Holds the CreatureDisplayInfoExtra row or null, written by 0x60afb0 | verified, proof one | objectlayer/unitdisplay#display-records |
0x0b3c | 4 | void * | m_modelDataRecord | Holds the CreatureModelData row, written by 0x60afb0 | verified, proof one | objectlayer/unitdisplay#display-records |
0x0b40 | 4 | void * | m_soundDataRecord | Holds the CreatureSoundData row, written by 0x60afb0 | verified, proof one | objectlayer/unitdisplay#display-records |
0x0b44 | 4 | void * | m_mountSoundDataRecord | Holds the mount's CreatureSoundData row, written by 0x607a00 and cleared by 0x607ce0 | verified, proof one | objectlayer/unitdisplay#mounts |
0x0b48 | 4 | void * | m_bloodLevelsRecord | Holds the UnitBloodLevels row, written by 0x60afb0 | verified, proof one | objectlayer/unitdisplay#display-records |
0x0b4c | 4 | void * | m_spellEffect | Holds the channel's spell effect, written by 0x612650 and released by 0x612630 | verified, proof one | objectlayer/auras#channels |
0x0b58 | 192 | uint32_t[48] | m_auraSpells | Holds the spell shown in each aura slot, written by 0x5ff350 and cleared by 0x5ff290 | verified, proof one | objectlayer/auras#showing-an-auras-slot |
0x0c18 | 4 | uint32_t | m_breathCheckTime | Holds the time of the next breath check, written by 0x607710 | verified, proof one | objectlayer/unitbody#breath |
0x0c1c | 4 | uint32_t | m_lastStandState | Holds the stand state the animation last answered, written by 0x6127b0 and 0x5fd9e0 | verified, proof one | objectlayer/units#stand-states |
0x0c20 | 32 | uint32_t[8] | m_emoteQueue | Holds four delay and emote pairs, written by 0x60bbc0 | verified, proof one | objectlayer/unitanim#emotes |
0x0c40 | 4 | uint32_t | m_bleedTime | Holds the next bleed time, written by 0x60a260 and the constructor | verified, proof one | objectlayer/unitbody#low-health-and-bleeding |
0x0c48 | 8 | uint64_t | m_attackTarget | Holds the attack target GUID, written by 0x5ff070 and cleared by 0x605860 | verified, proof one | objectlayer/units#the-unit-object |
0x0c58 | 4 | uint32_t | m_unitState | Holds state bits: 0x2 low health, 0x8 kill XP shown, 0x10 flash, 0x20 and 0x40 breath, 0x100 native display | verified, proof one | objectlayer/units#the-unit-object |
0x0c60 | 4 | int32_t | m_terrainType | Holds the TerrainType id of the ground under the unit or -1, written by 0x5fa730 and 0x5fba95 | verified, proof one | objectlayer/unitbody#liquid-and-swimming |
0x0c78 | 4 | uint32_t | m_nextRippleTime | Holds the time of the next water ripple, written by 0x5fa760 | verified, proof one | objectlayer/unitbody#water-ripples-and-swimming |
0x0c7c | 4 | void * | m_nameDesc | Holds the name descriptor, written by 0x606fe0 and cleared by 0x607030 | verified, proof one | objectlayer/unitnames#the-name-block |
0x0c80 | 12 | uint32_t[3] | m_pendingXP | Holds an XP gain and its two arguments, written by 0x60a0c0 and cleared by 0x6251e0 in the same call | verified, proof one | objectlayer/unitnames#damage-and-miss-numbers |
0x0c8c | 4 | uint32_t | m_precastSpell | Holds the precast spell id, written by 0x60d020 and cleared by 0x60d040 | verified, proof one | objectlayer/units#caster-checks-for-a-spell |
0x0c90 | 4 | uint32_t | m_tokenFlags | Holds the unit token flags, written by 0x60c520, 0x60c4a0 and 0x60c4f0 | verified, proof one | objectlayer/units#reactions-tokens-and-groups |
0x0c94 | 4 | float | m_bodyFacing | Holds the body facing, written by 0x607ed0, 0x5fbd60 and the constructor | verified, proof one | objectlayer/unitbody#body-turn-and-spine-twist |
0x0cb4 | 4 | uint32_t | m_deathTime | Holds the time the unit was seen dead, written by 0x5fb880 and 0x5fbe00, cleared by 0x5fef70 | verified, proof one | objectlayer/units#lifecycle |
0x0cb8 | 4 | uint32_t | m_questStatus | Holds the quest giver status, written by 0x607440 | verified, proof one | objectlayer/unitnames#quest-markers |
0x0cc0 | 4 | uint32_t | m_mountFootprintTexture | Holds the mount model's footprint texture, written by 0x607a00 | verified, proof one | objectlayer/unitdisplay#mounts |
0x0cc4 | 4 | float | m_mountFootprintWidth | Holds the mount's footprint width over 36, written by 0x607a00 | verified, proof one | objectlayer/unitdisplay#mounts |
0x0cc8 | 4 | float | m_mountFootprintLength | Holds the mount's footprint length over 36, written by 0x607a00 | verified, proof one | objectlayer/unitdisplay#mounts |
0x0ccc | 4 | uint32_t | m_componentPending | Holds 1 while the character component waits for the model, written by 0x60abe0 and 0x607da0 | verified, proof one | objectlayer/unitdisplay#changing-the-display |
0x0cd0 | 4 | uint32_t | m_portraitPending | Holds 1 while the portrait waits for the model, written by 0x60abe0 and 0x607da0 | verified, proof one | objectlayer/unitdisplay#changing-the-display |
0x0cf0 | 4 | float | m_selectionRadius | Holds the selection circle radius, written by 0x60aee0 | verified, proof one | objectlayer/unitdisplay#selection-circle-and-colour |
0x0d24 | 4 | void * | m_rangedModel | Holds the ranged weapon's model, written by 0x611e10 | verified, proof one | objectlayer/unitdisplay#hand-items-and-weapons |
0x0d30 | 4 | void * | m_characterComponent | Holds the character component, written by 0x5fb200 | verified, proof one | objectlayer/unitdisplay#changing-the-display |
0x0d34 | 8 | void *[2] | m_weaponTrails | Holds each hand's weapon trail, written by 0x608d60 | verified, proof one | objectlayer/unitdisplay#hand-items-and-weapons |
0x0d54 | 4 | uint32_t | m_transformSpell | Holds the shapeshift or transform spell, written by 0x5ff0c0 and cleared by 0x60abe0 | verified, proof one | objectlayer/auras#showing-an-auras-slot |
0x0d5c | 4 | int32_t | m_keyBone | Holds the key bone 4, 6 or -1, written by 0x60ce70 and 0x60abe0 | verified, proof one | objectlayer/unitdisplay#changing-the-display |
0x0e60 | 4 | void * | m_namePlate | Holds the nameplate frame, written by 0x6086e0 and cleared by 0x608a10 | verified, proof one | objectlayer/unitnames#nameplates |
0x0e64 | 4 | void * | m_chatBubble | Holds the chat bubble, written by 0x608ac0 and cleared by 0x608c00 | verified, proof one | objectlayer/unitnames#chat-bubbles |