mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 12:34:55 +02:00
More market work (getting close to completion)
* Can now create market offers with fully working UI. * All filtering is now completed (just need to finish word searching). * Added some user friendly features to offer selections and item displays (show amount in depot). * Some more UI ascetics. * Some other minor market fixes. TODO: * Finishing applying changes for latest module updates by edubart. * Finish buying/selling existing offers. * Word searching items. * Offer management. * Full cipsoft tibia testing.
This commit is contained in:
@@ -46,15 +46,15 @@ MarketOffer.new = function(offerId, action, item, amount, price, playerName, sta
|
||||
return offer
|
||||
end
|
||||
|
||||
function MarketOffer:isEqual(offer)
|
||||
return self.offer[OFFER_TIMESTAMP] == offer[OFFER_TIMESTAMP] and self.offer[OFFER_COUNTER] == offer[OFFER_COUNTER]
|
||||
function MarketOffer:isEqual(id)
|
||||
return self.id[OFFER_TIMESTAMP] == id[OFFER_TIMESTAMP] and self.id[OFFER_COUNTER] == id[OFFER_COUNTER]
|
||||
end
|
||||
|
||||
function MarketOffer:isLessThan(offer)
|
||||
return self.offer[OFFER_TIMESTAMP] <= offer[OFFER_TIMESTAMP] and self.offer[OFFER_COUNTER] < offer[OFFER_COUNTER]
|
||||
function MarketOffer:isLessThan(id)
|
||||
return self.id[OFFER_TIMESTAMP] <= id[OFFER_TIMESTAMP] and self.id[OFFER_COUNTER] < id[OFFER_COUNTER]
|
||||
end
|
||||
|
||||
function MarketOffer:isNull(offer)
|
||||
function MarketOffer:isNull()
|
||||
return table.empty(self.id)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user