mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
refactor(Core/World): Create WorldSessionMgr to split session logic out of World (#21400)
This commit is contained in:
@@ -387,8 +387,8 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
|
||||
}
|
||||
case TEXT_RANGE_WORLD:
|
||||
{
|
||||
SessionMap const& smap = sWorld->GetAllSessions();
|
||||
for (SessionMap::const_iterator itr = smap.begin(); itr != smap.end(); ++itr)
|
||||
WorldSessionMgr::SessionMap const& sessionMap = sWorldSessionMgr->GetAllSessions();
|
||||
for (WorldSessionMgr::SessionMap::const_iterator itr = sessionMap.begin(); itr != sessionMap.end(); ++itr)
|
||||
if (Player* player = itr->second->GetPlayer())
|
||||
if ((teamId == TEAM_NEUTRAL || player->GetTeamId() == teamId) && (!gmOnly || player->IsGameMaster()))
|
||||
player->GetSession()->SendPacket(data);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "WorldSession.h"
|
||||
#include "WorldSessionMgr.h"
|
||||
|
||||
enum CreatureTextRange
|
||||
{
|
||||
@@ -232,8 +233,8 @@ void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder
|
||||
}
|
||||
case TEXT_RANGE_WORLD:
|
||||
{
|
||||
SessionMap const& smap = sWorld->GetAllSessions();
|
||||
for (SessionMap::const_iterator itr = smap.begin(); itr != smap.end(); ++itr)
|
||||
WorldSessionMgr::SessionMap const& smap = sWorldSessionMgr->GetAllSessions();
|
||||
for (WorldSessionMgr::SessionMap::const_iterator itr = smap.begin(); itr != smap.end(); ++itr)
|
||||
if (Player* player = itr->second->GetPlayer())
|
||||
if ((teamId == TEAM_NEUTRAL || player->GetTeamId() == teamId) && (!gmOnly || player->IsGameMaster()))
|
||||
localizer(player);
|
||||
|
||||
Reference in New Issue
Block a user