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:
parent
a1891d8d8f
commit
4321b8a4de
4 changed files with 15 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue