TrinityCore
Loading...
Searching...
No Matches
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 (Team 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 (Team 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
 
Team const _team
 
ObjectGuidGenerator _guidGenerator
 

Detailed Description

Definition at line 31 of file ChannelMgr.h.

Member Typedef Documentation

◆ BuiltinChannelContainer

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

Definition at line 34 of file ChannelMgr.h.

◆ CustomChannelContainer

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

Definition at line 33 of file ChannelMgr.h.

Constructor & Destructor Documentation

◆ ChannelMgr() [1/3]

ChannelMgr::ChannelMgr ( Team  team)
explicitprotected

Definition at line 31 of file ChannelMgr.cpp.

◆ ~ChannelMgr()

ChannelMgr::~ChannelMgr ( )
protected

Definition at line 35 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 285 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 192 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 280 of file ChannelMgr.cpp.

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

◆ ForTeam()

ChannelMgr * ChannelMgr::ForTeam ( Team  team)
static

Definition at line 118 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 225 of file ChannelMgr.cpp.

+ Here is the call graph for this function:

◆ GetChannelForPlayerByGuid()

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

Definition at line 171 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 142 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 211 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 180 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 258 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 44 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 165 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 272 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 61 of file ChannelMgr.h.

◆ _customChannels

CustomChannelContainer ChannelMgr::_customChannels
private

Definition at line 60 of file ChannelMgr.h.

◆ _guidGenerator

ObjectGuidGenerator ChannelMgr::_guidGenerator
private

Definition at line 63 of file ChannelMgr.h.

◆ _team

Team const ChannelMgr::_team
private

Definition at line 62 of file ChannelMgr.h.

◆ SpecialLinkedArea

AreaTableEntry const * ChannelMgr::SpecialLinkedArea
static

Definition at line 50 of file ChannelMgr.h.


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