mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/Spells: Don't allow passive area auras to stack.
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)); }
|
||||
|
||||
Reference in New Issue
Block a user