mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 14:03:26 +02:00
Market my offers
This commit is contained in:
@@ -29,11 +29,12 @@ local function readMarketOffer(msg, action, var)
|
||||
local state = MarketOfferState.Active
|
||||
if var == MarketRequest.MyHistory then
|
||||
state = msg:getU8()
|
||||
elseif var == MarketRequest.MyOffers then
|
||||
else
|
||||
playerName = msg:getString()
|
||||
end
|
||||
|
||||
return MarketOffer.new({timestamp, counter}, action, Item.create(itemId), amount, price, playerName, state)
|
||||
return MarketOffer.new({timestamp, counter}, action, Item.create(itemId), amount, price, playerName, state, var)
|
||||
end
|
||||
|
||||
-- parsing protocols
|
||||
@@ -201,6 +202,10 @@ function MarketProtocol.sendMarketBrowse(browseId)
|
||||
end
|
||||
end
|
||||
|
||||
function MarketProtocol.sendMarketBrowseMyOffers()
|
||||
MarketProtocol.sendMarketBrowse(MarketRequest.MyOffers)
|
||||
end
|
||||
|
||||
function MarketProtocol.sendMarketCreateOffer(type, spriteId, amount, price, anonymous)
|
||||
if g_game.getFeature(GamePlayerMarket) then
|
||||
local msg = OutputMessage.create()
|
||||
|
Reference in New Issue
Block a user