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

@@ -0,0 +1,13 @@
--
DELETE FROM `spell_custom_attr` WHERE `spell_id` IN (33802,38609,31943,62821,62807,51103,69146,70823,70824,70825);
INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES
(33802, 536870912),
(38609, 536870912),
(31943, 536870912),
(62821, 536870912),
(62807, 536870912),
(51103, 536870912),
(69146, 536870912),
(70823, 536870912),
(70824, 536870912),
(70825, 536870912);

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)

View File

@@ -195,7 +195,7 @@ enum SpellCustomAttributes
SPELL_ATTR0_CU_NEEDS_AMMO_DATA = 0x00080000,
SPELL_ATTR0_CU_BINARY_SPELL = 0x00100000,
SPELL_ATTR0_CU_NO_POSITIVE_TAKEN_BONUS = 0x00200000,
SPELL_ATTR0_CU_SINGLE_AURA_STACK = 0x00400000, // pussywizard
SPELL_ATTR0_CU_SINGLE_AURA_STACK = 0x00400000,
SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC = 0x00800000,
SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED = 0x01000000,
SPELL_ATTR0_CU_POSITIVE_EFF0 = 0x02000000,
@@ -203,7 +203,8 @@ enum SpellCustomAttributes
SPELL_ATTR0_CU_POSITIVE_EFF2 = 0x08000000,
SPELL_ATTR0_CU_FORCE_SEND_CATEGORY_COOLDOWNS = 0x10000000,
SPELL_ATTR0_CU_FORCE_AURA_SAVING = 0x20000800,
SPELL_ATTR0_CU_ENCOUNTER_REWARD = 0x40000000, // pussywizard
SPELL_ATTR0_CU_ONLY_ONE_AREA_AURA = 0x20000000,
SPELL_ATTR0_CU_ENCOUNTER_REWARD = 0x40000000,
SPELL_ATTR0_CU_BYPASS_MECHANIC_IMMUNITY = 0x80000000,
SPELL_ATTR0_CU_NEGATIVE = SPELL_ATTR0_CU_NEGATIVE_EFF0 | SPELL_ATTR0_CU_NEGATIVE_EFF1 | SPELL_ATTR0_CU_NEGATIVE_EFF2,