Script::ClickTradeButton
function · ui · primitive
- Address
0x4bfdf0· 644 bytes, up to0x4c0073- Signature
int __fastcall (lua_State *L)- Meaning
- Adds cursor money to the offer or puts the cursor item in a trade slot
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/tradelootverbs#clicking-a-trade-slot
Finding: Clicking a trade slot in ui: trade window and loot roll verbs
ClickTradeButton(index) raises Usage: ClickTradeButton(index) for a non-number. When the cursor carries money it adds
that money to the offer and clears the cursor on success. Otherwise it works on the item the cursor carries and the slot index−1:
for slots 1 to 6 an item that is bound refuses with ERR_TRADE_QUEST_ITEM when its record's field +0x194 is 4 or 5 and
ERR_TRADE_BOUND_ITEM otherwise; an unbound container that holds items refuses with ERR_TRADE_BAG; an item in an equipped
bag slot (inventory index 0x13 to 0x16) refuses with ERR_TRADE_EQUIPPED_BAG.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 15
- __ftol crt
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- CGGameUI::SetCursorItem ui
- GetCursorItemInfo ui
- ClearCursor ui
- CGGameUI::DisplayError ui
- TradeInfoSetPlayerItem ui
- DBCache_ItemStats_C_int_HASHKEY_INT_::GetRecord dbcache
- TradeAddMoney objectlayer
- CGItem_C::IsBound objectlayer
- IndexOfItem objectlayer
- lua_isnumber lua
- lua_tonumber lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.