60#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
61#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
141 Field* fields = result->Fetch();
144 if (!(result->NextRow()))
147 fields = result->Fetch();
244 Cell cell(cellCoord);
247 object->GetZoneAndAreaId(zoneId, areaId);
248 uint32 mapId =
object->GetMapId();
254 float zoneX =
object->GetPositionX();
255 float zoneY =
object->GetPositionY();
259 Map const* map =
object->GetMap();
289 object->GetPositionX(),
object->GetPositionY(),
object->GetPositionZ(),
object->GetOrientation());
292 transport->GetGOInfo()->moTransport.mapID,
object->GetTransOffsetX(),
object->GetTransOffsetY(),
object->GetTransOffsetZ(),
object->GetTransOffsetO(),
293 transport->GetEntry(), transport->GetName().c_str());
296 zoneX, zoneY, groundZ, floorZ, map->
GetMinHeight(object->
GetPositionX(),
object->GetPositionY()), haveMap, haveVMap, haveMMap);
357 std::string targetName;
362 if (target == _player || targetGuid == _player->
GetGUID())
375 std::string chrNameLink = handler->
playerLink(targetName);
467 std::string nameLink = handler->
playerLink(targetName);
498 std::string targetName;
503 if (target == _player || targetGuid == _player->
GetGUID())
512 std::string nameLink = handler->
playerLink(targetName);
539 Player* targetGroupLeader =
nullptr;
596 std::string nameLink = handler->
playerLink(targetName);
607 targetGuid,
nullptr);
717 if (srcSlot == dstSlot)
751 std::string nameLink = handler->
GetNameLink(owner);
894 std::string playerName;
912 char const* kickReason = strtok(
nullptr,
"\r");
913 if (kickReason !=
nullptr)
914 kickReasonStr = kickReason;
934 player->CastSpell(player, 7355,
false);
941 char* player_str = strtok((
char*)args,
" ");
945 std::string location_str =
"inn";
946 if (
char const* loc = strtok(
nullptr,
" "))
965 if (location_str ==
"inn")
971 if (location_str ==
"graveyard")
977 if (location_str ==
"startzone")
1022 if (
sObjectMgr->AddGraveyardLink(graveyardId, zoneId, team))
1049 uint32 graveyardId = graveyard->
ID;
1065 else if (team ==
HORDE)
1074 std::string team_name;
1167 char const* itemNameStr = strtok((
char*)args,
"]");
1169 if (itemNameStr && itemNameStr[0])
1171 std::string itemName = itemNameStr+1;
1191 itemId = result->Fetch()->GetUInt32();
1202 itemId = Trinity::StringTo<uint32>(
id).value_or(0);
1205 char const* ccount = strtok(
nullptr,
" ");
1210 count = strtol(ccount,
nullptr, 10);
1218 playerTarget = player;
1233 if (destroyedItemCount > 0)
1239 uint32 unableToDestroyItemCount = -count - destroyedItemCount;
1240 if (unableToDestroyItemCount > 0)
1256 uint32 noSpaceForCount = 0;
1262 count -= noSpaceForCount;
1264 if (count == 0 || dest.empty())
1274 if (player == playerTarget)
1275 for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr)
1279 if (count > 0 && item)
1283 if (player != playerTarget)
1284 playerTarget->
SendNewItem(item, count,
true,
false);
1287 if (noSpaceForCount > 0)
1299 Player* playerTarget =
nullptr;
1306 char* tailArgs = strtok(
nullptr,
"");
1312 if (tailArgs[0] ==
'[')
1314 char const* itemNameStr = strtok(tailArgs,
"]");
1316 if (itemNameStr && itemNameStr[0])
1318 std::string itemName = itemNameStr + 1;
1338 itemId = result->Fetch()->GetUInt32();
1349 itemId = Trinity::StringTo<uint32>(
id).value_or(0);
1352 char const* ccount = strtok(
nullptr,
" ");
1357 count = strtol(ccount,
nullptr, 10);
1375 if (destroyedItemCount > 0)
1381 uint32 unableToDestroyItemCount = -count - destroyedItemCount;
1382 if (unableToDestroyItemCount > 0)
1398 uint32 noSpaceForCount = 0;
1404 count -= noSpaceForCount;
1406 if (count == 0 || dest.empty())
1416 if (player == playerTarget)
1417 for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr)
1421 if (count > 0 && item)
1424 if (player != playerTarget)
1425 playerTarget->
SendNewItem(item, count,
true,
false);
1428 if (noSpaceForCount > 0)
1437 if (*itemSetId == 0)
1447 playerTarget = player;
1451 for (
auto const& itemTemplatePair : its)
1453 if (itemTemplatePair.second.ItemSet != *itemSetId)
1461 Item* item = playerTarget->
StoreNewItem(dest, itemTemplatePair.first,
true);
1464 if (player == playerTarget)
1468 if (player != playerTarget)
1473 player->
SendEquipError(msg,
nullptr,
nullptr, itemTemplatePair.first);
1559 if (level <= 0 || level > max)
1596 Player* target = arg->GetConnectedPlayer();
1598 std::string targetName = arg->GetName();
1648 int64 muteTime = -1;
1659 uint8 raceid, classid = 0;
1663 uint32 totalPlayerTime = 0;
1674 char const* areaName =
nullptr;
1675 char const* zoneName =
nullptr;
1679 uint8 guildRankId = 0;
1680 std::string guildName;
1681 std::string guildRank;
1683 std::string officeNote;
1722 Field* fields = result->Fetch();
1723 totalPlayerTime = fields[0].
GetUInt32();
1749 Field* fields = result->Fetch();
1764 lastIp.append(
" (");
1765 lastIp.append(location->CountryName);
1785 std::string nameLink = handler->
playerLink(targetName);
1803 Field* fields = result2->Fetch();
1804 bool permanent = fields[1].
GetUInt64() != 0;
1805 banTime = !permanent ?
int64(fields[0].GetUInt32()) : 0;
1817 Field* fields = result4->Fetch();
1830 Field* fields5 = result5->Fetch();
1834 guildRankId = fields5[3].
GetUInt8();
1906 areaName = zoneName;
1920 if (!guildName.empty())
1926 if (!officeNote.empty())
1940 Field* fields = result6->Fetch();
1960 if (target->
IsPet())
1978 std::vector<RespawnInfo const*> data;
1984 if (info->gridId == gridId)
1994 std::string muteReasonStr{ muteReason };
1995 if (muteReason.empty())
2007 Player* target = player->GetConnectedPlayer();
2013 target = session->GetPlayer();
2020 std::string muteBy =
"";
2022 muteBy = gmPlayer->GetName();
2050 std::string nameLink = handler->
playerLink(*player);
2071 std::string targetName;
2080 target = session->GetPlayer();
2108 std::string nameLink = handler->
playerLink(targetName);
2151 Field* fields = result->Fetch();
2159 localtime_r(&sqlTime, &timeinfo);
2160 strftime(buffer,
sizeof(buffer),
"%Y-%m-%d %I:%M%p", &timeinfo);
2163 }
while (result->NextRow());
2206 if (info.TargetGUID.IsEmpty())
2208 else if (info.TargetGUID.IsPlayer())
2214 if (info.TargetGUID.IsEmpty())
2216 else if (info.TargetGUID.IsPlayer())
2321 SpellNonMeleeDamage damageInfo(attacker, target, (*spellInfo)->Id, (*spellInfo)->SchoolMask);
2322 damageInfo.
damage = damage;
2353 Player* target =
nullptr;
2355 if (args && args[0] !=
'\0')
2409 uint32 freezeDuration = 0;
2410 bool canApplyFreeze =
false;
2411 bool getDurationFromConfig =
false;
2426 getDurationFromConfig =
true;
2431 char const* arg1 = strtok((
char*)args,
" ");
2432 char const* arg2 = strtok(
nullptr,
" ");
2441 freezeDuration =
uint32(atoi(arg1));
2442 canApplyFreeze =
true;
2448 std::string name = arg1;
2454 freezeDuration =
uint32(atoi(arg2));
2455 canApplyFreeze =
true;
2458 getDurationFromConfig =
true;
2464 if (getDurationFromConfig)
2467 canApplyFreeze =
true;
2511 name = *targetNameArg;
2578 Field* fields = result->Fetch();
2579 std::string player = fields[0].
GetString();
2586 if (remaintime == -1)
2592 while (result->NextRow());
@ CHAR_SEL_PVPSTATS_FACTIONS_OVERALL
@ CHAR_DEL_CHAR_AURA_FROZEN
@ CHAR_SEL_CHARACTER_AURA_FROZEN
@ CHAR_SEL_GUILD_MEMBER_EXTENDED
char const * GetClassName(uint8 class_, uint8 locale)
DBCStorage< WorldSafeLocsEntry > sWorldSafeLocsStore(WorldSafeLocsEntryfmt)
void Map2ZoneCoordinates(float &x, float &y, uint32 zone)
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
char const * GetRaceName(uint8 race, uint8 locale)
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
std::shared_ptr< PreparedResultSet > PreparedQueryResult
DatabaseWorkerPool< LoginDatabaseConnection > LoginDatabase
Accessor to the realm/login database.
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
DatabaseWorkerPool< WorldDatabaseConnection > WorldDatabase
Accessor to the world database.
#define MAX_NUMBER_OF_GRIDS
int32 GenerateItemRandomPropertyId(uint32 item_id)
@ LANG_COMMAND_KICKMESSAGE_WORLD
@ LANG_MOVEGENS_FOLLOW_PLAYER
@ LANG_CHARACTER_GENDER_FEMALE
@ LANG_COMMAND_GRAVEYARDALRLINKED
@ LANG_PINFO_CHR_GUILD_NOTE
@ LANG_PINFO_ACC_LASTLOGIN
@ LANG_COMMAND_GRAVEYARD_ALLIANCE
@ LANG_COMMAND_OBJNOTFOUND
@ LANG_COMMAND_ZONENOGRAFACTION
@ LANG_PINFO_CHR_LEVEL_LOW
@ LANG_CANNOT_GO_TO_INST_PARTY
@ LANG_PINFO_CHR_PLAYEDTIME
@ LANG_COMMAND_PLAYED_TO_ALL
@ LANG_GPS_POSITION_INDOORS
@ LANG_COMMAND_DISABLE_CHAT_DELAYED
@ LANG_COMMAND_COULDNOTFIND
@ LANG_COMMAND_FREEZE_ERROR
@ LANG_COMMAND_NOCREATUREFOUND
@ LANG_PINFO_CHR_MAP_WITH_AREA
@ LANG_ITEM_CANNOT_CREATE
@ LANG_MOVEGENS_CHASE_PLAYER
@ LANG_COMMAND_GRAVEYARDNOEXIST
@ LANG_CANT_TELEPORT_SELF
@ LANG_COMMAND_LIST_FREEZE
@ LANG_MOVEGENS_FOLLOW_CREATURE
@ LANG_MOVEGENS_FOLLOW_NULL
@ LANG_CHARACTER_GENDER_MALE
@ LANG_YOUR_CHAT_DISABLED
@ LANG_COMMAND_GRAVEYARDWRONGZONE
@ LANG_COMMAND_NO_FROZEN_PLAYERS
@ LANG_CHAT_ALREADY_ENABLED
@ LANG_COMMAND_GRAVEYARDNEAREST
@ LANG_GAMEOBJECT_DAMAGED
@ LANG_NO_ITEMS_FROM_ITEMSET_FOUND
@ LANG_COMMAND_TEMP_FROZEN_PLAYER
@ LANG_CANNOT_SUMMON_INST_INST
@ LANG_PINFO_CHR_LEVEL_HIGH
@ LANG_COMMAND_MUTEMESSAGE_WORLD
@ LANG_CANNOT_SUMMON_TO_INST
@ LANG_YOUR_ITEMS_REPAIRED
@ LANG_COMMAND_GRAVEYARDLINKED
@ LANG_TRANSPORT_POSITION
@ LANG_MOVEGENS_CHASE_CREATURE
@ LANG_COMMAND_ZONENOGRAVEYARDS
@ LANG_INVALID_GAMEOBJECT_TYPE
@ LANG_SELECT_CHAR_OR_CREATURE
@ LANG_COMMAND_NOGAMEOBJECTFOUND
@ LANG_REMOVEITEM_FAILURE
@ LANG_COMMAND_MUTEHISTORY_OUTPUT
@ LANG_COMMAND_MUTEHISTORY_EMPTY
@ LANG_PINFO_CHR_GUILD_RANK
@ LANG_CANNOT_GO_TO_INST_GM
@ LANG_COMMAND_GRAVEYARD_NOTEAM
@ LANG_PINFO_ACC_REGMAILS
@ LANG_COMMAND_MUTEHISTORY
@ LANG_CANNOT_GO_TO_BG_GM
@ LANG_COMMAND_PERMA_FROZEN_PLAYER
@ LANG_MOVEGENS_CHASE_NULL
@ LANG_GPS_POSITION_OUTDOORS
@ LANG_COMMAND_KICKMESSAGE
@ LANG_COMMAND_GRAVEYARDERROR
@ LANG_COMMAND_FREEZE_WRONG
@ LANG_PINFO_CHR_GUILD_ONOTE
@ LANG_MOVEGENS_HOME_CREATURE
@ LANG_MOVEGENS_HOME_PLAYER
@ LANG_COMMAND_GRAVEYARD_HORDE
@ LANG_COMMAND_GRAVEYARD_ANY
@ LANG_REMOVEALL_COOLDOWN
@ LANG_COMMAND_ITEMIDINVALID
@ LOGIN_SEL_ACCOUNT_MUTE_INFO
bool normalizePlayerName(std::string &name)
std::unordered_map< uint32, ItemTemplate > ItemTemplateContainer
std::optional< T > Optional
Optional helper class to wrap optional values within.
std::vector< ItemPosCount > ItemPosCountVec
#define INVENTORY_SLOT_BAG_0
#define PLAYER_EXPLORED_ZONES_SIZE
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ PLAYER_EXPLORED_ZONES_1
bool StringEqualI(std::string_view a, std::string_view b)
bool Utf8ToUpperOnlyLatin(std::string &utf8String)
std::string secsToTimeString(uint64 timeInSecs, TimeFormat timeFormat, bool hoursOnly)
bool isNumeric(wchar_t wchar)
@ WORLD_SEL_ITEM_TEMPLATE_LOCALE_BY_NAME
@ WORLD_SEL_ITEM_TEMPLATE_BY_NAME
static uint32 GetId(std::string_view username)
static Aura * TryRefreshStackOrCreate(AuraCreateInfo &createInfo, bool updateEffectMask=true)
void SetDuration(int32 duration, bool withMods=false)
char * extractKeyFromLink(char *text, char const *linkType, char **something1=nullptr)
Player * getSelectedPlayerOrSelf()
virtual bool HasPermission(uint32 permission) const
std::string playerLink(std::string const &name) const
Player * getSelectedPlayer()
WorldSession * GetSession()
virtual LocaleConstant GetSessionDbcLocale() const
virtual std::string GetNameLink() const
Creature * GetCreatureFromPlayerMapByDbGuid(ObjectGuid::LowType lowguid)
bool HasLowerSecurity(Player *target, ObjectGuid guid, bool strong=false)
Creature * getSelectedCreature()
GameObject * GetObjectFromPlayerMapByDbGuid(ObjectGuid::LowType lowguid)
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 bool needReportToTarget(Player *chr) const
bool extractPlayerTarget(char *args, Player **player, ObjectGuid *player_guid=nullptr, std::string *player_name=nullptr)
ObjectGuid::LowType extractLowGuidFromLink(char *text, HighGuid &guidHigh)
virtual char const * GetTrinityString(uint32 entry) const
void Respawn(bool force=false)
Class used to access individual fields of database query result.
std::string GetString() const
GameObjectValue const * GetGOValue() const
void ModifyHealth(int32 change, WorldObject *attackerOrHealer=nullptr, uint32 spellId=0)
bool IsDestructibleBuilding() const
InstanceGroupBind * GetBoundInstance(Player *player)
void SetBinding(bool val)
static MMapManager * createOrGetMMapManager()
dtNavMesh const * GetNavMesh(uint32 mapId)
bool IsBattlegroundOrArena() const
Weather * GetOrGenerateZoneDefaultWeather(uint32 zoneId)
float GetMinHeight(float x, float y) const
ZLiquidStatus GetLiquidStatus(uint32 phaseMask, float x, float y, float z, Optional< uint8 > ReqLiquidType, LiquidData *data=nullptr, float collisionHeight=2.03128f) const
RespawnInfo * GetRespawnInfo(SpawnObjectType type, ObjectGuid::LowType spawnId) const
uint32 GetInstanceId() const
static bool ExistVMap(uint32 mapid, int gx, int gy)
static bool ExistMap(uint32 mapid, int gx, int gy)
void Respawn(RespawnInfo *info, CharacterDatabaseTransaction dbTrans=nullptr)
std::vector< MovementGeneratorInformation > GetMovementGeneratorsInformation() const
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
bool GetDestination(float &x, float &y, float &z)
LowType GetCounter() const
static ObjectGuid const Empty
std::string ToString() const
uint32 GetUInt32Value(uint16 index) const
static ObjectGuid GetGUID(Object const *o)
void SetUInt32Value(uint16 index, uint32 value)
static Player * ToPlayer(Object *o)
void StopCastingBindSight() const
bool IsValidPos(uint16 pos, bool explicit_pos) const
Difficulty GetRaidDifficulty() const
Item * StoreNewItem(ItemPosCountVec const &pos, uint32 item, bool update, int32 randomPropertyId=0, GuidSet const &allowedLooters=GuidSet())
uint32 GetSaveTimer() const
BattlegroundTypeId GetBattlegroundTypeId() const
void LeaveBattleground(bool teleportToEntryPoint=true, bool withoutDeserterDebuff=false)
uint32 GetTotalPlayedTime() const
void SetPhaseMask(uint32 newPhaseMask, bool update) override
Gender GetNativeGender() const override
uint16 GetSkillValue(uint32 skill) const
void SetDungeonDifficulty(Difficulty dungeon_difficulty)
static void OfflineResurrect(ObjectGuid const &guid, CharacterDatabaseTransaction trans)
void SetBattlegroundEntryPoint()
void SetDeveloper(bool on)
void SpawnCorpseBones(bool triggerSave=true)
Difficulty GetDifficulty(bool isRaid) const
void DurabilityRepairAll(bool takeCost, float discountMod, bool guildBank)
static void SavePositionInDB(WorldLocation const &loc, uint16 zoneId, ObjectGuid guid, CharacterDatabaseTransaction trans)
void SetRaidDifficulty(Difficulty raid_difficulty)
void SetSkill(uint32 id, uint16 step, uint16 newVal, uint16 maxVal)
void SwapItem(uint16 src, uint16 dst)
WorldSession * GetSession() const
Item * GetItemByPos(uint16 pos) const
void SaveRecallPosition()
uint16 GetPureMaxSkillValue(uint32 skill) const
uint32 DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check=false)
uint16 GetSkillStep(uint32 skill) const
void SendNewItem(Item *item, uint32 count, bool received, bool created, bool broadcast=false, bool sendChatMessage=true)
bool IsGameMaster() const
void UpdateWeaponsSkillsToMaxSkillsForLevel()
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options=0)
static bool LoadPositionFromDB(uint32 &mapid, float &x, float &y, float &z, float &o, bool &in_flight, ObjectGuid guid)
void SendEquipError(InventoryResult msg, Item *pItem, Item *pItem2=nullptr, uint32 itemid=0) const
void SaveToDB(bool create=false)
uint32 GetBattlegroundId() const
InstancePlayerBind * BindToInstance(InstanceSave *save, bool permanent, BindExtensionState extendState=EXTEND_STATE_NORMAL, bool load=false)
void SetBattlegroundId(uint32 val, BattlegroundTypeId bgTypeId)
WorldLocation GetStartPosition() const
Difficulty GetDungeonDifficulty() const
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 item, uint32 count, uint32 *no_space_count=nullptr) const
bool IsBeingTeleported() const
InstancePlayerBind * GetBoundInstance(uint32 mapid, Difficulty difficulty, bool withExpired=false)
void ResurrectPlayer(float restore_percent, bool applySickness=false)
void setUInt32(uint8 index, uint32 value)
void setInt64(uint8 index, int64 value)
void setInt32(uint8 index, int32 value)
void setString(uint8 index, std::string const &value)
void ResetCooldown(uint32 spellId, bool update=false)
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, uint32 *param1=nullptr, uint32 *param2=nullptr)
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true)
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void SendAttackStateUpdate(CalcDamageInfo *damageInfo)
void DealSpellDamage(SpellNonMeleeDamage const *damageInfo, bool durabilityLoss)
static void CalcAbsorbResist(DamageInfo &damageInfo, Spell *spell=nullptr)
MotionMaster * GetMotionMaster()
static uint32 CalcArmorReducedDamage(Unit const *attacker, Unit *victim, uint32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=MAX_ATTACK, uint8 attackerLevel=0)
Aura * AddAura(uint32 spellId, Unit *target)
float GetCombatReach() const override
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const *log)
bool isPossessing() const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
SpellHistory * GetSpellHistory()
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true)
void CombatStop(bool includingCast=false, bool mutualPvP=true)
static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const *spellInfo=nullptr)
static void DealDamageMods(Unit const *victim, uint32 &damage, uint32 *absorb)
ObjectGuid GetTarget() const
uint32 GetPhaseMask() const
float GetGridActivationRange() const
void GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float relAngle=0) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
uint32 GetInstanceId() const
float GetDistance2d(WorldObject const *obj) const
std::string const & GetName() const
Transport * GetTransport() const
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
float GetDistance(WorldObject const *obj) const
Player session in the World.
void SendNotification(const char *format,...) ATTR_PRINTF(2
AccountTypes GetSecurity() const
void KickPlayer(std::string const &reason)
Kick a player out of the World.
Player * GetPlayer() const
bool HasPermission(uint32 permissionId)
uint32 GetAccountId() const
void SendShowMailBox(ObjectGuid guid)
void SendShowBank(ObjectGuid guid)
uint32 GetLatency() const
std::string const & GetPlayerName() const
static bool HandleDevCommand(ChatHandler *handler, Optional< bool > enableArg)
static bool HandleGetDistanceCommand(ChatHandler *handler, char const *args)
static bool HandleMuteHistoryHelper(uint32 accountId, char const *accountName, ChatHandler *handler)
static bool HandleDamageCommand(ChatHandler *handler, uint32 damage, Optional< SpellSchools > school, Optional< SpellInfo const * > spellInfo)
static bool HandleSaveCommand(ChatHandler *handler)
static bool HandlePlayAllCommand(ChatHandler *handler, uint32 soundId)
static bool HandleAuraCommand(ChatHandler *handler, SpellInfo const *spell)
static bool HandleUnbindSightCommand(ChatHandler *handler)
static bool HandleCooldownCommand(ChatHandler *handler, Optional< SpellInfo const * > spellArg)
static bool HandleSummonCommand(ChatHandler *handler, char const *args)
static bool HandleMuteCommand(ChatHandler *handler, Optional< PlayerIdentifier > player, uint32 muteTime, Tail muteReason)
static bool HandleBankCommand(ChatHandler *handler)
static bool HandleListFreezeCommand(ChatHandler *handler)
static bool HandleReviveCommand(ChatHandler *handler, char const *args)
static bool HandleUnAuraCommand(ChatHandler *handler, Variant< SpellInfo const *, EXACT_SEQUENCE("all")> spellArg)
static bool HandleShowAreaCommand(ChatHandler *handler, uint32 areaId)
ChatCommandTable GetCommands() const override
static bool HandleCommandsCommand(ChatHandler *handler)
static bool HandleMailBoxCommand(ChatHandler *handler)
static bool HandleDieCommand(ChatHandler *handler)
static bool HandlePInfoCommand(ChatHandler *handler, Optional< PlayerIdentifier > arg)
static bool HandleKickPlayerCommand(ChatHandler *handler, char const *args)
static bool HandleChangeWeather(ChatHandler *handler, WeatherType type, float intensity)
static bool HandleHelpCommand(ChatHandler *handler, Tail cmd)
static bool HandleRespawnCommand(ChatHandler *handler)
static bool HandleAddItemToCommand(ChatHandler *handler, char const *args)
static bool HandleMovegensCommand(ChatHandler *handler)
static bool HandleGUIDCommand(ChatHandler *handler)
static bool HandleAddItemSetCommand(ChatHandler *handler, Variant< Hyperlink< itemset >, uint32 > itemSetId)
static bool HandleGPSCommand(ChatHandler *handler, char const *args)
static bool HandleSaveAllCommand(ChatHandler *handler)
static bool HandleUnFreezeCommand(ChatHandler *handler, Optional< std::string > targetNameArg)
static bool HandleDamageGoCommand(ChatHandler *handler, Variant< Hyperlink< gameobject >, ObjectGuid::LowType > spawnId, int32 damage)
static bool HandleBindSightCommand(ChatHandler *handler)
static bool HandleComeToMeCommand(ChatHandler *handler)
static bool HandleAddItemCommand(ChatHandler *handler, char const *args)
static bool HandleUnPossessCommand(ChatHandler *handler)
static bool HandleNearGraveCommand(ChatHandler *handler, Optional< std::string > teamArg)
static bool HandleUnmuteCommand(ChatHandler *handler, char const *args)
static bool HandleDismountCommand(ChatHandler *handler)
static bool HandleRecallCommand(ChatHandler *handler, char const *args)
static bool HandleCombatStopCommand(ChatHandler *handler, char const *args)
static bool HandleHideAreaCommand(ChatHandler *handler, uint32 areaId)
static bool HandlePvPstatsCommand(ChatHandler *handler)
static bool HandleMuteHistoryCommand(ChatHandler *handler, std::string accountName)
static bool HandleMaxSkillCommand(ChatHandler *handler)
static bool HandleFlushArenaPointsCommand(ChatHandler *)
static bool HandleLinkGraveCommand(ChatHandler *handler, uint32 graveyardId, Optional< std::string > teamArg)
static bool HandleRepairitemsCommand(ChatHandler *handler, char const *args)
static bool HandleFreezeCommand(ChatHandler *handler, char const *args)
static bool HandleSetSkillCommand(ChatHandler *handler, Variant< Hyperlink< skill >, uint32 > skillId, uint32 level, Optional< uint32 > maxSkillArg)
static bool HandleItemMoveCommand(ChatHandler *handler, uint8 srcSlot, uint8 dstSlot)
static bool HandlePossessCommand(ChatHandler *handler)
static bool HandleUnstuckCommand(ChatHandler *handler, char const *args)
static bool HandleAppearCommand(ChatHandler *handler, char const *args)
void AddSC_misc_commandscript()
void SetWeather(WeatherType type, float intensity)
Set the weather.
@ CONFIG_MAX_PLAYER_LEVEL
@ CONFIG_GM_FREEZE_DURATION
@ CONFIG_SHOW_KICK_IN_WORLD
@ CONFIG_SHOW_MUTE_IN_WORLD
@ CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE
@ CONFIG_DIE_COMMAND_MODE
bool IsPathfindingEnabled(uint32 mapId)
TC_GAME_API Player * FindPlayerByName(std::string_view name)
TC_GAME_API void SaveAllPlayers()
TC_GAME_API Player * FindPlayerByLowGUID(ObjectGuid::LowType lowguid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API void SendCommandHelpFor(ChatHandler &handler, std::string_view cmd)
std::vector< ChatCommandBuilder > ChatCommandTable
GridCoord ComputeGridCoord(float x, float y)
CellCoord ComputeCellCoord(float x, float y)
@ RBAC_PERM_COMMAND_COMMANDS
@ RBAC_PERM_COMMAND_DISMOUNT
@ RBAC_PERM_COMMAND_FLUSHARENAPOINTS
@ RBAC_PERM_COMMAND_POSSESS
@ RBAC_PERM_COMMAND_NEARGRAVE
@ RBAC_PERM_COMMAND_PLAYALL
@ RBAC_PERM_COMMAND_UNFREEZE
@ RBAC_PERM_COMMAND_HIDEAREA
@ RBAC_PERM_COMMAND_SHOWAREA
@ RBAC_PERM_COMMAND_REPAIRITEMS
@ RBAC_PERM_COMMAND_BINDSIGHT
@ RBAC_PERM_COMMAND_ADDITEM
@ RBAC_PERM_COMMAND_RESPAWN
@ RBAC_PERM_COMMAND_PVPSTATS
@ RBAC_PERM_COMMAND_UNMUTE
@ RBAC_PERM_COMMAND_COOLDOWN
@ RBAC_PERM_COMMAND_COMETOME
@ RBAC_PERM_COMMAND_COMBATSTOP
@ RBAC_PERM_COMMAND_SETSKILL
@ RBAC_PERM_COMMAND_ADDITEMSET
@ RBAC_PERM_COMMANDS_SAVE_WITHOUT_DELAY
@ RBAC_PERM_COMMAND_MOVEGENS
@ RBAC_PERM_COMMAND_UNSTUCK
@ RBAC_PERM_COMMAND_REVIVE
@ RBAC_PERM_COMMAND_APPEAR
@ RBAC_PERM_COMMAND_FREEZE
@ RBAC_PERM_COMMAND_UNPOSSESS
@ RBAC_PERM_COMMAND_MAXSKILL
@ RBAC_PERM_COMMAND_SUMMON
@ RBAC_PERM_COMMAND_RECALL
@ RBAC_PERM_COMMAND_ITEMMOVE
@ RBAC_PERM_COMMAND_MAILBOX
@ RBAC_PERM_COMMAND_LISTFREEZE
@ RBAC_PERM_COMMAND_UNBINDSIGHT
@ RBAC_PERM_COMMANDS_USE_UNSTUCK_WITH_ARGS
@ RBAC_PERM_COMMAND_DAMAGE
@ RBAC_PERM_RESURRECT_WITH_FULL_HPS
@ RBAC_PERM_COMMAND_UNAURA
@ RBAC_PERM_COMMAND_WCHANGE
@ RBAC_PERM_COMMAND_LINKGRAVE
@ RBAC_PERM_COMMAND_SAVEALL
@ RBAC_PERM_COMMANDS_PINFO_CHECK_PERSONAL_DATA
@ RBAC_PERM_COMMAND_PINFO
@ RBAC_PERM_COMMAND_MUTEHISTORY
@ RBAC_PERM_COMMAND_DISTANCE
char const * AreaName[16]
AuraCreateInfo & SetCaster(Unit *caster)
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
float GetExactDist2d(const float x, const float y) const
float GetExactDist(float x, float y, float z) const
float GetPositionZ() const
float GetOrientation() const
float GetAbsoluteAngle(float x, float y) const
float GetPositionX() const
float GetPositionY() const
char const * DisplayName[16]
static Optional< PlayerIdentifier > FromTarget(ChatHandler *handler)
static Optional< PlayerIdentifier > FromTargetOrSelf(ChatHandler *handler)
struct GameObjectValue::@190 Building