PDA

View Full Version : initiating trades


include
20-06-2006, 02:27 PM
ok - i try to get a possibility to find the person who had INITIATED the trade.

the event "TRADE_SHOW" is fired whenever a tradeframe openes. (but does not save, WHO had started the trade)

so i hooked the functions: InitiateTrade(UnitId) and BeginTrade().
within this functions, i saved a boolean var. if its TRUE, i know the PLAYER is going to start the trade. (and not the opposite client).


but there is still something i cannot get: if you drop an item on a char, the tradeframe's opening too... but this won't be done by initiatetrade, begintrade or DropItemOnUnit.

so: HOW could i get the initiator of a trade, if an item is dropped on a char? is there an event or a function?

Redmumba
20-06-2006, 02:32 PM
That's actully a pickle... I was under the impression that TRADE_SHOW works for both; afterall, it should fire every time the Trade Window is _opened_, not just through the Trade command, but also by dragging items. Maybe its a bug on Blizzard's part?

include
21-06-2006, 08:32 AM
yes, that IS my problem: its fired EVERYTIME. its not a bug, its a feature ^^

and there was an event "trade_request" (or similar). but this event is broken since patch idunno. so: how can i get WHO had dropped an item over another player? may its a default function i can hook.