diff options
author | QAston <qaston@gmail.com> | 2011-07-30 02:01:07 +0200 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-07-30 02:02:35 +0200 |
commit | 1df57ae522c03ba8fb296364998948eeedd33bee (patch) | |
tree | 5774c52110a5c8db75d881e8fe6e3b18ece8dcd7 /src | |
parent | 0cb2a95a04c4ba4e3f56894c389d5b71f475218e (diff) |
Core/Spells: Don't allow passive area auras to stack.
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Spells/Auras/SpellAuras.cpp | 13 | ||||
-rwxr-xr-x | src/server/game/Spells/Auras/SpellAuras.h | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 7dbf4a0f59c..45fbd8fa22f 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -856,6 +856,16 @@ void Aura::RefreshSpellMods() player->RestoreAllSpellMods(0, this); } +bool Aura::IsArea() const +{ + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + { + if (HasEffect(i) && GetSpellInfo()->Effects[i].IsAreaAuraEffect()) + return true; + } + return false; +} + bool Aura::IsPassive() const { return GetSpellInfo()->IsPassive(); @@ -1865,7 +1875,8 @@ bool Aura::CanStackWith(Aura const* existingAura) const // spell of same spell rank chain if (m_spellInfo->IsRankOf(existingSpellInfo)) { - if (m_spellInfo->IsMultiSlotAura()) + // don't allow passive area auras to stack + if (m_spellInfo->IsMultiSlotAura() && !IsArea()) return true; if (GetCastItemGUID() && existingAura->GetCastItemGUID()) if (GetCastItemGUID() != existingAura->GetCastItemGUID() && (m_spellInfo->AttributesCu & SPELL_ATTR0_CU_ENCHANT_PROC)) diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index 2a2a3e69b4f..b5385d193ea 100755 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -149,6 +149,7 @@ class Aura uint8 GetCasterLevel() const { return m_casterLevel; } + bool IsArea() const; bool IsPassive() const; bool IsDeathPersistent() const; bool IsRemovedOnShapeLost(Unit* target) const { return (GetCasterGUID() == target->GetGUID() && m_spellInfo->Stances && !(m_spellInfo->AttributesEx2 & SPELL_ATTR2_NOT_NEED_SHAPESHIFT) && !(m_spellInfo->Attributes & SPELL_ATTR0_NOT_SHAPESHIFT)); } |