feat(Core/Hooks): Add OnPlayerJustDied hook (#17973)

feat(Core/Hooks): Add OnPlayerJustDied
This commit is contained in:
avarishd
2023-12-11 00:06:23 +02:00
committed by GitHub
parent af03611faf
commit f476c8a6c9
4 changed files with 14 additions and 0 deletions

View File

@@ -67,6 +67,14 @@ void ScriptMgr::OnBattlegroundDesertion(Player* player, BattlegroundDesertionTyp
});
}
void ScriptMgr::OnPlayerJustDied(Player* player)
{
ExecuteScript<PlayerScript>([&](PlayerScript* script)
{
script->OnPlayerJustDied(player);
});
}
void ScriptMgr::OnPlayerReleasedGhost(Player* player)
{
ExecuteScript<PlayerScript>([&](PlayerScript* script)

View File

@@ -29,6 +29,10 @@ protected:
PlayerScript(const char* name);
public:
// Called when a player dies
virtual void OnPlayerJustDied(Player* /*player*/) { }
// Called when clicking the release button
virtual void OnPlayerReleasedGhost(Player* /*player*/) { }
// Called on Send Initial Packets Before Add To Map