Core/Spells: Do not apply spellmods to spells with SPELL_ATTR3_NO_DONE_BONUS attribute.

This commit is contained in:
QAston
2011-08-23 14:30:26 +02:00
parent 730f3cd7e9
commit e7468b2e2c
3 changed files with 11 additions and 2 deletions
+8
View File
@@ -1156,8 +1156,16 @@ bool SpellInfo::IsAutoRepeatRangedSpell() const
return AttributesEx2 & SPELL_ATTR2_AUTOREPEAT_FLAG;
}
bool SpellInfo::IsAffectedBySpellMods() const
{
return !(AttributesEx3 & SPELL_ATTR3_NO_DONE_BONUS);
}
bool SpellInfo::IsAffectedBySpellMod(SpellModifier* mod) const
{
if (!IsAffectedBySpellMods())
return false;
SpellInfo const* affectSpell = sSpellMgr->GetSpellInfo(mod->spellId);
// False if affect_spell == NULL or spellFamily not equal
if (!affectSpell || affectSpell->SpellFamilyName != SpellFamilyName)
+1
View File
@@ -392,6 +392,7 @@ public:
bool IsRangedWeaponSpell() const;
bool IsAutoRepeatRangedSpell() const;
bool IsAffectedBySpellMods() const;
bool IsAffectedBySpellMod(SpellModifier* mod) const;
bool CanPierceImmuneAura(SpellInfo const* aura) const;