npctrade reworked, still need skin changes, and grey shader for items

This commit is contained in:
Henrique Santiago
2012-04-29 06:08:55 -03:00
parent dc0ade2bd0
commit 8d0f07255d
3 changed files with 460 additions and 339 deletions

View File

@@ -32,16 +32,16 @@ function UIGameMap:onDrop(widget, mousePos)
local tile = self:getTile(mousePos)
if not tile then return false end
local item = widget.currentDragThing
local thing = widget.currentDragThing
local toPos = tile:getPosition()
local itemPos = item:getPosition()
local itemPos = thing: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
GameInterface.moveStackableItem(item, toPos)
if thing:asItem() and thing:getCount() > 1 then
GameInterface.moveStackableItem(thing, toPos)
else
g_game.move(item, toPos, 1)
g_game.move(thing, toPos, 1)
end
return true