mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user