mirror of
https://github.com/edubart/otclient.git
synced 2025-04-30 01:29:21 +02:00
Sending trade request using "UICreatureButton"
Extending the possibilities of "UICreatureButton" widget. Adding possibility sending trade request in battle list (game_battle module) and other modules who use widget "UICreatureButton".
This commit is contained in:
parent
8c731ac016
commit
bc507fd98b
@ -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…
x
Reference in New Issue
Block a user