diff --git a/modules/corelib/ui/uiminiwindowcontainer.lua b/modules/corelib/ui/uiminiwindowcontainer.lua index 0ece341c..8e9fffdb 100644 --- a/modules/corelib/ui/uiminiwindowcontainer.lua +++ b/modules/corelib/ui/uiminiwindowcontainer.lua @@ -115,8 +115,10 @@ function UIMiniWindowContainer:swapInsert(widget, index) if oldParent == self and oldIndex ~= index then local oldWidget = self:getChildByIndex(index) - self:removeChild(oldWidget) - self:insertChild(oldIndex, oldWidget) + if oldWidget then + self:removeChild(oldWidget) + self:insertChild(oldIndex, oldWidget) + end self:removeChild(widget) self:insertChild(index, widget) end diff --git a/modules/game_interface/widgets/uigamemap.lua b/modules/game_interface/widgets/uigamemap.lua index b6b55e18..a4a1343d 100644 --- a/modules/game_interface/widgets/uigamemap.lua +++ b/modules/game_interface/widgets/uigamemap.lua @@ -17,6 +17,7 @@ function UIGameMap:onDragEnter(mousePos) self.currentDragThing = thing g_mouse.setTargetCursor() + self.cancelNextRelease = true return true end diff --git a/modules/game_interface/widgets/uiitem.lua b/modules/game_interface/widgets/uiitem.lua index af067ed6..aea985a2 100644 --- a/modules/game_interface/widgets/uiitem.lua +++ b/modules/game_interface/widgets/uiitem.lua @@ -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) diff --git a/modules/game_market/market.otmod b/modules/game_market/market.otmod index 110e17da..e96f26df 100644 --- a/modules/game_market/market.otmod +++ b/modules/game_market/market.otmod @@ -4,6 +4,6 @@ Module author: BeniS website: www.otclient.info sandboxed: true - scripts: [offerstatistic.lua, marketoffer.lua, marketprotocol.lua, market.lua] + scripts: [ offerstatistic.lua, marketoffer.lua, marketprotocol.lua, market.lua ] @onLoad: init() @onUnload: terminate() diff --git a/src/client/item.cpp b/src/client/item.cpp index 6952c49a..74f742e7 100644 --- a/src/client/item.cpp +++ b/src/client/item.cpp @@ -210,9 +210,7 @@ int Item::getSubType() { if(isSplash() || isFluidContainer()) return m_countOrSubType; - if(g_game.getProtocolVersion() >= 900) - return 0; - return 1; + return 0; } int Item::getCount()