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

@@ -579,6 +579,9 @@ void WorldSession::LogoutPlayer(bool save)
if (_player)
{
//! Call script hook before other logout events
sScriptMgr->OnBeforePlayerLogout(_player);
if (ObjectGuid lguid = _player->GetLootGUID())
DoLootRelease(lguid);