TrinityCore
ChannelMgr Class Reference

#include <ChannelMgr.h>

Public Member Functions

 ChannelMgr (ChannelMgr const &right)=delete
 
 ChannelMgr (ChannelMgr &&right)=delete
 
ChannelMgroperator= (ChannelMgr const &right)=delete
 
ChannelMgroperator= (ChannelMgr &&right)=delete
 
void SaveToDB ()
 
ChannelGetSystemChannel (uint32 channelId, AreaTableEntry const *zoneEntry=nullptr)
 
ChannelCreateCustomChannel (std::string const &name)
 
ChannelGetCustomChannel (std::string const &name) const
 
ChannelGetChannel (uint32 channelId, std::string const &name, Player *player, bool notify=true, AreaTableEntry const *zoneEntry=nullptr) const
 
void LeftChannel (uint32 channelId, AreaTableEntry const *zoneEntry)
 

Static Public Member Functions

static void LoadFromDB ()
 
static ChannelMgrForTeam (uint32 team)
 
static ChannelGetChannelForPlayerByNamePart (std::string const &namePart, Player *playerSearcher)
 
static ChannelGetChannelForPlayerByGuid (ObjectGuid channelGuid, Player *playerSearcher)
 

Static Public Attributes

static AreaTableEntry const * SpecialLinkedArea
 

Protected Member Functions

 ChannelMgr (uint32 team)
 
 ~ChannelMgr ()
 

Private Types

typedef std::unordered_map< std::wstring, Channel * > CustomChannelContainer
 
typedef std::unordered_map< ObjectGuid, Channel * > BuiltinChannelContainer
 

Private Member Functions

ObjectGuid CreateCustomChannelGuid ()
 
ObjectGuid CreateBuiltinChannelGuid (uint32 channelId, AreaTableEntry const *zoneEntry=nullptr) const
 

Static Private Member Functions

static void SendNotOnChannelNotify (Player const *player, std::string const &name)
 

Private Attributes

CustomChannelContainer _customChannels
 
BuiltinChannelContainer _channels
 
uint32 const _team
 
ObjectGuidGenerator _guidGenerator
 

Detailed Description

Definition at line 29 of file ChannelMgr.h.

Member Typedef Documentation

◆ BuiltinChannelContainer

typedef std::unordered_map<ObjectGuid, Channel*> ChannelMgr::BuiltinChannelContainer
private

Definition at line 32 of file ChannelMgr.h.

◆ CustomChannelContainer

typedef std::unordered_map<std::wstring, Channel*> ChannelMgr::CustomChannelContainer
private

Definition at line 31 of file ChannelMgr.h.

Constructor & Destructor Documentation

◆ ChannelMgr() [1/3]

ChannelMgr::ChannelMgr ( uint32  team)
inlineexplicitprotected

Definition at line 35 of file ChannelMgr.h.

◆ ~ChannelMgr()

ChannelMgr::~ChannelMgr ( )
protected

Definition at line 31 of file ChannelMgr.cpp.

◆ ChannelMgr() [2/3]

ChannelMgr::ChannelMgr ( ChannelMgr const &  right)
delete

◆ ChannelMgr() [3/3]

ChannelMgr::ChannelMgr ( ChannelMgr &&  right)
delete

Member Function Documentation

◆ CreateBuiltinChannelGuid()

ObjectGuid ChannelMgr::CreateBuiltinChannelGuid ( uint32  channelId,
AreaTableEntry const *  zoneEntry = nullptr 
) const
private

Definition at line 274 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateCustomChannel()

Channel * ChannelMgr::CreateCustomChannel ( std::string const &  name)

Definition at line 181 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateCustomChannelGuid()

ObjectGuid ChannelMgr::CreateCustomChannelGuid ( )
private

Definition at line 269 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ForTeam()

ChannelMgr * ChannelMgr::ForTeam ( uint32  team)
static

Definition at line 114 of file ChannelMgr.cpp.

+ Here is the caller graph for this function:

◆ GetChannel()

Channel * ChannelMgr::GetChannel ( uint32  channelId,
std::string const &  name,
Player player,
bool  notify = true,
AreaTableEntry const *  zoneEntry = nullptr 
) const

Definition at line 214 of file ChannelMgr.cpp.

+ Here is the call graph for this function:

◆ GetChannelForPlayerByGuid()

Channel * ChannelMgr::GetChannelForPlayerByGuid ( ObjectGuid  channelGuid,
Player playerSearcher 
)
static

Definition at line 160 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetChannelForPlayerByNamePart()

Channel * ChannelMgr::GetChannelForPlayerByNamePart ( std::string const &  namePart,
Player playerSearcher 
)
static

Definition at line 131 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCustomChannel()

Channel * ChannelMgr::GetCustomChannel ( std::string const &  name) const

Definition at line 200 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSystemChannel()

Channel * ChannelMgr::GetSystemChannel ( uint32  channelId,
AreaTableEntry const *  zoneEntry = nullptr 
)

Definition at line 169 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LeftChannel()

void ChannelMgr::LeftChannel ( uint32  channelId,
AreaTableEntry const *  zoneEntry 
)

Definition at line 247 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadFromDB()

void ChannelMgr::LoadFromDB ( )
static

Definition at line 40 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

ChannelMgr & ChannelMgr::operator= ( ChannelMgr &&  right)
delete

◆ operator=() [2/2]

ChannelMgr & ChannelMgr::operator= ( ChannelMgr const &  right)
delete

◆ SaveToDB()

void ChannelMgr::SaveToDB ( )

Definition at line 154 of file ChannelMgr.cpp.

+ Here is the caller graph for this function:

◆ SendNotOnChannelNotify()

void ChannelMgr::SendNotOnChannelNotify ( Player const *  player,
std::string const &  name 
)
staticprivate

Definition at line 261 of file ChannelMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _channels

BuiltinChannelContainer ChannelMgr::_channels
private

Definition at line 59 of file ChannelMgr.h.

◆ _customChannels

CustomChannelContainer ChannelMgr::_customChannels
private

Definition at line 58 of file ChannelMgr.h.

◆ _guidGenerator

ObjectGuidGenerator ChannelMgr::_guidGenerator
private

Definition at line 61 of file ChannelMgr.h.

◆ _team

uint32 const ChannelMgr::_team
private

Definition at line 60 of file ChannelMgr.h.

◆ SpecialLinkedArea

AreaTableEntry const * ChannelMgr::SpecialLinkedArea
static

Definition at line 48 of file ChannelMgr.h.


The documentation for this class was generated from the following files: