fix: juju powers as consumables
This commit is contained in:
@@ -81,6 +81,18 @@ C.PROFESSION_TOOL_IDS = {
|
||||
[20824] = true, -- Simple Grinder
|
||||
}
|
||||
|
||||
-- Items classified as "Quest" by GetItemInfo but are actually consumables
|
||||
-- These get reclassified as "Consumable" for category view and sorting
|
||||
C.QUEST_CATEGORY_EXCLUSIONS = {
|
||||
[12450] = true, -- Juju Flurry
|
||||
[12451] = true, -- Juju Power
|
||||
[12455] = true, -- Juju Ember
|
||||
[12457] = true, -- Juju Chill
|
||||
[12458] = true, -- Juju Guile
|
||||
[12459] = true, -- Juju Escape
|
||||
[12460] = true, -- Juju Might
|
||||
}
|
||||
|
||||
-- Weapon subtypes that should NOT be marked as junk
|
||||
C.PROFESSION_TOOL_SUBTYPES = {
|
||||
["Fishing Pole"] = true,
|
||||
|
||||
@@ -172,6 +172,17 @@ local function DetectQuestItem(lines, itemData)
|
||||
local isQuestItem = false
|
||||
local isQuestStarter = false
|
||||
|
||||
-- Early exit: exclude known non-quest items misclassified by the API
|
||||
if itemData and itemData.link and addon.Constants and addon.Constants.QUEST_CATEGORY_EXCLUSIONS then
|
||||
local _, _, idStr = string.find(itemData.link, "item:(%d+)")
|
||||
if idStr then
|
||||
local id = tonumber(idStr)
|
||||
if id and addon.Constants.QUEST_CATEGORY_EXCLUSIONS[id] then
|
||||
return false, false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Check item category first
|
||||
if itemData and itemData.class == "Quest" then
|
||||
isQuestItem = true
|
||||
|
||||
@@ -841,6 +841,11 @@ function Utils:IsQuestItem(bagID, slotID, itemData, isOtherChar, isBank)
|
||||
end
|
||||
end
|
||||
|
||||
-- Early exit: exclude known non-quest items that the API misclassifies as "Quest"
|
||||
if itemID and addon.Constants and addon.Constants.QUEST_CATEGORY_EXCLUSIONS and addon.Constants.QUEST_CATEGORY_EXCLUSIONS[itemID] then
|
||||
return false, false
|
||||
end
|
||||
|
||||
-- Check if item is equipment (should not be classified as quest unless explicitly Quest category)
|
||||
local isEquipment = (itemCategory == "Weapon" or itemCategory == "Armor" or
|
||||
itemType == "Weapon" or itemType == "Armor")
|
||||
|
||||
Reference in New Issue
Block a user