Skip to content

Commit

Permalink
Fix ItemType for Cata
Browse files Browse the repository at this point in the history
  • Loading branch information
doadin committed May 3, 2024
1 parent a677b36 commit cf6139a
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions src/filters/ItemType.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ local GetContainerItemID = _G.C_Container and _G.C_Container.GetContainerItemID
local GetItemInfoInstant = _G.GetItemInfoInstant

local GetAuctionItemSubClasses
if AddOn:IsClassicWow() or AddOn:IsTBCWow() or AddOn:IsWrathWow() then
if AddOn:IsClassicWow() or AddOn:IsTBCWow() or AddOn:IsWrathWow() or AddOn:IsCataWow() then
GetAuctionItemSubClasses = _G.GetAuctionItemSubClasses
end

Expand Down Expand Up @@ -128,6 +128,30 @@ if AddOn:IsWrathWow() then
}
end

if AddOn:IsCataWow() then
-- scanned Fri May 3 15:20:54 2024 - patch 4.4.0
ItemTypes = {
[0]="Consumable",
[1]="Container",
[2]="Weapon",
[3]="Gem",
[4]="Armor",
[5]="Reagent",
[6]="Projectile",
[7]="Trade Goods",
[8]="Generic(OBSOLETE)",
[9]="Recipe",
[10]="Money(OBSOLETE)",
[11]="Quiver",
[12]="Quest",
[13]="Key",
[14]="Permanent(OBSOLETE)",
[15]="Miscellaneous",
[16]="Glyph",
[18]="WoW Token"
}
end

--[[
local ItemTypes = {
["Weapon"] = {"One-Handed Axes", "Two-Handed Axes", "Bows", "Guns", "One-Handed Maces", "Two-Handed Maces", "Polearms", "One-Handed Swords", "Two-Handed Swords", "Staves", "Fist Weapons", "Miscellaneous", "Daggers", "Thrown", "Crossbows", "Wands", "Fishing Poles"},
Expand Down Expand Up @@ -221,7 +245,7 @@ AddOn:AddCustomRule("ItemType",
local tmp = {}
tmp.ALL = _G.ALL
if rule.itype and ItemTypes[rule.itype] then
if AddOn:IsClassicWow() or AddOn:IsTBCWow() or AddOn:IsWrathWow() then
if AddOn:IsClassicWow() or AddOn:IsTBCWow() or AddOn:IsWrathWow() or AddOn:IsCataWow() then
for _,k in pairs({GetAuctionItemSubClasses(rule.itype)}) do
tmp[tostring(k)] = GetItemSubClassInfo(rule.itype, k) or "UNKNOWN"
end
Expand Down

0 comments on commit cf6139a

Please sign in to comment.