Market item filtering improvements and other some minor improvements

* Can now filter market items by vocation, level, slot type, and depot items.
* Added new bitwise lib for handling flag operations.
* Can now get/set local player vocation/premium (TODO: spell list).
This commit is contained in:
BeniS
2012-07-24 03:11:53 +12:00
parent dc8ef845ab
commit 19dd96fd02
21 changed files with 369 additions and 116 deletions

View File

@@ -37,8 +37,9 @@ end
-- parsing protocols
local function parseMarketEnter(msg)
local balance = msg:getU32()
local vocation = -1
if g_game.getProtocolVersion() < 950 then
msg:getU8() -- get vocation id
vocation = msg:getU8() -- get vocation id
end
local offers = msg:getU8()
local depotItems = {}
@@ -51,7 +52,7 @@ local function parseMarketEnter(msg)
table.insert(depotItems, {itemId, itemCount})
end
signalcall(Market.onMarketEnter, depotItems, offers, balance)
signalcall(Market.onMarketEnter, depotItems, offers, balance, vocation)
return true
end