TrinityCore
|
#include <Channel.h>
Classes | |
struct | PlayerInfo |
Public Member Functions | |
Channel (ObjectGuid const &guid, uint32 channelId, uint32 team=0, AreaTableEntry const *zoneEntry=nullptr) | |
Channel (ObjectGuid const &guid, std::string const &name, uint32 team=0, std::string const &banList="") | |
std::string | GetName (LocaleConstant locale=DEFAULT_LOCALE) const |
uint32 | GetChannelId () const |
bool | IsConstant () const |
ObjectGuid | GetGUID () const |
bool | IsLFG () const |
bool | IsAnnounce () const |
void | SetAnnounce (bool announce) |
void | SetDirty () |
void | UpdateChannelInDB () |
void | SetPassword (std::string const &password) |
bool | CheckPassword (std::string const &password) const |
uint32 | GetNumPlayers () const |
uint8 | GetFlags () const |
bool | HasFlag (uint8 flag) const |
AreaTableEntry const * | GetZoneEntry () const |
void | JoinChannel (Player *player, std::string const &pass="") |
void | LeaveChannel (Player *player, bool send=true, bool suspend=false) |
void | KickOrBan (Player const *player, std::string const &badname, bool ban) |
void | Kick (Player const *player, std::string const &badname) |
void | Ban (Player const *player, std::string const &badname) |
void | UnBan (Player const *player, std::string const &badname) |
void | Password (Player const *player, std::string const &pass) |
void | SetMode (Player const *player, std::string const &p2n, bool mod, bool set) |
void | SetInvisible (Player const *player, bool on) |
void | SetOwner (ObjectGuid const &guid, bool exclaim=true) |
void | SetOwner (Player const *player, std::string const &name) |
void | SendWhoOwner (Player const *player) |
void | SetModerator (Player const *player, std::string const &newname) |
void | UnsetModerator (Player const *player, std::string const &newname) |
void | SetMute (Player const *player, std::string const &newname) |
void | UnsetMute (Player const *player, std::string const &newname) |
void | SilenceAll (Player const *player, std::string const &name) |
void | UnsilenceAll (Player const *player, std::string const &name) |
void | List (Player const *player) |
void | Announce (Player const *player) |
void | Say (ObjectGuid const &guid, std::string const &what, uint32 lang) const |
void | AddonSay (ObjectGuid const &guid, std::string const &prefix, std::string const &what, bool isLogged) const |
void | DeclineInvite (Player const *player) |
void | Invite (Player const *player, std::string const &newp) |
void | JoinNotify (Player const *player) |
void | LeaveNotify (Player const *player) |
void | SetOwnership (bool ownership) |
Static Public Member Functions | |
static void | GetChannelName (std::string &channelName, uint32 channelId, LocaleConstant locale, AreaTableEntry const *zoneEntry) |
Private Types | |
typedef std::map< ObjectGuid, PlayerInfo > | PlayerContainer |
typedef GuidUnorderedSet | BannedContainer |
Private Member Functions | |
template<class Builder > | |
void | SendToAll (Builder &builder, ObjectGuid const &guid=ObjectGuid::Empty, ObjectGuid const &accountGuid=ObjectGuid::Empty) const |
template<class Builder > | |
void | SendToAllButOne (Builder &builder, ObjectGuid const &who) const |
template<class Builder > | |
void | SendToOne (Builder &builder, ObjectGuid const &who) const |
template<class Builder > | |
void | SendToAllWithAddon (Builder &builder, std::string const &addonPrefix, ObjectGuid const &guid=ObjectGuid::Empty, ObjectGuid const &accountGuid=ObjectGuid::Empty) const |
bool | IsOn (ObjectGuid who) const |
bool | IsBanned (ObjectGuid guid) const |
uint8 | GetPlayerFlags (ObjectGuid const &guid) const |
void | SetModerator (ObjectGuid const &guid, bool set) |
void | SetMute (ObjectGuid const &guid, bool set) |
Private Attributes | |
bool | _isDirty |
time_t | _nextActivityUpdateTime |
bool | _announceEnabled |
bool | _ownershipEnabled |
bool | _isOwnerInvisible |
uint8 | _channelFlags |
uint32 | _channelId |
uint32 | _channelTeam |
ObjectGuid | _channelGuid |
ObjectGuid | _ownerGuid |
std::string | _channelName |
std::string | _channelPassword |
PlayerContainer | _playersStore |
BannedContainer | _bannedStore |
AreaTableEntry const * | _zoneEntry |
|
private |
|
private |
Channel::Channel | ( | ObjectGuid const & | guid, |
uint32 | channelId, | ||
uint32 | team = 0 , |
||
AreaTableEntry const * | zoneEntry = nullptr |
||
) |
Channel::Channel | ( | ObjectGuid const & | guid, |
std::string const & | name, | ||
uint32 | team = 0 , |
||
std::string const & | banList = "" |
||
) |
void Channel::AddonSay | ( | ObjectGuid const & | guid, |
std::string const & | prefix, | ||
std::string const & | what, | ||
bool | isLogged | ||
) | const |
Definition at line 731 of file Channel.cpp.
void Channel::Announce | ( | Player const * | player | ) |
|
inline |
|
inline |
void Channel::DeclineInvite | ( | Player const * | player | ) |
Definition at line 882 of file Channel.cpp.
|
inline |
|
static |
Definition at line 97 of file Channel.cpp.
|
inline |
|
inline |
std::string Channel::GetName | ( | LocaleConstant | locale = DEFAULT_LOCALE | ) | const |
Definition at line 114 of file Channel.cpp.
|
inline |
|
inlineprivate |
|
inline |
|
inline |
void Channel::Invite | ( | Player const * | player, |
std::string const & | newp | ||
) |
|
inlineprivate |
|
inline |
|
inlineprivate |
void Channel::JoinChannel | ( | Player * | player, |
std::string const & | pass = "" |
||
) |
Definition at line 157 of file Channel.cpp.
void Channel::JoinNotify | ( | Player const * | player | ) |
Definition at line 886 of file Channel.cpp.
|
inline |
void Channel::KickOrBan | ( | Player const * | player, |
std::string const & | badname, | ||
bool | ban | ||
) |
void Channel::LeaveChannel | ( | Player * | player, |
bool | send = true , |
||
bool | suspend = false |
||
) |
Definition at line 256 of file Channel.cpp.
void Channel::LeaveNotify | ( | Player const * | player | ) |
Definition at line 928 of file Channel.cpp.
void Channel::List | ( | Player const * | player | ) |
void Channel::Password | ( | Player const * | player, |
std::string const & | pass | ||
) |
void Channel::Say | ( | ObjectGuid const & | guid, |
std::string const & | what, | ||
uint32 | lang | ||
) | const |
Definition at line 679 of file Channel.cpp.
|
private |
Definition at line 986 of file Channel.cpp.
|
private |
Definition at line 997 of file Channel.cpp.
|
private |
Definition at line 1017 of file Channel.cpp.
|
private |
Definition at line 1008 of file Channel.cpp.
void Channel::SendWhoOwner | ( | Player const * | player | ) |
|
inline |
|
inline |
void Channel::SetInvisible | ( | Player const * | player, |
bool | on | ||
) |
void Channel::SetMode | ( | Player const * | player, |
std::string const & | p2n, | ||
bool | mod, | ||
bool | set | ||
) |
|
private |
|
inline |
|
private |
|
inline |
void Channel::SetOwner | ( | ObjectGuid const & | guid, |
bool | exclaim = true |
||
) |
Definition at line 838 of file Channel.cpp.
void Channel::SetOwner | ( | Player const * | player, |
std::string const & | name | ||
) |
|
inline |
|
inline |
void Channel::SilenceAll | ( | Player const * | player, |
std::string const & | name | ||
) |
Definition at line 874 of file Channel.cpp.
void Channel::UnBan | ( | Player const * | player, |
std::string const & | badname | ||
) |
|
inline |
|
inline |
void Channel::UnsilenceAll | ( | Player const * | player, |
std::string const & | name | ||
) |
Definition at line 878 of file Channel.cpp.
void Channel::UpdateChannelInDB | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |