feat(Core/Scripting): Implement new hook OnBeforePlayerLogout() (#18163)

* new hook OnPlayerPreLogout

* Changed PreLogout to BeforeLogout per review

* Renamed OnPlayerBeforeLogout to OnBeforePlayerLogout per review

---------

Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
This commit is contained in:
Nathan Handley
2024-01-13 17:10:49 -06:00
committed by GitHub
parent a1891d8d8f
commit 4321b8a4de
4 changed files with 15 additions and 0 deletions

View File

@@ -361,6 +361,14 @@ void ScriptMgr::OnPlayerLoadFromDB(Player* player)
});
}
void ScriptMgr::OnBeforePlayerLogout(Player* player)
{
ExecuteScript<PlayerScript>([&](PlayerScript* script)
{
script->OnBeforeLogout(player);
});
}
void ScriptMgr::OnPlayerLogout(Player* player)
{
ExecuteScript<PlayerScript>([&](PlayerScript* script)