benilla-re systems structs docs

CGItem_C

struct · objectlayer · 1172 bytes

Vtable
0x80ada8
Meaning
Holds an item: the object, its field pointers, watcher lists, flags, cached record bytes and expiries
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 13

offsetsizetypenamemeaningconfidencefinding
0x01104void *m_secondaryVtableHolds the item's one-slot vtable, 0x80ae24 then 0x80ada0verified, proof oneobjectlayer/items#the-item-object
0x01144uint32_t *m_itemFieldsHolds the address of field 6, ITEM_FIELD_OWNER, written by 0x5d81b0verified, proof oneobjectlayer/items#the-item-object
0x01184uint32_t *m_itemWatchCopyHolds the address of the item part of the watch copy, written by 0x5d81b0verified, proof oneobjectlayer/items#the-item-object
0x011c504uint8_t[504]m_itemWatchersHolds the 42 item field watcher lists, 12 bytes eachverified, proof oneobjectlayer/items#the-item-object
0x03144uint32_tm_itemFlagsHolds bit 0, the interface's item lock, and bit 1, the record's arrivalverified, proof oneobjectlayer/items#the-item-object
0x03181uint8_tm_cachedClassHolds the record's class as a byteverified, proof oneobjectlayer/items#the-item-object
0x03191uint8_tm_cachedSubclassHolds the record's subclass as a byteverified, proof oneobjectlayer/items#the-item-object
0x031a1uint8_tm_cachedMaterialHolds the record's material as a byteverified, proof oneobjectlayer/items#the-item-object
0x031b1uint8_tm_cachedInventoryTypeHolds the record's inventory type as a byteverified, proof oneobjectlayer/items#the-item-object
0x031c1uint8_tm_cachedRecordByteHolds the record byte at +0x1b4verified, proof oneobjectlayer/items#the-item-object
0x03204uint32_tm_expiryHolds the time the item expires, 0 for noneverified, proof oneobjectlayer/items#item-and-enchantment-timers
0x032428uint32_t[7]m_enchantExpiryHolds the time each enchantment slot expires, 0 for noneverified, proof oneobjectlayer/items#item-and-enchantment-timers
0x03404void *m_groupSoundsHolds the ItemGroupSounds row of the display, set when the record arrivesverified, proof oneobjectlayer/items#the-item-record