Core/Auras: Implement SpellAuraInterruptFlags2::EndOfEncounter (#28939)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
Teleqraph
2023-05-06 21:03:00 +02:00
committed by GitHub
parent 15135ce16f
commit 998ee363c5
3 changed files with 18 additions and 2 deletions

View File

@@ -414,10 +414,18 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
break;
}
case FAIL:
{
ResetCombatResurrections();
SendEncounterEnd();
instance->DoOnPlayers([](Player* player)
{
player->AtEndOfEncounter();
});
break;
}
case DONE:
{
ResetCombatResurrections();
SendEncounterEnd();
dungeonEncounter = bossInfo->GetDungeonEncounterForDifficulty(instance->GetDifficultyID());
@@ -426,7 +434,13 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
DoUpdateCriteria(CriteriaType::DefeatDungeonEncounter, dungeonEncounter->ID);
SendBossKillCredit(dungeonEncounter->ID);
}
instance->DoOnPlayers([](Player* player)
{
player->AtEndOfEncounter();
});
break;
}
default:
break;
}