More on Market (far from done), Minor Fixes, Edited Outfits Module, Some Cosmetics.

* Started building the market UI.
* More work on the market functionality.
* Fixes to the market protocol. (Known issue: if I use safeSend method from Market (like so: MarketProtocol.send~) is thinks it is a bot).
* Fixes to the market offer class.
* Outfit window will no longer display the mount box if you are using protocol < 870.
* Added getFeature to playermount module.
* Added isMarketable and getMarketData to the lua binding.
* Added lua casts for MarketData.
* Fixed typo in the module manager.
* Added new 'light flat panel' for more variation (can change later) will require some graphics for market.
* Added new functions to table lib.
* Fixed some styling issues from previous commits.
This commit is contained in:
BeniS
2012-07-20 06:54:24 +12:00
parent 9dc88de6b0
commit 6293a49f8f
34 changed files with 744 additions and 99 deletions

View File

@@ -4,7 +4,7 @@ MarketOffer.__index = MarketOffer
local OFFER_TIMESTAMP = 1
local OFFER_COUNTER = 2
MarketOffer.new = function(offerId, action, itemId, amount, price, playerName, state)
MarketOffer.new = function(offerId, action, item, amount, price, playerName, state)
local offer = {
id = {},
action = nil,
@@ -26,7 +26,11 @@ MarketOffer.new = function(offerId, action, itemId, amount, price, playerName, s
end
offer.action = action
offer.item = itemId
if not item then
g_logger.error('MarketOffer.new - invalid item provided.')
end
offer.item = item
offer.amount = amount
offer.price = price
offer.player = playerName
@@ -67,8 +71,19 @@ function MarketOffer:getId()
return self.id
end
function MarketOffer:setAction(action)
if not action or type(action) ~= 'number' then
g_logger.error('MarketOffer.setItem - invalid action id provided.')
end
self.action = action
end
function MarketOffer:getAction()
return self.action
end
function MarketOffer:setItem(item)
if not item or type(item) ~= 'number' then
if not item or type(item) ~= 'userdata' then
g_logger.error('MarketOffer.setItem - invalid item id provided.')
end
self.item = item