aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-08-23 14:27:35 +0200
committerQAston <qaston@gmail.com>2011-08-23 14:30:26 +0200
commite7468b2e2c17d12d9e8c171de73f698f5761f69a (patch)
tree77ed0255e18106aa2215191048784049fab455e4 /src
parent730f3cd7e9a0f189f79d521a7afbca24e9eeab9e (diff)
Core/Spells: Do not apply spellmods to spells with SPELL_ATTR3_NO_DONE_BONUS attribute.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Miscellaneous/SharedDefines.h4
-rw-r--r--src/server/game/Spells/SpellInfo.cpp8
-rw-r--r--src/server/game/Spells/SpellInfo.h1
3 files changed, 11 insertions, 2 deletions
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index b9c9c39028d..5e10a2c0fe4 100755
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -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
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 4c118942ac7..8b660d36a8d 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -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)
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index 637f8b5f381..b4fafa39b81 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -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;