mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Auras: Implement SpellAuraInterruptFlags2::EndOfEncounter (#28939)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -912,6 +912,8 @@ void Battleground::RemovePlayerAtLeave(ObjectGuid guid, bool Transport, bool Sen
|
||||
player->RemoveAura(SPELL_MERCENARY_SHAPESHIFT);
|
||||
player->RemovePlayerFlagEx(PLAYER_FLAGS_EX_MERCENARY_MODE);
|
||||
|
||||
player->AtEndOfEncounter();
|
||||
|
||||
player->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2::LeaveArenaOrBattleground);
|
||||
|
||||
if (!player->IsAlive()) // resurrect on exit
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -124,8 +124,8 @@ enum class SpellAuraInterruptFlags2 : uint32
|
||||
Jump = 0x00000020,
|
||||
ChangeSpec = 0x00000040,
|
||||
AbandonVehicle = 0x00000080, // Implemented in Unit::_ExitVehicle
|
||||
StartOfEncounter = 0x00000100, // Implemented in InstanceScript::SetBossState and Battleground::_ProcessJoin
|
||||
EndOfEncounter = 0x00000200, // NYI
|
||||
StartOfEncounter = 0x00000100, // Implemented in Unit::AtStartOfEncounter
|
||||
EndOfEncounter = 0x00000200, // Implemented in Unit::AtEndOfEncounter
|
||||
Disconnect = 0x00000400, // NYI
|
||||
EnteringInstance = 0x00000800, // Implemented in Map::AddPlayerToMap
|
||||
DuelEnd = 0x00001000, // Implemented in Player::DuelComplete
|
||||
|
||||
Reference in New Issue
Block a user