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

This commit is contained in:
Shauren
2024-05-22 16:35:43 +02:00
parent 5f5871708f
commit e4e6eccdf5
2 changed files with 38 additions and 33 deletions

View File

@@ -538,15 +538,20 @@ void Unit::MonsterMoveWithSpeed(float x, float y, float z, float speed, bool gen
void Unit::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;
@@ -558,12 +563,12 @@ void Unit::AtStartOfEncounter(EncounterType type)
void Unit::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;