TSMAPI extension + support for Vanity Item search (#14)
* GetItemPrice TSMAPI-Extension * Itemfilter Vanity Item Support * Rarity search extended up to heirloom * Rarity search extended up to heirloom
This commit is contained in:
@@ -420,7 +420,7 @@ local function GetItemSubClass(str, class)
|
||||
end
|
||||
|
||||
local function GetItemRarity(str)
|
||||
for i=0, 4 do
|
||||
for i=0, 7 do
|
||||
local text = _G["ITEM_QUALITY"..i.."_DESC"]
|
||||
if strlower(str) == strlower(text) then
|
||||
return i
|
||||
@@ -586,4 +586,4 @@ end
|
||||
|
||||
function Search:GetCurrentSearchMode()
|
||||
return private.mode
|
||||
end
|
||||
end
|
||||
|
||||
@@ -106,7 +106,7 @@ function private.Create(parent)
|
||||
-- row 6 - rarity
|
||||
y = y + 60
|
||||
local rarityList = {}
|
||||
for i = 1, 4 do tinsert(rarityList, _G["ITEM_QUALITY"..i.."_DESC"]) end
|
||||
for i = 1, 7 do tinsert(rarityList, _G["ITEM_QUALITY"..i.."_DESC"]) end
|
||||
local rarityDropdown = TSMAPI.GUI:CreateDropdown(frame, rarityList, "")
|
||||
rarityDropdown:SetLabel(L["Minimum Rarity"])
|
||||
rarityDropdown:SetPoint("TOPLEFT", 5, -y)
|
||||
@@ -236,4 +236,4 @@ end
|
||||
|
||||
do
|
||||
TSM:AddSidebarFeature(L["Custom Filter"], private.Create)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user