mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
refactor(Core/World): Create WorldSessionMgr to split session logic out of World (#21400)
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include "SharedDefines.h"
|
||||
#include "SteadyTimer.h"
|
||||
#include "World.h"
|
||||
#include "WorldSessionMgr.h"
|
||||
#include "WorldSocket.h"
|
||||
#include "WorldSocketMgr.h"
|
||||
#include <boost/asio/signal_set.hpp>
|
||||
@@ -285,7 +286,7 @@ int main(int argc, char** argv)
|
||||
|
||||
sMetric->Initialize(realm.Name, *ioContext, []()
|
||||
{
|
||||
METRIC_VALUE("online_players", sWorld->GetPlayerCount());
|
||||
METRIC_VALUE("online_players", sWorldSessionMgr->GetPlayerCount());
|
||||
METRIC_VALUE("db_queue_login", uint64(LoginDatabase.QueueSize()));
|
||||
METRIC_VALUE("db_queue_character", uint64(CharacterDatabase.QueueSize()));
|
||||
METRIC_VALUE("db_queue_world", uint64(WorldDatabase.QueueSize()));
|
||||
@@ -357,8 +358,8 @@ int main(int argc, char** argv)
|
||||
|
||||
std::shared_ptr<void> sWorldSocketMgrHandle(nullptr, [](void*)
|
||||
{
|
||||
sWorld->KickAll(); // save and kick all players
|
||||
sWorld->UpdateSessions(1); // real players unload required UpdateSessions call
|
||||
sWorldSessionMgr->KickAll(); // save and kick all players
|
||||
sWorldSessionMgr->UpdateSessions(1); // real players unload required UpdateSessions call
|
||||
|
||||
sWorldSocketMgr.StopNetwork();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user