diff --git a/Conditionals.lua b/Conditionals.lua index 8d9ede4..d86ed0f 100644 --- a/Conditionals.lua +++ b/Conditionals.lua @@ -3154,6 +3154,11 @@ function CleveRoids.ValidateUnitDebuff(unit, args) local isSimpleExistenceCheck = not args.operator and not args.amount if not found and CleveRoids.hasSuperwow and isSimpleExistenceCheck then + -- FALLBACK: Only scan for SHARED debuffs (Sunder, Faerie Fire, etc.) + -- Personal debuffs (Rip, Rake, Rupture, etc.) MUST be in tracking table + -- to be considered "found" - this ensures [nodebuff] only finds YOUR debuffs + -- after /reload when tracking is cleared. + -- Scan debuff slots for i = 1, 16 do local tex, debuffStacks, _, debuffSpellID = UnitDebuff(unit, i) @@ -3163,13 +3168,18 @@ function CleveRoids.ValidateUnitDebuff(unit, args) -- PERFORMANCE: Use cached spell name lookup local baseName, fullName = GetSpellNames(debuffSpellID) if baseName and (baseName == args.name or fullName == args.name) then - found = true - texture = tex - stacks = debuffStacks or 0 - spellID = debuffSpellID - -- No duration tracking for shared debuffs - remaining = nil - break + -- IMPORTANT: Only use fallback for SHARED debuffs + -- Personal debuffs must come from tracking table (caster check) + local isShared = lib and lib.IsPersonalDebuff and lib:IsPersonalDebuff(debuffSpellID) == false + if isShared then + found = true + texture = tex + stacks = debuffStacks or 0 + spellID = debuffSpellID + -- No duration tracking for shared debuffs + remaining = nil + break + end end end end @@ -3184,12 +3194,16 @@ function CleveRoids.ValidateUnitDebuff(unit, args) -- PERFORMANCE: Use cached spell name lookup local baseName, fullName = GetSpellNames(buffSpellID) if baseName and (baseName == args.name or fullName == args.name) then - found = true - texture = tex - stacks = buffStacks or 0 - spellID = buffSpellID - remaining = nil - break + -- IMPORTANT: Only use fallback for SHARED debuffs + local isShared = lib and lib.IsPersonalDebuff and lib:IsPersonalDebuff(buffSpellID) == false + if isShared then + found = true + texture = tex + stacks = buffStacks or 0 + spellID = buffSpellID + remaining = nil + break + end end end end diff --git a/Utility.lua b/Utility.lua index a0268e2..fddb3f2 100644 --- a/Utility.lua +++ b/Utility.lua @@ -4955,9 +4955,9 @@ local SPLIT_DAMAGE_SPELLS = { -- Format: ["Spell Name"] = "school" (without rank) local KNOWN_NON_DAMAGING_SPELLS = { -- Druid - ["Faerie Fire"] = "arcane", - ["Faerie Fire (Feral)"] = "arcane", - ["Faerie Fire (Bear)"] = "arcane", + ["Faerie Fire"] = "nature", + ["Faerie Fire (Feral)"] = "nature", + ["Faerie Fire (Bear)"] = "nature", ["Moonfire"] = "arcane", -- Initial hit deals damage, but debuff is arcane ["Insect Swarm"] = "nature", ["Abolish Poison"] = "nature", @@ -5270,11 +5270,15 @@ local function GetSpellSchool(spellName, spellID) string.find(lower, "hemorrhage") or string.find(lower, "pounce") then school = "bleed" - -- Arcane (check before "fire" to catch "Faerie Fire" and similar) + -- Arcane elseif string.find(lower, "arcane") or string.find(lower, "polymorph") or - string.find(lower, "faerie") or string.find(lower, "mana burn") then + string.find(lower, "mana burn") then school = "arcane" + -- Nature: Faerie Fire (check before "fire" to avoid false positive) + elseif string.find(lower, "faerie") then + school = "nature" + -- Fire (specific patterns to avoid false positives) elseif string.find(lower, "^fire") or string.find(lower, " fire") or -- Starts with or contains " fire" string.find(lower, "flame") or string.find(lower, "immolat") or