mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
Detect bleeds authoritatively via Spell.dbc mechanics
Add a GetSpellSchool bleed check (Priority 0.5) backed by DBC SpellMechanic data instead of damage-event learning / name patterns: - GetSpellMechanicByID == 15 catches spell-level bleeds (Garrote, Rupture, Rend, Rip, Pounce, Deep Wounds). - New ClassicAPI GetSpellEffectMechanics catches effect-level bleeds that the spell-level field misses -- Rake is spell-level 0 with EffectMechanic[2]=15. Wrap C_Spell.GetSpellEffectMechanics in ClassicAPI.lua (nil-guarded so older builds fall back to spell-level only). Verified against the client Spell.dbc. Also drop Hemorrhage from the bleed name-pattern fallback: the DBC gives it no bleed mechanic (physical damage), so bleed-immune mobs don't resist it -- it was a false positive. Existing learning / split-damage / patterns remain as fallback.
This commit is contained in:
@@ -168,6 +168,19 @@ function API.GetSpellMechanicByID(spellID)
|
||||
return C_Spell.GetSpellMechanicByID(spellID)
|
||||
end
|
||||
|
||||
-- Per-effect SpellMechanic ids (Spell.dbc EffectMechanic[3]) as {m1, m2, m3},
|
||||
-- or nil for an invalid spell / 0 for an effect with no mechanic. Complements
|
||||
-- GetSpellMechanicByID, which only reads the spell-level Mechanic field: vanilla
|
||||
-- stores some mechanics on an effect instead (e.g. Rake's bleed is effect-level,
|
||||
-- so GetSpellMechanicByID returns 0 but this returns {0,15,0}). Nil-guarded so an
|
||||
-- older ClassicAPI build without the function degrades gracefully.
|
||||
function API.GetSpellEffectMechanics(spellID)
|
||||
if type(C_Spell.GetSpellEffectMechanics) == "function" then
|
||||
return C_Spell.GetSpellEffectMechanics(spellID)
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- State
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user