mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user