benilla-re systems structs docs

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.

typeclassbaseNsizeblock
0CGObject_C0x1283308 (no pool)
1CGItem_C0x408351172512
2CGContainer_C0x8c8107267632
3CGUnit_C0x1158170512064
4CGPlayer_C0x25084651134064
5CGGameObject_C0x2f0878464
6CGDynamicObject_C0x1e0349232
7CGCorpse_C0x350687232

The derivation is in the doc.

Fields 45

offsetsizetypenamemeaningconfidencefinding
0x01104uint32_t *m_unitFieldsPoints at field 6, the unit section, written by 0x5fad10verified, proof oneobjectlayer/classes#field-storage
0x01144uint32_t *m_unitWatchCopyPoints at the unit section's watch copy, past the object's 3, written by 0x5fad10verified, proof oneobjectlayer/classes#field-storage
0x01184CMovement *m_movementPtrPoints at the unit's own CMovement at +0x9a8, set by 0x5fad50verified, proof oneobjectlayer/units#the-unit-object
0x011c2184uint32_t[546]m_watcherListsHolds the 182 field watcher lists of 12 bytes that 0x5fad50 empties and 0x5fb5e0 unlinksverified, proof oneobjectlayer/units#the-unit-object
0x09a8352CMovementm_movementHolds the unit's CMovement, built in place by the unit constructor 0x5fad50 through 0x616fa0verified, proof onecollision/mover#construction
0x0b184uint32_tm_soundRaceHolds +0x34 of the unit's ChrRaces row, written by 0x5fb880verified, proof oneobjectlayer/units#lifecycle
0x0b1c4void *m_speechSoundHolds the playing greeting or farewell sound, written by 0x60c270 and 0x60c3b0verified, proof oneobjectlayer/unitnames#greetings-and-unit-sounds
0x0b2c4void *m_questMarkerHolds the marker model hung over the head, written by 0x607480 and cleared by 0x6073f0verified, proof oneobjectlayer/unitnames#quest-markers
0x0b304void *m_creatureRecordHolds the creature cache record, written by 0x60afb0, 0x604600 and 0x604660verified, proof oneobjectlayer/unitnames#unit-names
0x0b344void *m_displayRecordHolds the CreatureDisplayInfo row, written by 0x60afb0verified, proof oneobjectlayer/unitdisplay#display-records
0x0b384void *m_displayExtraRecordHolds the CreatureDisplayInfoExtra row or null, written by 0x60afb0verified, proof oneobjectlayer/unitdisplay#display-records
0x0b3c4void *m_modelDataRecordHolds the CreatureModelData row, written by 0x60afb0verified, proof oneobjectlayer/unitdisplay#display-records
0x0b404void *m_soundDataRecordHolds the CreatureSoundData row, written by 0x60afb0verified, proof oneobjectlayer/unitdisplay#display-records
0x0b444void *m_mountSoundDataRecordHolds the mount's CreatureSoundData row, written by 0x607a00 and cleared by 0x607ce0verified, proof oneobjectlayer/unitdisplay#mounts
0x0b484void *m_bloodLevelsRecordHolds the UnitBloodLevels row, written by 0x60afb0verified, proof oneobjectlayer/unitdisplay#display-records
0x0b4c4void *m_spellEffectHolds the channel's spell effect, written by 0x612650 and released by 0x612630verified, proof oneobjectlayer/auras#channels
0x0b58192uint32_t[48]m_auraSpellsHolds the spell shown in each aura slot, written by 0x5ff350 and cleared by 0x5ff290verified, proof oneobjectlayer/auras#showing-an-auras-slot
0x0c184uint32_tm_breathCheckTimeHolds the time of the next breath check, written by 0x607710verified, proof oneobjectlayer/unitbody#breath
0x0c1c4uint32_tm_lastStandStateHolds the stand state the animation last answered, written by 0x6127b0 and 0x5fd9e0verified, proof oneobjectlayer/units#stand-states
0x0c2032uint32_t[8]m_emoteQueueHolds four delay and emote pairs, written by 0x60bbc0verified, proof oneobjectlayer/unitanim#emotes
0x0c404uint32_tm_bleedTimeHolds the next bleed time, written by 0x60a260 and the constructorverified, proof oneobjectlayer/unitbody#low-health-and-bleeding
0x0c488uint64_tm_attackTargetHolds the attack target GUID, written by 0x5ff070 and cleared by 0x605860verified, proof oneobjectlayer/units#the-unit-object
0x0c584uint32_tm_unitStateHolds state bits: 0x2 low health, 0x8 kill XP shown, 0x10 flash, 0x20 and 0x40 breath, 0x100 native displayverified, proof oneobjectlayer/units#the-unit-object
0x0c604int32_tm_terrainTypeHolds the TerrainType id of the ground under the unit or -1, written by 0x5fa730 and 0x5fba95verified, proof oneobjectlayer/unitbody#liquid-and-swimming
0x0c784uint32_tm_nextRippleTimeHolds the time of the next water ripple, written by 0x5fa760verified, proof oneobjectlayer/unitbody#water-ripples-and-swimming
0x0c7c4void *m_nameDescHolds the name descriptor, written by 0x606fe0 and cleared by 0x607030verified, proof oneobjectlayer/unitnames#the-name-block
0x0c8012uint32_t[3]m_pendingXPHolds an XP gain and its two arguments, written by 0x60a0c0 and cleared by 0x6251e0 in the same callverified, proof oneobjectlayer/unitnames#damage-and-miss-numbers
0x0c8c4uint32_tm_precastSpellHolds the precast spell id, written by 0x60d020 and cleared by 0x60d040verified, proof oneobjectlayer/units#caster-checks-for-a-spell
0x0c904uint32_tm_tokenFlagsHolds the unit token flags, written by 0x60c520, 0x60c4a0 and 0x60c4f0verified, proof oneobjectlayer/units#reactions-tokens-and-groups
0x0c944floatm_bodyFacingHolds the body facing, written by 0x607ed0, 0x5fbd60 and the constructorverified, proof oneobjectlayer/unitbody#body-turn-and-spine-twist
0x0cb44uint32_tm_deathTimeHolds the time the unit was seen dead, written by 0x5fb880 and 0x5fbe00, cleared by 0x5fef70verified, proof oneobjectlayer/units#lifecycle
0x0cb84uint32_tm_questStatusHolds the quest giver status, written by 0x607440verified, proof oneobjectlayer/unitnames#quest-markers
0x0cc04uint32_tm_mountFootprintTextureHolds the mount model's footprint texture, written by 0x607a00verified, proof oneobjectlayer/unitdisplay#mounts
0x0cc44floatm_mountFootprintWidthHolds the mount's footprint width over 36, written by 0x607a00verified, proof oneobjectlayer/unitdisplay#mounts
0x0cc84floatm_mountFootprintLengthHolds the mount's footprint length over 36, written by 0x607a00verified, proof oneobjectlayer/unitdisplay#mounts
0x0ccc4uint32_tm_componentPendingHolds 1 while the character component waits for the model, written by 0x60abe0 and 0x607da0verified, proof oneobjectlayer/unitdisplay#changing-the-display
0x0cd04uint32_tm_portraitPendingHolds 1 while the portrait waits for the model, written by 0x60abe0 and 0x607da0verified, proof oneobjectlayer/unitdisplay#changing-the-display
0x0cf04floatm_selectionRadiusHolds the selection circle radius, written by 0x60aee0verified, proof oneobjectlayer/unitdisplay#selection-circle-and-colour
0x0d244void *m_rangedModelHolds the ranged weapon's model, written by 0x611e10verified, proof oneobjectlayer/unitdisplay#hand-items-and-weapons
0x0d304void *m_characterComponentHolds the character component, written by 0x5fb200verified, proof oneobjectlayer/unitdisplay#changing-the-display
0x0d348void *[2]m_weaponTrailsHolds each hand's weapon trail, written by 0x608d60verified, proof oneobjectlayer/unitdisplay#hand-items-and-weapons
0x0d544uint32_tm_transformSpellHolds the shapeshift or transform spell, written by 0x5ff0c0 and cleared by 0x60abe0verified, proof oneobjectlayer/auras#showing-an-auras-slot
0x0d5c4int32_tm_keyBoneHolds the key bone 4, 6 or -1, written by 0x60ce70 and 0x60abe0verified, proof oneobjectlayer/unitdisplay#changing-the-display
0x0e604void *m_namePlateHolds the nameplate frame, written by 0x6086e0 and cleared by 0x608a10verified, proof oneobjectlayer/unitnames#nameplates
0x0e644void *m_chatBubbleHolds the chat bubble, written by 0x608ac0 and cleared by 0x608c00verified, proof oneobjectlayer/unitnames#chat-bubbles