mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
Fix buy/sell of stackable items on 8.6
This commit is contained in:
@@ -17,6 +17,7 @@ function UIGameMap:onDragEnter(mousePos)
|
||||
|
||||
self.currentDragThing = thing
|
||||
g_mouse.setTargetCursor()
|
||||
self.cancelNextRelease = true
|
||||
return true
|
||||
end
|
||||
|
||||
|
@@ -53,7 +53,7 @@ end
|
||||
function UIItem:onHoverChange(hovered)
|
||||
UIWidget.onHoverChange(self, hovered)
|
||||
|
||||
if self:isVirtual() then return end
|
||||
if self:isVirtual() or not self:isDraggable() then return end
|
||||
|
||||
local draggingWidget = g_ui.getDraggingWidget()
|
||||
if draggingWidget and self ~= draggingWidget then
|
||||
@@ -93,7 +93,7 @@ function UIItem:onMouseRelease(mousePosition, mouseButton)
|
||||
end
|
||||
|
||||
function UIItem:canAcceptDrop(widget, mousePos)
|
||||
if self:isVirtual() then return false end
|
||||
if self:isVirtual() or not self:isDraggable() then return false end
|
||||
if not widget or not widget.currentDragThing then return false end
|
||||
|
||||
local children = rootWidget:recursiveGetChildrenByPos(mousePos)
|
||||
|
Reference in New Issue
Block a user