Core/Auras: Corrected implementation of dungeon encounter related interrupt flags

Port From (https://github.com/TrinityCore/TrinityCore/commit/e4e6eccdf592cd0760c780d485c439f121e06d4c)
This commit is contained in:
Hondacrx
2024-08-25 00:29:19 -04:00
parent 993a5f7e8a
commit 665d7ac140
2 changed files with 24 additions and 19 deletions
+12 -7
View File
@@ -613,15 +613,20 @@ namespace Game.Entities
public void AtStartOfEncounter(EncounterType type)
{
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfEncounter);
switch (type)
{
case EncounterType.DungeonEncounter:
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfDungeonEncounter);
if (GetMap().IsRaid())
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfRaidEncounterAndStartOfMythicPlus);
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfEncounter);
break;
case EncounterType.MythicPlusRun:
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfMythicPlusRun);
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfRaidEncounterAndStartOfMythicPlus);
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.EndOfRaidEncounterAndStartOfMythicPlus);
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.ChallengeModeStart);
break;
case EncounterType.Battleground:
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfRaidEncounterAndStartOfMythicPlus);
break;
default:
break;
@@ -633,12 +638,12 @@ namespace Game.Entities
public void AtEndOfEncounter(EncounterType type)
{
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.EndOfEncounter);
switch (type)
{
case EncounterType.DungeonEncounter:
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.EndOfDungeonEncounter);
if (GetMap().IsRaid())
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.EndOfRaidEncounterAndStartOfMythicPlus);
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.EndOfEncounter);
break;
default:
break;