UpdateMerchantRowStock
function · ui · orchestration
- Address
0x4fae70· 87 bytes, up to0x4faec6- Signature
void __fastcall (uint32_t slot, int32_t count, uint64_t vendorGuid)- Meaning
- Stores a new stock count in the open vendor row with a slot word and signals MERCHANT_UPDATE
- Confidence
- verified, proof one
- Finding
- ui/merchant#vendor-row-records-and-stock
Finding: Vendor row records and stock in ui: buy-back, shopping tooltips and repair
GetMerchantItemInfo asks for a row's item record through 0x4faed0(entry): entry 0 answers 0;
otherwise the item cache is asked under the open vendor's GUID with the callback
0x4fada0, and a miss adds one to the wait count 0xbddfb0. Each answer, record or refusal, runs 0x4fb0f0: a count above 0 drops by one, and when it reaches 0, or was 0 already, MERCHANT_UPDATE
(317) is signalled if a vendor is open. Opening the window cancels the old rows' callbacks and zeroes
the count; closing does neither. 0x4fae70(slot, count, vendor), the stock update of SMSG_BUY_ITEM
and SMSG_BUY_FAILED, ignores another vendor; for the open one it stores the count in the first row
with that slot word and signals MERCHANT_UPDATE, matched or not.
The derivation is in the doc.
Callers 2
- ReadBuyFailed objectlayer
- CGPlayer_C::ReadBuyItem objectlayer
Callees 1
Calls and jumps by a bare address, from tables/calls.tsv.