mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 08:06:23 +00:00
playerbot logout
This commit is contained in:
@@ -2759,6 +2759,7 @@ void World::_UpdateGameTime()
|
|||||||
void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode, const std::string& reason)
|
void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode, const std::string& reason)
|
||||||
{
|
{
|
||||||
// ignore if server shutdown at next tick
|
// ignore if server shutdown at next tick
|
||||||
|
|
||||||
if (IsStopped())
|
if (IsStopped())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -2779,6 +2780,9 @@ void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode, const std:
|
|||||||
{
|
{
|
||||||
playersSaveScheduler.Schedule(Seconds(time - 5), [this](TaskContext /*context*/)
|
playersSaveScheduler.Schedule(Seconds(time - 5), [this](TaskContext /*context*/)
|
||||||
{
|
{
|
||||||
|
#ifdef MOD_PLAYERBOTS
|
||||||
|
sScriptMgr->OnPlayerbotLogoutBots();
|
||||||
|
#endif
|
||||||
if (!GetActiveSessionCount())
|
if (!GetActiveSessionCount())
|
||||||
{
|
{
|
||||||
LOG_INFO("server", "> No players online. Skip save before shutdown");
|
LOG_INFO("server", "> No players online. Skip save before shutdown");
|
||||||
@@ -2807,8 +2811,6 @@ void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode, const std:
|
|||||||
ShutdownMsg(true, nullptr, reason);
|
ShutdownMsg(true, nullptr, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
sScriptMgr->OnPlayerbotLogoutBots();
|
|
||||||
|
|
||||||
sScriptMgr->OnShutdownInitiate(ShutdownExitCode(exitcode), ShutdownMask(options));
|
sScriptMgr->OnShutdownInitiate(ShutdownExitCode(exitcode), ShutdownMask(options));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user