Merge pull request #872 from EgzoT/EgzoT-trade_request_ui
Sending trade request using "UICreatureButton"
This commit is contained in:
commit
4e9e1555f4
|
@ -386,6 +386,11 @@ function onTradeWith(clickedWidget, mousePosition)
|
|||
if tile then
|
||||
g_game.requestTrade(selectedThing, tile:getTopCreature())
|
||||
end
|
||||
elseif clickedWidget:getClassName() == 'UICreatureButton' then
|
||||
local creature = clickedWidget:getCreature()
|
||||
if creature then
|
||||
g_game.requestTrade(selectedThing, creature)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue