31 static std::vector<ChatCommand> gmCommandTable =
41 static std::vector<ChatCommand> commandTable =
62 std::string param = (
char*)args;
66 session->GetPlayer()->SetGMChat(
true);
73 session->GetPlayer()->SetGMChat(
false);
94 if (strncmp(args,
"on", 3) == 0)
96 else if (strncmp(args,
"off", 4) == 0)
117 AccountTypes itrSec = itr->second->GetSession()->GetSecurity();
118 if ((itr->second->IsGameMaster() ||
130 std::string
const& name = itr->second->GetName();
131 uint8 size = name.size();
133 uint8 max = ((16 - size) / 2);
135 if ((max + max2 + size) == 16)
140 handler->
PSendSysMessage(
"|%*s%s%*s| %u |", max,
" ", name.c_str(), max2,
" ",
uint8(security));
166 Field* fields = result->Fetch();
169 uint8 max = (16 - strlen(name)) / 2;
171 if ((max + max2 + strlen(name)) == 16)
176 handler->
PSendSysMessage(
"|%*s%s%*s| %u |", max,
" ", name, max2,
" ", security);
177 }
while (result->NextRow());
190 handler->
SendSysMessage(
"This command can only be used in game.");
195 while (*args ==
' ' || *args ==
'\t')
198 std::string note(args);
199 while (!note.empty() && (note[note.size() - 1] ==
' ' || note[note.size() - 1] ==
'\t'))
200 note.erase(note.size() - 1);
248 const uint32 VISUAL_AURA = 37800;
249 std::string param = (
char*)args;
254 if (player->
HasAura(VISUAL_AURA, 0))
267 player->
AddAura(VISUAL_AURA, player);
289 std::string param = (
char*)args;
@ LANG_INVISIBLE_INVISIBLE
@ LANG_COMMAND_FLYMODE_STATUS
Skyfire::AutoPtr< PreparedResultSet, Skyfire::Mutex > PreparedQueryResult
virtual std::string GetNameLink() const
Player * getSelectedPlayer()
WorldSession * GetSession()
void PSendSysMessage(const char *format,...) ATTR_PRINTF(2
void SetSentErrorMessage(bool val)
virtual void SendSysMessage(const char *str)
virtual const char * GetSkyFireString(int32 entry) const
CommandScript(const char *name)
char const * GetCString() const
static SF_SHARED_MUTEX * GetLock()
UNORDERED_MAP< uint64, T * > MapType
uint32 GetGUIDLow() const
void SetGameMaster(bool on)
void UpdateTriggerVisibility()
bool IsGameMaster() const
void SetGMVisible(bool on)
void setFloat(const uint8 index, const float value)
void setString(const uint8 index, const std::string &value)
void setUInt32(const uint8 index, const uint32 value)
void setUInt8(const uint8 index, const uint8 value)
void setInt32(const uint8 index, const int32 value)
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Aura * AddAura(uint32 spellId, Unit *target)
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
bool SetCanFly(bool enable)
virtual bool processCommand(char *pCommand)=0
static IVMapManager * createOrGetVMapManager()
Player session in the World.
void SendNotification(const char *format,...) ATTR_PRINTF(2
Player * GetPlayer() const
uint32 GetAccountId() const
static bool HandleGMNoteCommand(ChatHandler *handler, char const *args)
static bool HandleGMChatCommand(ChatHandler *handler, char const *args)
std::vector< ChatCommand > GetCommands() const OVERRIDE
static bool HandleGMListFullCommand(ChatHandler *handler, char const *)
Display the list of GMs.
static bool HandleGMFlyCommand(ChatHandler *handler, char const *args)
static bool HandleGMListIngameCommand(ChatHandler *handler, char const *)
static bool HandleGMVisibleCommand(ChatHandler *handler, char const *args)
static bool HandleGMCommand(ChatHandler *handler, char const *args)
void AddSC_gm_commandscript()
uint32 realmID
Id of the realm.
@ CONFIG_GM_LEVEL_IN_GM_LIST
std::string FormatGMNoteLocation(GMNoteLocation const &location)
GMNoteValidation ValidateGMNoteText(std::string const ¬e)
@ 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
@ RBAC_PERM_COMMAND_GM_NOTE
LoginDatabaseWorkerPool LoginDatabase
float GetPositionZ() const
float GetOrientation() const
float GetPositionX() const
float GetPositionY() const