Browse Source

Merge pull request #872 from EgzoT/EgzoT-trade_request_ui

Sending trade request using "UICreatureButton"
Henrique Santiago 3 years ago
parent
commit
4e9e1555f4
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      modules/game_interface/gameinterface.lua

+ 5
- 0
modules/game_interface/gameinterface.lua View File

@@ -386,6 +386,11 @@ function onTradeWith(clickedWidget, mousePosition)
386 386
     if tile then
387 387
       g_game.requestTrade(selectedThing, tile:getTopCreature())
388 388
     end
389
+  elseif clickedWidget:getClassName() == 'UICreatureButton' then
390
+    local creature = clickedWidget:getCreature()
391
+    if creature then
392
+      g_game.requestTrade(selectedThing, creature)
393
+    end
389 394
   end
390 395
 end
391 396
 

Loading…
Cancel
Save