diff options
Diffstat (limited to 'src/game/SpellMgr.h')
| -rw-r--r-- | src/game/SpellMgr.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index d8dd6bfc471..1f6101c6114 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -429,10 +429,9 @@ inline bool isSpellBreakStealth(SpellEntry const* spellInfo) inline bool IsAutoRepeatRangedSpell(SpellEntry const* spellInfo) { - return (spellInfo->Attributes & SPELL_ATTR_RANGED) && (spellInfo->AttributesEx2 == 0x000020 /*autorepeat*/); + return (spellInfo->Attributes & SPELL_ATTR_RANGED) && (spellInfo->AttributesEx2 & SPELL_ATTR_EX2_AUTOREPEAT_FLAG); } - uint8 GetErrorAtShapeshiftedCast (SpellEntry const *spellInfo, uint32 form); inline bool IsChanneledSpell(SpellEntry const* spellInfo) @@ -460,6 +459,17 @@ inline uint32 GetSpellMechanicMask(SpellEntry const* spellInfo, int32 effect) return mask; } +inline uint32 GetAllSpellMechanicMask(SpellEntry const* spellInfo) +{ + uint32 mask = 0; + if (spellInfo->Mechanic) + mask |= 1<<spellInfo->Mechanic; + for (int i=0; i< 3; ++i) + if (spellInfo->EffectMechanic[i]) + mask |= 1<<spellInfo->EffectMechanic[i]; + return mask; +} + inline Mechanics GetEffectMechanic(SpellEntry const* spellInfo, int32 effect) { if (spellInfo->EffectMechanic[effect]) |
