Core/Spells: Fix passive auras stacking logic after recent changes.
Closes #2417
This commit is contained in:
@@ -1771,8 +1771,8 @@ bool Aura::CanStackWith(Aura const* existingAura) const
|
|||||||
SpellInfo const* existingSpellInfo = existingAura->GetSpellInfo();
|
SpellInfo const* existingSpellInfo = existingAura->GetSpellInfo();
|
||||||
bool sameCaster = GetCasterGUID() == existingAura->GetCasterGUID();
|
bool sameCaster = GetCasterGUID() == existingAura->GetCasterGUID();
|
||||||
|
|
||||||
// passive auras don't stack when cast by different casters, or with another rank of the spell
|
// passive auras don't stack with another rank of the spell cast by same caster
|
||||||
if (IsPassive() && (!sameCaster || !m_spellInfo->IsDifferentRankOf(existingSpellInfo)))
|
if (IsPassive() && sameCaster && m_spellInfo->IsDifferentRankOf(existingSpellInfo))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||||
|
|||||||
@@ -803,7 +803,7 @@ bool SpellInfo::CanBeUsedInCombat() const
|
|||||||
|
|
||||||
bool SpellInfo::IsPositive() const
|
bool SpellInfo::IsPositive() const
|
||||||
{
|
{
|
||||||
return AttributesCu & SPELL_ATTR0_CU_NEGATIVE;
|
return !(AttributesCu & SPELL_ATTR0_CU_NEGATIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SpellInfo::IsPositiveEffect(uint8 effIndex) const
|
bool SpellInfo::IsPositiveEffect(uint8 effIndex) const
|
||||||
|
|||||||
Reference in New Issue
Block a user