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

@@ -34,7 +34,20 @@ function debugContainersItems()
function UIItem:onHoverChange(hovered)
if hovered then
local item = self:getItem()
if item then g_tooltip.display(item:getId()) end
if item then
local texts = {
'id: '..item:getId(),
'\nstackable: '..tostring(item:isStackable()),
'\nmarketable: '..tostring(item:isMarketable()),
'\nvocation: '..(item:getMarketData() and item:getMarketData().restrictVocation or 'none'),
'\ncloth slot: '..item:getClothSlot()
}
local text = ''
for _, str in pairs(texts) do
text = text..str
end
g_tooltip.display(text)
end
else
g_tooltip.hide()
end