benilla-re systems structs docs

CGPlayer_C::GetVirtualItem

function · objectlayer · primitive

Address
0x5ec240 · 271 bytes, up to 0x5ec34e
Signature
void * __thiscall (CGPlayer_C *this, uint32_t hand, uint32_t raw)
Meaning
Returns a hand's weapon record of class, subclass and three bytes, honouring disarm (vtable slot 38)
Confidence
verified, proof one
Finding
objectlayer/playercombat#hand-weapons

Finding: Hand weapons in objectlayer: player spells and combat

Slot 38 (0x5ec240(hand, raw)) returns a hand's weapon record: hand 0, 1 and 2 are slots 15, 16 and 17. Without raw, a disarmed player has no main-hand weapon, and no off-hand weapon when the main hand holds none; an item whose visible flag bit 0 is set counts as none. The record is five bytes at +0x1d50 + 8·hand: the class, subclass and three more from the item record. Slot 40 returns the display id, slot 39 its ItemDisplayInfo row.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 6

Calls and jumps by a bare address, from tables/calls.tsv.