benilla-re systems structs docs

SetLootSource

function · ui · primitive

Address
0x4c1cb0 · 580 bytes, up to 0x4c1ef3
Signature
void __fastcall (CGObject_C *source, uint32_t money, uint32_t type)
Meaning
Ends the loot session in progress and starts one for the source object in ecx, copying the wire entries
Confidence
verified, proof one
Finding
ui/loot#opening-and-closing-a-session

Finding: Opening and closing a session in ui: the loot window

0x4c1cb0(source, money, type) ends the session in progress and starts the next. Ending: for a unit it asks 0x4c2a70 whether anything is left and, if not, calls 0x600680 (the loot sparkle off); for a game object it calls 0x5f8bd0; for an item it unlocks it. It cancels every fetch still pending (0x55c0c0), zeroes the GUID, and signals LOOT_CLOSED (269). Starting: it stores the GUID of the source object, clears the array, then copies the wire entries (below). It asks the item cache for each copied item and counts the misses. With misses outstanding it returns, firing nothing. With none, a player with the auto-loot byte (+0x1d30) set takes the auto-loot sweep instead; otherwise it signals LOOT_OPENED (267).

The derivation is in the doc.

Callers 2

Callees 15

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