![]() |
TrinityCore
|
#include <ChannelMgr.h>
Public Member Functions | |
| ChannelMgr (ChannelMgr const &right)=delete | |
| ChannelMgr (ChannelMgr &&right)=delete | |
| ChannelMgr & | operator= (ChannelMgr const &right)=delete |
| ChannelMgr & | operator= (ChannelMgr &&right)=delete |
| void | SaveToDB () |
| Channel * | GetSystemChannel (uint32 channelId, AreaTableEntry const *zoneEntry=nullptr) |
| Channel * | CreateCustomChannel (std::string const &name) |
| Channel * | GetCustomChannel (std::string const &name) const |
| Channel * | GetChannel (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 ChannelMgr * | ForTeam (Team team) |
| static Channel * | GetChannelForPlayerByNamePart (std::string const &namePart, Player *playerSearcher) |
| static Channel * | GetChannelForPlayerByGuid (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 |
Definition at line 31 of file ChannelMgr.h.
|
private |
Definition at line 34 of file ChannelMgr.h.
|
private |
Definition at line 33 of file ChannelMgr.h.
|
explicitprotected |
Definition at line 31 of file ChannelMgr.cpp.
|
protected |
Definition at line 35 of file ChannelMgr.cpp.
References _channels, and _customChannels.
|
delete |
|
delete |
|
private |
Definition at line 285 of file ChannelMgr.cpp.
References _team, ALLIANCE, ChatChannelsEntry::GetFlags(), GlobalForTournament, AreaTableEntry::ID, LinkedChannel, sCfgCategoriesStore, sChatChannelsStore, sRealmList, Tournament, and ZoneBased.
Referenced by GetChannel(), GetSystemChannel(), and LeftChannel().
| Channel * ChannelMgr::CreateCustomChannel | ( | std::string const & | name | ) |
Definition at line 192 of file ChannelMgr.cpp.
References _customChannels, _team, CreateCustomChannelGuid(), Channel::SetDirty(), Utf8toWStr(), and wstrToLower().
Referenced by WorldSession::HandleJoinChannel().
|
private |
Definition at line 280 of file ChannelMgr.cpp.
References _guidGenerator, _team, ALLIANCE, and ObjectGuidGenerator::Generate().
Referenced by CreateCustomChannel(), and LoadFromDB().
|
static |
Definition at line 118 of file ChannelMgr.cpp.
References ALLIANCE, CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL, HORDE, PANDARIA_NEUTRAL, and sWorld.
Referenced by Player::CleanupChannels(), message_commandscript::HandleChannelSetOwnership(), WorldSession::HandleJoinChannel(), WorldSession::HandleLeaveChannel(), LoadFromDB(), World::Update(), and Player::UpdateLocalChannels().
| 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.
References _channels, _customChannels, CreateBuiltinChannelGuid(), Channel::GetChannelName(), Player::GetSession(), WorldSession::GetSessionDbcLocale(), SendNotOnChannelNotify(), Utf8toWStr(), and wstrToLower().
|
static |
Definition at line 171 of file ChannelMgr.cpp.
References Player::GetJoinedChannels().
Referenced by WorldSession::HandleChatAddonMessage(), and WorldSession::HandleChatMessage().
|
static |
Definition at line 142 of file ChannelMgr.cpp.
References Player::GetJoinedChannels(), Player::GetSession(), WorldSession::GetSessionDbcLocale(), Utf8toWStr(), and wstrToLower().
Referenced by WorldSession::HandleChannelCommand(), WorldSession::HandleChannelPassword(), WorldSession::HandleChannelPlayerCommand(), WorldSession::HandleChatAddonMessage(), and WorldSession::HandleChatMessage().
| Channel * ChannelMgr::GetCustomChannel | ( | std::string const & | name | ) | const |
Definition at line 211 of file ChannelMgr.cpp.
References _customChannels, Utf8toWStr(), and wstrToLower().
Referenced by WorldSession::HandleJoinChannel().
| Channel * ChannelMgr::GetSystemChannel | ( | uint32 | channelId, |
| AreaTableEntry const * | zoneEntry = nullptr |
||
| ) |
Definition at line 180 of file ChannelMgr.cpp.
References _channels, _team, and CreateBuiltinChannelGuid().
Referenced by WorldSession::HandleJoinChannel(), and Player::UpdateLocalChannels().
| void ChannelMgr::LeftChannel | ( | uint32 | channelId, |
| AreaTableEntry const * | zoneEntry | ||
| ) |
Definition at line 258 of file ChannelMgr.cpp.
References _channels, CreateBuiltinChannelGuid(), and Channel::GetNumPlayers().
Referenced by Player::UpdateLocalChannels().
|
static |
Definition at line 44 of file ChannelMgr.cpp.
References _customChannels, ASSERT, CHAR_DEL_CHANNEL, CHAR_DEL_OLD_CHANNELS, CharacterDatabase, CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION, CONFIG_PRESERVE_CUSTOM_CHANNELS, CreateCustomChannelGuid(), DAY, ForTeam(), Field::GetBool(), AreaTableEntry::GetFlags(), getMSTime(), GetMSTimeDiffToNow(), Field::GetString(), LinkedChatSpecialArea, sAreaTableStore, Channel::SetAnnounce(), Channel::SetOwnership(), Channel::SetPassword(), PreparedStatementBase::setString(), PreparedStatementBase::setUInt32(), SpecialLinkedArea, sWorld, TC_LOG_ERROR, TC_LOG_INFO, and Utf8toWStr().
Referenced by World::SetInitialWorldSettings().
|
delete |
|
delete |
| void ChannelMgr::SaveToDB | ( | ) |
Definition at line 165 of file ChannelMgr.cpp.
References _customChannels.
Referenced by World::Update().
|
staticprivate |
Definition at line 272 of file ChannelMgr.cpp.
References WorldPackets::Channel::ChannelNotify::_Channel, CHAT_NOT_MEMBER_NOTICE, Player::SendDirectMessage(), WorldPackets::Channel::ChannelNotify::Type, and WorldPackets::Channel::ChannelNotify::Write().
Referenced by GetChannel().
|
private |
Definition at line 61 of file ChannelMgr.h.
Referenced by GetChannel(), GetSystemChannel(), LeftChannel(), and ~ChannelMgr().
|
private |
Definition at line 60 of file ChannelMgr.h.
Referenced by CreateCustomChannel(), GetChannel(), GetCustomChannel(), LoadFromDB(), SaveToDB(), and ~ChannelMgr().
|
private |
Definition at line 63 of file ChannelMgr.h.
Referenced by CreateCustomChannelGuid().
|
private |
Definition at line 62 of file ChannelMgr.h.
Referenced by CreateBuiltinChannelGuid(), CreateCustomChannel(), CreateCustomChannelGuid(), and GetSystemChannel().
|
static |
Definition at line 50 of file ChannelMgr.h.
Referenced by Channel::GetChannelName(), and LoadFromDB().