more progress on the new search tab

This commit is contained in:
Manuel Simon Hirsig
2016-01-31 01:07:29 +01:00
parent 22e94ea73f
commit 29e37a93ca
5 changed files with 273 additions and 191 deletions
+11 -3
View File
@@ -391,7 +391,7 @@ end
function Aux.item_class_index(item_class)
for i, class in ipairs({ GetAuctionItemClasses() }) do
if strlower(class) == strlower(item_class) then
if strupper(class) == strupper(item_class) then
return i
end
end
@@ -399,16 +399,24 @@ end
function Aux.item_subclass_index(class_index, item_subclass)
for i, subclass in ipairs({ GetAuctionItemSubClasses(class_index) }) do
if strlower(subclass) == strlower(item_subclass) then
if strupper(subclass) == strupper(item_subclass) then
return i
end
end
end
function Aux.item_slot(class_index, subclass_index, slot_name)
for _, slot in ipairs({ GetAuctionInvTypes(class_index, subclass_index) }) do
if strupper(getglobal(slot)) == strupper(slot_name) then
return slot
end
end
end
function Aux.item_quality_index(item_quality)
for i=0,4 do
local quality = getglobal('ITEM_QUALITY'..i..'_DESC')
if strlower(item_quality) == strlower(quality) then
if strupper(item_quality) == strupper(quality) then
return i
end
end