fix(Core/Auras): Add SPELL_ATTR0_CU_ONLY_ONE_AREA_AURA (#19209)

https: //github.com/azerothcore/azerothcore-wotlk/pull/19208

Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com>
This commit is contained in:
avarishd
2024-06-28 11:23:38 +03:00
committed by GitHub
parent c28a0973a2
commit 5b2a088da0
3 changed files with 20 additions and 20 deletions

View File

@@ -658,9 +658,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
if ((itr->second & (1 << effIndex)) && itr->first->IsImmunedToSpellEffect(GetSpellInfo(), effIndex))
itr->second &= ~(1 << effIndex);
}
if (!itr->second
|| itr->first->IsImmunedToSpell(GetSpellInfo())
|| !CanBeAppliedOn(itr->first))
if (!itr->second || itr->first->IsImmunedToSpell(GetSpellInfo()) || !CanBeAppliedOn(itr->first))
addUnit = false;
if (addUnit)
@@ -671,21 +669,9 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
if (itr->first->IsInFlight())
addUnit = false;
switch( GetId() )
{
case 62821: // Ulduar, Hodir, Toasty Fire
case 62807: // Ulduar, Hodir, Starlight
case 51103: // Oculus, Mage-Lord Urom, Frostbomb
case 69146:
case 70823:
case 70824:
case 70825: // Icecrown Citadel, Lord Marrowgar, Coldflame
{
if( itr->first->HasAura(GetId()) )
addUnit = false;
}
break;
}
// Allow only 1 persistent area aura to affect our targets if a custom flag is set.
if (itr->first->HasAura(GetId()) && GetSpellInfo()->HasAttribute(SPELL_ATTR0_CU_ONLY_ONE_AREA_AURA))
addUnit = false;
}
// unit auras can not stack with each other
else // (GetType() == UNIT_AURA_TYPE)