mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
Fix some bugs
This commit is contained in:
@@ -395,7 +395,7 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
|
||||
if multiUseThing and keyboardModifiers == KeyboardNoModifier and mouseButton == MouseRightButton and not g_mouse.isPressed(MouseLeftButton) then
|
||||
local player = g_game.getLocalPlayer()
|
||||
if multiUseThing:isCreature() and multiUseThing:isCreature() ~= player then
|
||||
g_game.attack(multiUseThing:isCreature())
|
||||
g_game.attack(multiUseThing)
|
||||
return true
|
||||
elseif multiUseThing:isContainer() then
|
||||
if multiUseThing:getParentContainer() then
|
||||
|
@@ -24,12 +24,15 @@ function UIItem:onDrop(widget, mousePos)
|
||||
if not widget or not widget.currentDragThing then return false end
|
||||
|
||||
local item = widget.currentDragThing
|
||||
if not item:isItem() then return false end
|
||||
|
||||
local toPos = self.position
|
||||
|
||||
local itemPos = item:getPosition()
|
||||
if itemPos.x == toPos.x and itemPos.y == toPos.y and itemPos.z == toPos.z then return false end
|
||||
|
||||
if item:getCount() > 1 then
|
||||
g_game.look(item)
|
||||
modules.game_interface.moveStackableItem(item, toPos)
|
||||
else
|
||||
g_game.move(item, toPos, 1)
|
||||
|
Reference in New Issue
Block a user