mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
refactor(Core/Player): add helper method for PLAYER_FLAGS_DEVELOPER (#4395)
Co-Authored-By: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
This commit is contained in:
@@ -2210,7 +2210,7 @@ uint8 Player::GetChatTag() const
|
||||
tag |= CHAT_TAG_DND;
|
||||
if (isAFK())
|
||||
tag |= CHAT_TAG_AFK;
|
||||
if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
|
||||
if (IsDeveloper())
|
||||
tag |= CHAT_TAG_DEV;
|
||||
|
||||
return tag;
|
||||
|
||||
@@ -1173,6 +1173,9 @@ public:
|
||||
void CleanupAfterTaxiFlight();
|
||||
void ContinueTaxiFlight();
|
||||
// mount_id can be used in scripting calls
|
||||
|
||||
[[nodiscard]] bool IsDeveloper() const { return HasFlag(PLAYER_FLAGS, 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; }
|
||||
void SetAcceptWhispers(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_ACCEPT_WHISPERS; else m_ExtraFlags &= ~PLAYER_EXTRA_ACCEPT_WHISPERS; }
|
||||
[[nodiscard]] bool IsGameMaster() const { return m_ExtraFlags & PLAYER_EXTRA_GM_ON; }
|
||||
|
||||
Reference in New Issue
Block a user