benilla-re systems structs docs

HandleVendorMessage

function · objectlayer · primitive

Address
0x5e5910 · 126 bytes, up to 0x5e598d
Signature
uint32_t __fastcall (void *param, uint32_t opcode, uint32_t time, CDataStore *msg)
Meaning
Dispatches the four vendor messages to their readers when an active player exists, else returns 0
Confidence
verified, proof one
Finding
objectlayer/inventory#vendors

Finding: Vendors in objectlayer: inventory

0x5e5910 dispatches 0x19f, 0x1a1, 0x1a4 and 0x1a5 for the active player. 0x19f reads the vendor and a u8 count of 28-byte items into the 128-entry table at 0xc4c4a0. A count above 128 writes on past it through the globals that follow, to 255 entries, the initial-spell list header and the vendor GUID among them. A count of 0 reads a reason and prints one of five console lines; with reason 0 it also opens an empty window. 0x1a4 stores an item's new stock and reports quest progress; 0x1a5 zeroes a sold-out item's stock and shows the purchase error; 0x1a1 shows the sale error and passes the item to 0x495420.

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.