CGPlayer_C::SetAutoLoot
function · objectlayer · primitive
- Address
0x5df460· 41 bytes, up to0x5df488- Signature
void __thiscall (CGPlayer_C *this, uint32_t autoLoot)- Meaning
- Stores the low byte of its argument at +0x1d30 and, with a loot target held, runs the sweep 0x4c1fa0(0)
- Confidence
- verified, proof one
- Finding
- objectlayer/interaction#the-auto-loot-byte
- Test
objectlayer::set_auto_loot_difftest
Finding: The auto-loot byte in objectlayer: interaction
The player's byte at +0x1d30 holds the Shift state of the last interaction that set it, until a sweep replaces it. SetAutoLoot (0x5df460) stores the low byte of its argument; a nonzero byte with a loot target held (+0x1d28) also runs the sweep at once. The loot legs of a unit's and a corpse's interaction slots (for the active mover) and a game object's slot (when its handler's slot 5 allows) pass whether Shift is down; OpenItem passes whether modifier 0 is exactly 1, InteractWithSpell its value when set is given, the sweep 0. The byte is read where a loot window opens (0x4c1ec7), at its last item record (0x4c2b1d) and in the inventory failure's tail (0x5e3b0d).
The derivation is in the doc.
Callers 6
- AutoLootAll ui
- CGCorpse_C::Interact objectlayer
- CGPlayer_C::OpenItem objectlayer
- CGPlayer_C::InteractWithSpell objectlayer
- CGGameObject_C::Interact objectlayer
- CGUnit_C::Interact objectlayer
Callees 1
- AutoLootAll ui
Calls and jumps by a bare address, from tables/calls.tsv.