Skip to content

Commit

Permalink
fix(Core/Spells): SPELL_ATTR1_IMMUNITY_PURGES_EFFECT should not remov… (
Browse files Browse the repository at this point in the history
azerothcore#20032)

fix(Core/Spells): SPELL_ATTR1_IMMUNITY_PURGES_EFFECT should not remove spells with no immunities
  • Loading branch information
Nyeriah authored Oct 18, 2024
1 parent 4c6cb4f commit 572be7d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5122,6 +5122,9 @@ void Unit::RemoveAurasByType(AuraType auraType, ObjectGuid casterGUID, Aura* exc
if (aura != except && (!casterGUID || aura->GetCasterGUID() == casterGUID)
&& ((negative && !aurApp->IsPositive()) || (positive && aurApp->IsPositive())))
{
if (aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
continue;

uint32 removedAuras = m_removedAurasCount;
RemoveAura(aurApp);
if (m_removedAurasCount > removedAuras + 1)
Expand Down Expand Up @@ -5257,11 +5260,12 @@ void Unit::RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemo
Aura const* aura = iter->second->GetBase();
if (!except || aura->GetId() != except)
{
if (aura->GetSpellInfo()->GetAllEffectsMechanicMask() & mechanic_mask)
{
RemoveAura(iter, removemode);
continue;
}
if (!aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
if (aura->GetSpellInfo()->GetAllEffectsMechanicMask() & mechanic_mask)
{
RemoveAura(iter, removemode);
continue;
}
}
++iter;
}
Expand Down

0 comments on commit 572be7d

Please sign in to comment.