Skip to content

Commit

Permalink
[Baggins-Filtering] Fix Use of AH API
Browse files Browse the repository at this point in the history
recent retail changed api
  • Loading branch information
doadin committed Feb 15, 2020
1 parent bd76f92 commit adc2cb4
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions Baggins-Filtering.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ if not Baggins:IsClassicWow() then
local GetEquipmentSetInfo, GetEquipmentSetItemIDs, GetNumEquipmentSets =
_G.GetEquipmentSetInfo, _G.GetEquipmentSetItemIDs, _G.GetNumEquipmentSets
end
local GetItemInfoInstant, GetItemClassInfo, GetItemSubClassInfo, GetAuctionItemSubClasses =
_G.GetItemInfoInstant, _G.GetItemClassInfo, _G.GetItemSubClassInfo, _G.GetAuctionItemSubClasses
local GetItemInfoInstant, GetItemClassInfo, GetItemSubClassInfo =
_G.GetItemInfoInstant, _G.GetItemClassInfo, _G.GetItemSubClassInfo
if Baggins:IsClassicWow() then
GetAuctionItemSubClasses = _G.GetAuctionItemSubClasses
else
GetAuctionItemSubClasses = _G.C_AuctionHouse.GetAuctionItemSubClasses
end
local UnitLevel = _G.UnitLevel
local C_PetJournal = _G.C_PetJournal
local C_Item, ItemLocation = _G.C_Item, _G.ItemLocation
Expand Down Expand Up @@ -730,9 +735,15 @@ Baggins:AddCustomRule("ItemType", {
local tmp = {}
tmp.ALL = _G.ALL
if rule.itype and ItemTypes[rule.itype] then
for _,k in pairs({GetAuctionItemSubClasses(rule.itype)}) do
tmp[tostring(k)] = GetItemSubClassInfo(rule.itype, k) or UNKNOWN
end
if Baggins:IsClassicWow() then
for _,k in pairs({GetAuctionItemSubClasses(rule.itype)}) do
tmp[tostring(k)] = GetItemSubClassInfo(rule.itype, k) or UNKNOWN
end
else
for _,k in pairs(GetAuctionItemSubClasses(rule.itype)) do
tmp[tostring(k)] = GetItemSubClassInfo(rule.itype, k) or UNKNOWN
end
end
end
return tmp
end,
Expand Down

0 comments on commit adc2cb4

Please sign in to comment.