refactor(Core/World): Create WorldSessionMgr to split session logic out of World (#21400)

This commit is contained in:
Takenbacon
2025-02-12 22:04:38 -08:00
committed by GitHub
parent 0f0b341d9d
commit edcfaeb845
32 changed files with 713 additions and 686 deletions

View File

@@ -31,6 +31,7 @@
#include "ObjectMgr.h"
#include "Transport.h"
#include "WorldPacket.h"
#include "WorldSessionMgr.h"
/// @todo: this import is not necessary for compilation and marked as unused by the IDE
// however, for some reasons removing it would cause a damn linking issue
@@ -143,7 +144,7 @@ bool Battlefield::Update(uint32 diff)
{
if (m_Timer <= diff)
{
if (!IsEnabled() || (!IsWarTime() && sWorld->GetActiveSessionCount() > 3500)) // if WG is disabled or there is more than 3500 connections, switch automaticly
if (!IsEnabled() || (!IsWarTime() && sWorldSessionMgr->GetActiveSessionCount() > 3500)) // if WG is disabled or there is more than 3500 connections, switch automaticly
{
m_isActive = true;
EndBattle(false);