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
@@ -400,7 +400,7 @@ enum SpellAttr3
SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED = 0x04000000, // 26 auras with this attribute can proc from triggered spell casts with SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 (67736 + 52999)
SPELL_ATTR3_DRAIN_SOUL = 0x08000000, // 27 only drain soul has this flag
SPELL_ATTR3_UNK28 = 0x10000000, // 28
SPELL_ATTR3_NO_DONE_BONUS = 0x20000000, // 29 Ignore caster spellpower and done damage mods?
SPELL_ATTR3_NO_DONE_BONUS = 0x20000000, // 29 Ignore caster spellpower and done damage mods? client doesn't apply spellmods for those spells
SPELL_ATTR3_DONT_DISPLAY_RANGE = 0x40000000, // 30 client doesn't display range in tooltip for those spells
SPELL_ATTR3_UNK31 = 0x80000000 // 31
};
@@ -510,7 +510,7 @@ enum SpellAttr6
SPELL_ATTR6_UNK28 = 0x10000000, // 28
SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS = 0x20000000, // 29 ignores done percent damage mods?
SPELL_ATTR6_UNK30 = 0x40000000, // 30
SPELL_ATTR6_UNK31 = 0x80000000 // 31
SPELL_ATTR6_UNK31 = 0x80000000 // 31 some special cooldown calc?
};
enum SpellAttr7
+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;