mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
feat(Core/Player): Implement commentator tag (#17449)
* feat(Core/Player): Implement commentator tag * remove redundant session check
This commit is contained in:
@@ -1294,6 +1294,8 @@ uint8 Player::GetChatTag() const
|
||||
tag |= CHAT_TAG_DND;
|
||||
if (isAFK())
|
||||
tag |= CHAT_TAG_AFK;
|
||||
if (IsCommentator())
|
||||
tag |= CHAT_TAG_COM;
|
||||
if (IsDeveloper())
|
||||
tag |= CHAT_TAG_DEV;
|
||||
|
||||
|
||||
@@ -839,7 +839,7 @@ enum PlayerChatTag
|
||||
CHAT_TAG_AFK = 0x01,
|
||||
CHAT_TAG_DND = 0x02,
|
||||
CHAT_TAG_GM = 0x04,
|
||||
CHAT_TAG_COM = 0x08, // Commentator
|
||||
CHAT_TAG_COM = 0x08, // Commentator tag. Do not exist in clean client
|
||||
CHAT_TAG_DEV = 0x10,
|
||||
};
|
||||
|
||||
@@ -1139,6 +1139,8 @@ public:
|
||||
void SendTaxiNodeStatusMultiple();
|
||||
// mount_id can be used in scripting calls
|
||||
|
||||
[[nodiscard]] bool IsCommentator() const { return HasPlayerFlag(PLAYER_FLAGS_COMMENTATOR2); }
|
||||
void SetCommentator(bool on) { ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_COMMENTATOR2, on); }
|
||||
[[nodiscard]] bool IsDeveloper() const { return HasPlayerFlag(PLAYER_FLAGS_DEVELOPER); }
|
||||
void SetDeveloper(bool on) { ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER, on); }
|
||||
[[nodiscard]] bool isAcceptWhispers() const { return m_ExtraFlags & PLAYER_EXTRA_ACCEPT_WHISPERS; }
|
||||
|
||||
Reference in New Issue
Block a user