Checked off some Market TODO's.

* Added some market offer constraints: offer creation exhaustion and now checks balance to validate sell offers.
* Fixed the depot updating issue (no longer requires updateDepotItemCount function)
* Can now silence the MarketProtocol messages.
* Few minor market fixes.
This commit is contained in:
BeniS
2012-08-15 03:43:48 +12:00
parent 150059a561
commit b93ea86260
5 changed files with 60 additions and 74 deletions

View File

@@ -9,11 +9,15 @@ function UIMiniWindowContainer.create()
return container
end
function UIMiniWindowContainer:getClassName()
return 'UIMiniWindowContainer'
end
function UIMiniWindowContainer:onDrop(widget, mousePos)
if widget:getClassName() == 'UIMiniWindow' then
local oldParent = widget:getParent()
if oldParent == self then
return true
return true
end
if oldParent then
@@ -21,10 +25,10 @@ function UIMiniWindowContainer:onDrop(widget, mousePos)
end
if widget.movedWidget then
local index = self:getChildIndex(widget.movedWidget)
self:insertChild(index + widget.movedIndex, widget)
local index = self:getChildIndex(widget.movedWidget)
self:insertChild(index + widget.movedIndex, widget)
else
self:addChild(widget)
self:addChild(widget)
end
return true
@@ -97,7 +101,3 @@ function UIMiniWindowContainer:saveChildren()
end
end
end
function UIMiniWindowContainer:getClassName()
return 'UIMiniWindowContainer'
end