mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 00:23:48 +00:00
refactor(Core/World): Create WorldSessionMgr to split session logic out of World (#21400)
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "WaypointMovementGenerator.h"
|
||||
#include "World.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
|
||||
@@ -2818,7 +2819,7 @@ void Creature::SendZoneUnderAttackMessage(Player* attacker)
|
||||
{
|
||||
WorldPacket data(SMSG_ZONE_UNDER_ATTACK, 4);
|
||||
data << (uint32)GetAreaId();
|
||||
sWorld->SendGlobalMessage(&data, nullptr, (attacker->GetTeamId() == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE));
|
||||
sWorldSessionMgr->SendGlobalMessage(&data, nullptr, (attacker->GetTeamId() == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "WorldSessionMgr.h"
|
||||
#include "WorldState.h"
|
||||
#include <cmath>
|
||||
|
||||
@@ -363,7 +364,7 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
|
||||
|
||||
m_ControlledByPlayer = true;
|
||||
|
||||
sWorld->IncreasePlayerCount();
|
||||
sWorldSessionMgr->IncreasePlayerCount();
|
||||
|
||||
m_ChampioningFaction = 0;
|
||||
|
||||
@@ -447,7 +448,7 @@ Player::~Player()
|
||||
delete m_reputationMgr;
|
||||
delete _cinematicMgr;
|
||||
|
||||
sWorld->DecreasePlayerCount();
|
||||
sWorldSessionMgr->DecreasePlayerCount();
|
||||
|
||||
if (!m_isInSharedVisionOf.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user