refactor(Core/World): Create WorldSessionMgr to split session logic out of World (#21400)
This commit is contained in:
parent
0f0b341d9d
commit
edcfaeb845
32 changed files with 713 additions and 686 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue