58 {
"gm", gmCommandTable },
79 session->GetPlayer()->SetGMChat(
true);
85 session->GetPlayer()->SetGMChat(
false);
123 AccountTypes playerSec = player->GetSession()->GetSecurity();
124 if ((player->IsGameMaster() ||
136 std::string
const& name = player->GetName();
138 uint8 security = playerSec;
139 uint8 max = ((16 - size) / 2);
141 if ((max + max2 + size) == 16)
146 handler->
PSendSysMessage(
"|%*s%s%*s| %u |", max,
" ", name.c_str(), max2,
" ", security);
172 Field* fields = result->Fetch();
175 uint8 max = (16 - strlen(name)) / 2;
177 if ((max + max2 + strlen(name)) == 16)
182 handler->
PSendSysMessage(
"|%*s%s%*s| %u |", max,
" ", name, max2,
" ", security);
183 }
while (result->NextRow());
202 const uint32 VISUAL_AURA = 37800;
206 if (_player->
HasAura(VISUAL_AURA))
215 _player->
AddAura(VISUAL_AURA, _player);
std::shared_ptr< PreparedResultSet > PreparedQueryResult
DatabaseWorkerPool< LoginDatabaseConnection > LoginDatabase
Accessor to the realm/login database.
@ LANG_INVISIBLE_INVISIBLE
@ LANG_COMMAND_FLYMODE_STATUS
std::optional< T > Optional
Optional helper class to wrap optional values within.
Player * getSelectedPlayer()
WorldSession * GetSession()
virtual std::string GetNameLink() const
void SetSentErrorMessage(bool val)
Player * GetPlayer() const
void PSendSysMessage(char const *fmt, Args &&... args)
virtual void SendSysMessage(std::string_view str, bool escapeCharacters=false)
virtual char const * GetTrinityString(uint32 entry) const
Class used to access individual fields of database query result.
char const * GetCString() const
PackedGuid const & GetPackGUID() const
void SetGameMaster(bool on)
void UpdateTriggerVisibility()
void SetGMVisible(bool on)
void UpdateObjectVisibility(bool forced=true) override
void SendMessageToSet(WorldPacket const *data, bool self) const override
void setInt32(uint8 index, int32 value)
void setUInt8(uint8 index, uint8 value)
Aura * AddAura(uint32 spellId, Unit *target)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void SetOpcode(uint16 opcode)
Player session in the World.
void SendNotification(const char *format,...) ATTR_PRINTF(2
Player * GetPlayer() const
static bool HandleGMChatCommand(ChatHandler *handler, Optional< bool > enableArg)
ChatCommandTable GetCommands() const override
static bool HandleGMFlyCommand(ChatHandler *handler, bool enable)
static bool HandleGMOffCommand(ChatHandler *handler)
static bool HandleGMVisibleCommand(ChatHandler *handler, Optional< bool > visibleArg)
static bool HandleGMListIngameCommand(ChatHandler *handler)
static bool HandleGMListFullCommand(ChatHandler *handler)
Display the list of GMs.
static bool HandleGMOnCommand(ChatHandler *handler)
void AddSC_gm_commandscript()
@ SMSG_MOVE_UNSET_CAN_FLY
@ CONFIG_GM_LEVEL_IN_GM_LIST
TC_GAME_API HashMapHolder< Player >::MapType const & GetPlayers()
std::vector< ChatCommandBuilder > ChatCommandTable
@ RBAC_PERM_COMMAND_GM_INGAME
@ RBAC_PERM_COMMAND_GM_CHAT
@ RBAC_PERM_CHAT_USE_STAFF_BADGE
@ RBAC_PERM_COMMAND_GM_VISIBLE
@ RBAC_PERM_COMMAND_GM_LIST
@ RBAC_PERM_COMMAND_GM_FLY
@ RBAC_PERM_COMMANDS_APPEAR_IN_GM_LIST