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.
| 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 13
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0110 | 4 | void * | m_secondaryVtable | Holds the item's one-slot vtable, 0x80ae24 then 0x80ada0 | verified, proof one | objectlayer/items#the-item-object |
0x0114 | 4 | uint32_t * | m_itemFields | Holds the address of field 6, ITEM_FIELD_OWNER, written by 0x5d81b0 | verified, proof one | objectlayer/items#the-item-object |
0x0118 | 4 | uint32_t * | m_itemWatchCopy | Holds the address of the item part of the watch copy, written by 0x5d81b0 | verified, proof one | objectlayer/items#the-item-object |
0x011c | 504 | uint8_t[504] | m_itemWatchers | Holds the 42 item field watcher lists, 12 bytes each | verified, proof one | objectlayer/items#the-item-object |
0x0314 | 4 | uint32_t | m_itemFlags | Holds bit 0, the interface's item lock, and bit 1, the record's arrival | verified, proof one | objectlayer/items#the-item-object |
0x0318 | 1 | uint8_t | m_cachedClass | Holds the record's class as a byte | verified, proof one | objectlayer/items#the-item-object |
0x0319 | 1 | uint8_t | m_cachedSubclass | Holds the record's subclass as a byte | verified, proof one | objectlayer/items#the-item-object |
0x031a | 1 | uint8_t | m_cachedMaterial | Holds the record's material as a byte | verified, proof one | objectlayer/items#the-item-object |
0x031b | 1 | uint8_t | m_cachedInventoryType | Holds the record's inventory type as a byte | verified, proof one | objectlayer/items#the-item-object |
0x031c | 1 | uint8_t | m_cachedRecordByte | Holds the record byte at +0x1b4 | verified, proof one | objectlayer/items#the-item-object |
0x0320 | 4 | uint32_t | m_expiry | Holds the time the item expires, 0 for none | verified, proof one | objectlayer/items#item-and-enchantment-timers |
0x0324 | 28 | uint32_t[7] | m_enchantExpiry | Holds the time each enchantment slot expires, 0 for none | verified, proof one | objectlayer/items#item-and-enchantment-timers |
0x0340 | 4 | void * | m_groupSounds | Holds the ItemGroupSounds row of the display, set when the record arrives | verified, proof one | objectlayer/items#the-item-record |