71 std::span<ChatCommandBuilder const>
GetCommands()
const override
106 {
"play", debugPlayCommandTable },
107 {
"send", debugSendCommandTable },
138 {
"debug", debugCommandTable },
146 if (
"a" == args ||
"alliance" == args)
148 else if (
"h" == args ||
"horde" == args)
150 else if (
"n" == args ||
"neutral" == args)
165 switch (command.index())
175 sWorld->SetForcedWarModeFactionBalanceState(
TEAM_HORDE, rewardValue.value_or(0));
181 sWorld->DisableForcedWarModeFactionBalanceState();
206 handler->
PSendSysMessage(
"%02u - %7ums [%s (%f degrees)]", count, cam.timeStamp, cam.locations.ToString().c_str(), cam.locations.GetOrientation() * (180 /
M_PI));
289 player->
PlayObjectSound(soundKitId, player->
GetGUID(), player, broadcastTextId.has_value() ? *broadcastTextId : 0);
300 castFailed.
Reason = result;
301 castFailed.
FailedArg1 = failArg1.value_or(-1);
302 castFailed.
FailedArg2 = failArg2.value_or(-1);
345 std::ifstream ifs(
"opcode.txt");
350 std::stringstream parsedStream;
353 char commentToken[2] = {};
354 ifs.get(commentToken[0]);
357 if (commentToken[0] ==
'/')
359 ifs.get(commentToken[1]);
363 if (commentToken[1] ==
'*')
367 ifs.get(commentToken[0]);
370 if (commentToken[0] ==
'*')
372 ifs.get(commentToken[1]);
375 if (commentToken[1] ==
'/')
378 ifs.putback(commentToken[1]);
384 else if (commentToken[1] ==
'/')
387 std::getline(ifs, str);
394 ifs.putback(commentToken[1]);
397 parsedStream.put(commentToken[0]);
402 parsedStream >> opcode;
409 while (!parsedStream.eof() && !parsedStream.fail())
412 parsedStream >> type;
419 if (parsedStream.eof())
422 parsedStream >> val1;
423 if (parsedStream.fail())
427 else if (type ==
"uint16")
429 if (parsedStream.eof())
432 parsedStream >> val2;
433 if (parsedStream.fail())
437 else if (type ==
"uint32")
439 if (parsedStream.eof())
442 parsedStream >> val3;
443 if (parsedStream.fail())
447 else if (type ==
"uint64")
449 if (parsedStream.eof())
452 parsedStream >> val4;
453 if (parsedStream.fail())
457 else if (type ==
"float")
459 if (parsedStream.eof())
462 parsedStream >> val5;
463 if (parsedStream.fail())
467 else if (type ==
"string")
470 parsedStream >> val6;
474 else if (type ==
"goguid")
485 else if (type ==
"myguid")
489 else if (type ==
"itsguid")
493 else if (type ==
"itspos")
499 else if (type ==
"mypos")
507 TC_LOG_ERROR(
"misc",
"Sending opcode that has unknown type '{}'", type);
544 channelNotify.
Type = type;
591 bool listQueue =
false;
592 bool checkAll =
false;
594 if (itemState ==
"unchanged")
596 else if (itemState ==
"changed")
598 else if (itemState ==
"new")
600 else if (itemState ==
"removed")
602 else if (itemState ==
"queue")
604 else if (itemState ==
"check_all")
613 if (!listQueue && !checkAll)
615 itemState =
"The player has the following " + itemState +
" items: ";
626 for (
uint8 j = 0; j < bag->GetBagSize(); ++j)
627 if (
Item* item2 = bag->GetItemByPos(j))
628 if (item2->GetState() == state)
629 handler->
PSendSysMessage(
"bag: 255 slot: %d %s owner: %s", item2->GetSlot(), item2->GetGUID().ToString().c_str(), item2->GetOwnerGUID().ToString().c_str());
631 else if (item->GetState() == state)
632 handler->
PSendSysMessage(
"bag: 255 slot: %d %s owner: %s", item->GetSlot(), item->GetGUID().ToString().c_str(), item->GetOwnerGUID().ToString().c_str());
640 for (
size_t i = 0; i < updateQueue.size(); ++i)
642 Item* item = updateQueue[i];
668 if (updateQueue.empty())
701 handler->
PSendSysMessage(
"The item with slot %d %s has a container (slot: %d, %s) but shouldn't!", item->
GetSlot(), item->
GetGUID().
ToString().c_str(), container->GetSlot(), container->GetGUID().ToString().c_str());
709 if (qp > updateQueue.size())
716 if (updateQueue[qp] ==
nullptr)
723 if (updateQueue[qp] != item)
725 handler->
PSendSysMessage(
"The item with slot %d and %s has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, %s)", item->
GetSlot(), item->
GetGUID().
ToString().c_str(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().ToString().c_str());
739 for (
uint8 j = 0; j < bag->GetBagSize(); ++j)
741 Item* item2 = bag->GetItemByPos(j);
767 if (container != bag)
777 if (qp > updateQueue.size())
779 handler->
PSendSysMessage(
"The item in bag %d at slot %d having %s has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item2->
GetSlot(), item2->
GetGUID().
ToString().c_str(), qp);
784 if (updateQueue[qp] ==
nullptr)
786 handler->
PSendSysMessage(
"The item in bag %d at slot %d having %s has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->
GetSlot(), item2->
GetGUID().
ToString().c_str(), qp);
791 if (updateQueue[qp] != item2)
793 handler->
PSendSysMessage(
"The item in bag %d at slot %d having %s has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, %s)", bag->GetSlot(), item2->
GetSlot(), item2->
GetGUID().
ToString().c_str(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().ToString().c_str());
808 for (
size_t i = 0; i < updateQueue.size(); ++i)
810 Item* item = updateQueue[i];
823 handler->
PSendSysMessage(
"queue(%zu): For the item %s, the queuepos doesn't match it's position in the queue!", i, item->
GetGUID().
ToString().c_str());
865 handler->
PSendSysMessage(
"BattlemasterListId %u does not exist or is not an arena.", battlemasterListId);
870 if (!battlemasterListId || !handler || !handler->
GetSession())
892 if (threatenedByMe.empty())
897 for (
auto const& pair : threatenedByMe)
919 char const* onlineStr;
920 switch (ref->GetOnlineState())
923 onlineStr =
" [SUPPRESSED]";
926 onlineStr =
" [OFFLINE]";
931 char const* tauntStr;
932 if (unit == fixateVictim)
933 tauntStr =
" [FIXATE]";
935 switch (ref->GetTauntState())
938 tauntStr =
" [TAUNT]";
941 tauntStr =
" [DETAUNT]";
992 handler->
PSendSysMessage(
"- Multi-school threat modifiers (%zu entries):", mods.size());
993 for (
auto const& pair : mods)
1000 if (redirectInfo.empty())
1004 handler->
PSendSysMessage(
" - %02zu redirects being applied:", redirectInfo.size());
1005 for (
auto const& pair : redirectInfo)
1008 handler->
PSendSysMessage(
" |-- % 2.1f%% to %s", pair.second, unit ? unit->
GetName().c_str() : pair.first.ToString().c_str());
1016 if (redirectRegistry.empty())
1020 handler->
PSendSysMessage(
" - %02zu spells may have redirects registered", redirectRegistry.size());
1021 for (
auto const& outerPair : redirectRegistry)
1024 handler->
PSendSysMessage(
" |-- #%06u %s (%zu entries):", outerPair.first, spell ? (*spell->
SpellName)[
sWorld->GetDefaultDbcLocale()] :
"<unknown>", outerPair.second.size());
1025 for (
auto const& innerPair : outerPair.second)
1028 handler->
PSendSysMessage(
" |-- % 2.1f%% to %s", innerPair.second, unit ? unit->
GetName().c_str() : innerPair.first.ToString().c_str());
1046 Unit* unit = ref.second->GetOther(target);
1051 Unit* unit = ref.second->GetOther(target);
1074 if (!passenger || passenger == target)
1079 handler->
PSendSysMessage(
"Unit %u entered vehicle %hhd", entry, *seatId);
1117 std::ostringstream ss;
1118 while (ss.str().size() < 128000)
1119 ss <<
"This is a dummy string to push the packet's size beyond 128000 bytes. ";
1158 unit->HandleEmoteCommand(emote);
1219 if (moveFlagsExtra2)
1241 TC_LOG_INFO(
"sql.dev",
"(@PATH, XX, {:.3f}, {:.3f}, {:.5f}, {:.5f}, 0, 0, 0, 100, 0),", player->
GetPositionX(), player->
GetPositionY(), player->
GetPositionZ(), player->
GetOrientation());
1243 handler->
PSendSysMessage(
"Waypoint SQL written to SQL Developer log");
1269 handler->
PSendSysMessage(
"Transport %s %s", transport->
GetName().c_str(), start ?
"started" :
"stopped");
1277 sMapMgr->DoForAllMapsWithMapId(*mapId, [&](
Map* map)
1334 if (duration <= 0s || duration >= 30min)
1396 bool daily =
false, weekly =
false, monthly =
false;
1398 daily = weekly = monthly =
true;
1399 else if (arg ==
"DAILY")
1401 else if (arg ==
"WEEKLY")
1403 else if (arg ==
"MONTHLY")
1415 sWorld->ResetWeeklyQuests();
1420 sWorld->ResetMonthlyQuests();
1436 nearestLoc = bf->GetClosestGraveyard(player);
1438 nearestLoc =
sObjectMgr->GetClosestGraveyard(*player, player->
GetTeam(), player);
1445 float distNearest = std::numeric_limits<float>::max();
1447 for (
auto&& kvp :
sObjectMgr->GetWorldSafeLocs())
1449 if (kvp.second.Loc.GetMapId() == player->
GetMapId())
1451 float dist = (kvp.second.Loc.GetPositionX() - x) * (kvp.second.Loc.GetPositionX() - x)
1452 + (kvp.second.Loc.GetPositionY() - y) * (kvp.second.Loc.GetPositionY() - y)
1453 + (kvp.second.Loc.GetPositionZ() - z) * (kvp.second.Loc.GetPositionZ() - z);
1454 if (dist < distNearest)
1457 nearestLoc = &kvp.second;
1477 bool explain =
false;
1479 if (optArg.holds_alternative<
uint32>())
1480 groupID = optArg.get<
uint32>();
1484 if (groupID && !
sObjectMgr->GetSpawnGroupData(groupID))
1486 handler->
PSendSysMessage(
"There is no spawn group with ID %u.", groupID);
1491 Map const*
const map = player->
GetMap();
1492 char const*
const mapName = map->
GetMapName();
1502 handler->
PSendSysMessage(
"%s's instance script does not manage any spawn groups.", mapName);
1507 std::map<uint32, std::set<std::tuple<bool, uint8, uint8>>> store;
1510 if (groupID && info.SpawnGroupId != groupID)
1521 store[info.SpawnGroupId].emplace(isSpawn, info.BossStateId, info.BossStates);
1524 if (groupID && store.find(groupID) == store.end())
1526 handler->
PSendSysMessage(
"%s's instance script does not manage group '%s'.", mapName,
sObjectMgr->GetSpawnGroupData(groupID)->name.c_str());
1534 for (
auto const& pair : store)
1541 bool isBlocked =
false, isSpawned =
false;
1542 for (
auto const& tuple : pair.second)
1544 bool const isSpawn = std::get<0>(tuple);
1545 uint8 const bossStateId = std::get<1>(tuple);
1547 if (std::get<2>(tuple) & (1 << actualState))
1564 handler->
PSendSysMessage(
" | |-- '%s' could've been %s if boss state %u matched mask 0x%02x; but it is %s -> 0x%02x, which does not match.",
1565 groupData->
name.c_str(), isSpawn ?
"allowed to spawn" :
"blocked from spawning", bossStateId, std::get<2>(tuple),
InstanceScript::GetBossStateName(actualState), (1 << actualState));
1568 handler->
PSendSysMessage(
" | |=> '%s' is not active due to a blocking rule being matched", groupData->
name.c_str());
1570 handler->
PSendSysMessage(
" | |=> '%s' is active due to a spawn rule being matched", groupData->
name.c_str());
1572 handler->
PSendSysMessage(
" | |=> '%s' is not active due to none of its rules being matched", groupData->
name.c_str());
1625 if (!wsExpressionEntry)
1629 handler->
PSendSysMessage(
"WorldStateExpression %u met", expressionId);
1631 handler->
PSendSysMessage(
"WorldStateExpression %u not met", expressionId);
1648 handler->
PSendSysMessage(
"PlayerCondition %u met", playerConditionId);
1650 handler->
PSendSysMessage(
"PlayerCondition %u not met", playerConditionId);
1658 uint8 stack_array[10] = {};
1661 handler->PSendSysMessage(
"Triggered an array out of bounds read at address %p, value %u",
static_cast<void*
>(stack_array + size), stack_array[size]);
1670 handler->PSendSysMessage(
"Leaked 1 uint8 object at address %p",
static_cast<void*
>(leak));
1679 sMapMgr->DoForAllMapsWithMapId(mapId.value(),
1680 [handler](
Map* map) ->
void
1682 HandleDebugGuidLimitsMap(handler, map);
1689 [handler](
Map* map) ->
void
1711 sMapMgr->DoForAllMapsWithMapId(mapId.value(),
1712 [handler](
Map* map) ->
void
1714 HandleDebugObjectCountMap(handler, map);
1721 [handler](
Map* map) ->
void
1734 void Visit(std::unordered_map<ObjectGuid, Creature*>
const& creatureMap)
1736 for (
auto const& [_, creature] : creatureMap)
1741 static void Visit(std::unordered_map<ObjectGuid, T*>
const&) { }
1746 std::vector<std::pair<uint32, uint32>> result;
1750 result.reserve(count + 1);
1754 if (result.size() >= count && result.back().second > creatureCount)
1757 auto where = std::ranges::lower_bound(result, creatureCount, std::ranges::greater(), Trinity::TupleElement<1>);
1758 result.emplace(where, creatureId, creatureCount);
1759 if (result.size() > count)
1801 handler->
SendSysMessage(
"This command does nothing right now. Edit your local core (cs_debug.cpp) to make it do whatever you need for testing.");
DB2Storage< DifficultyEntry > sDifficultyStore("Difficulty.db2", &DifficultyLoadInfo::Instance)
DB2Storage< MapEntry > sMapStore("Map.db2", &MapLoadInfo::Instance)
DB2Storage< WorldStateExpressionEntry > sWorldStateExpressionStore("WorldStateExpression.db2", &WorldStateExpressionLoadInfo::Instance)
DB2Storage< MovieEntry > sMovieStore("Movie.db2", &MovieLoadInfo::Instance)
DB2Storage< SoundKitEntry > sSoundKitStore("SoundKit.db2", &SoundKitLoadInfo::Instance)
DB2Storage< VehicleEntry > sVehicleStore("Vehicle.db2", &VehicleLoadInfo::Instance)
DB2Storage< CinematicSequencesEntry > sCinematicSequencesStore("CinematicSequences.db2", &CinematicSequencesLoadInfo::Instance)
std::chrono::seconds Seconds
Seconds shorthand typedef.
#define CENTER_GRID_OFFSET
@ LANG_COMMAND_OBJNOTFOUND
@ LANG_DEBUG_AREATRIGGER_ON
@ LANG_CINEMATIC_NOT_EXIST
@ LANG_COMMAND_OPCODESENT
@ LANG_COMMAND_NEARGRAVEYARD
@ LANG_SELECT_CHAR_OR_CREATURE
@ LANG_COMMAND_NEARGRAVEYARD_NOTFOUND
@ LANG_DEBUG_AREATRIGGER_OFF
#define TC_LOG_DEBUG(filterType__, message__,...)
#define TC_LOG_ERROR(filterType__, message__,...)
#define TC_LOG_INFO(filterType__, message__,...)
std::vector< FlyByCamera > const * GetFlyByCameras(uint32 cinematicCameraId)
@ TEMPSUMMON_MANUAL_DESPAWN
std::optional< T > Optional
Optional helper class to wrap optional values within.
#define INVENTORY_SLOT_BAG_0
Role Based Access Control related classes definition.
@ LINEOFSIGHT_CHECK_GOBJECT
TC_COMMON_API bool StringEqualI(std::string_view str1, std::string_view str2)
bool Utf8ToUpperOnlyLatin(std::string &utf8String)
std::string TimeToHumanReadable(time_t t)
ObjectGuid const & GetGUID() const
static void QueuePlayerForArena(Player const *player, uint8 teamSize, uint8 roles)
Player * getSelectedPlayerOrSelf()
Player * getSelectedPlayer()
WorldSession * GetSession()
virtual LocaleConstant GetSessionDbcLocale() const
Creature * getSelectedCreature()
void SetSentErrorMessage(bool val)
Player * GetPlayer() const
void PSendSysMessage(char const *fmt, Args &&... args)
virtual void SendSysMessage(std::string_view str, bool escapeCharacters=false)
GameObject * GetNearbyGameObject()
std::unordered_map< ObjectGuid, PvPCombatReference * > const & GetPvPCombatRefs() const
std::unordered_map< ObjectGuid, CombatReference * > const & GetPvECombatRefs() const
static bool IsMeetingWorldStateExpression(Map const *map, WorldStateExpressionEntry const *expression)
static bool IsPlayerMeetingCondition(Player const *player, uint32 conditionId)
static Conversation * CreateConversation(uint32 conversationEntry, Unit *creator, Position const &pos, ObjectGuid privateObjectOwner, SpellInfo const *spellInfo=nullptr, bool autoStart=true)
int32 VisualizeBoundary(Seconds duration, Unit *owner=nullptr, bool fill=false) const
static Creature * CreateCreature(uint32 entry, Map *map, Position const &pos, uint32 vehId=0)
GuidUnorderedSet const & GetTapList() const
ObjectGuid::LowType GetSpawnId() const
static char const * ToConstant(Enum value)
GOState GetGoState() const
static char const * GetBossStateName(uint8 state)
EncounterState GetBossState(uint32 id) const
std::vector< InstanceSpawnGroupInfo > const *const _instanceSpawnGroups
ItemTemplate const * GetTemplate() const
ItemUpdateState GetState() const
uint16 GetQueuePos() const
ObjectGuid GetOwnerGUID() const
bool IsInUpdateQueue() const
MapStoredObjectTypesContainer & GetObjectsStore()
void LoadGrid(float x, float y)
ObjectGuid::LowType GetMaxLowGuid()
bool IsSpawnGroupActive(uint32 groupId) const
char const * GetMapName() const
uint32 GetInstanceId() const
size_t GetActiveNonPlayersCount() const
static ObjectGuid const Empty
std::string ToString() const
bool AddVisibleMapId(uint32 visibleMapId, TerrainSwapInfo const *visibleMapInfo, int32 references=1)
bool AddUiMapPhaseId(uint32 uiMapPhaseId, int32 references=1)
bool AddPhase(uint32 phaseId, PhaseFlags flags, std::vector< Condition > const *areaConditions, int32 references=1)
static void PrintToChat(ChatHandler *chat, WorldObject const *target)
static void InheritPhaseShift(WorldObject *target, WorldObject const *source)
static void SendToPlayer(Player const *player, PhaseShift const &phaseShift)
void SendMovieStart(uint32 movieId)
void SendEquipError(InventoryResult msg, Item const *item1=nullptr, Item const *item2=nullptr, uint32 itemId=0) const
void SendPlayerChoice(ObjectGuid sender, int32 choiceId)
void SendSellError(SellResult msg, Creature *creature, ObjectGuid guid) const
WorldSession * GetSession() const
Item * GetItemByPos(uint16 pos) const
bool ModifierTreeSatisfied(uint32 modifierTreeId) const
void DestroyItem(uint8 bag, uint8 slot, bool update)
void SendBuyError(BuyResult msg, Creature *creature, uint32 item, uint32 param) const
void SendCinematicStart(uint32 CinematicSequenceId) const
void SendCanTakeQuestResponse(QuestFailedReason reason, bool sendErrorMessage=true, std::string reasonText="") const
std::vector< Item * > & GetItemUpdateQueue()
void SendPushToPartyResponse(Player const *player, QuestPushReason reason, Quest const *quest=nullptr) const
void UpdateObjectVisibility(bool forced=true) override
Item * GetItemByGuid(ObjectGuid guid) const
LocalizedString const * SpellName
std::array< float, MAX_SPELL_SCHOOL > _singleSchoolModifiers
auto const & GetThreatenedByMeList() const
bool IsThreatListEmpty(bool includeOffline=false) const
static bool CanHaveThreatList(Unit const *who)
std::unordered_map< uint32, std::unordered_map< ObjectGuid, float > > _redirectRegistry
Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > GetSortedThreatList() const
std::unordered_map< std::underlying_type< SpellSchoolMask >::type, float > _multiSchoolModifiers
Unit * GetFixateTarget() const
std::vector< std::pair< ObjectGuid, float > > _redirectInfo
@ ONLINE_STATE_SUPPRESSED
void EnableMovement(bool enabled)
void Visit(TypeContainer &c)
void EnterVehicle(Unit *base, int8 seatId=-1)
void SetExtraUnitMovementFlags2(uint32 f)
uint32 GetUnitMovementFlags() const
ThreatManager & GetThreatManager()
void SetUnitMovementFlags(uint32 f)
float GetCombatReach() const override
void ModifyAuraState(AuraStateType flag, bool apply)
uint32 GetExtraUnitMovementFlags() const
CombatManager & GetCombatManager()
void SetExtraUnitMovementFlags(uint32 f)
virtual bool IsEngaged() const
ObjectGuid GetTarget() const
constexpr uint32 GetMapId() const
TempSummon * SummonPersonalClone(Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, Player *privateObjectOwner=nullptr)
void PlayDirectSound(uint32 soundId, Player const *target=nullptr, uint32 broadcastTextId=0) const
virtual void SendMessageToSet(WorldPacket const *data, bool self) const
InstanceScript * GetInstanceScript() const
void GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float relAngle=0) const
void PlayDirectMusic(uint32 musicId, Player const *target=nullptr) const
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
TransportBase * GetTransport() const
void PlayDistanceSound(uint32 soundId, Player const *target=nullptr) const
std::string const & GetName() const
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
void DestroyForNearbyPlayers()
MovementInfo m_movementInfo
void PlayObjectSound(int32 soundKitId, ObjectGuid targetObject, Player const *target=nullptr, int32 broadcastTextId=0) const
std::string _Channel
Channel Name.
WorldPacket const * Write() override
void Initialize(ChatMsg chatType, Language language, WorldObject const *sender, WorldObject const *receiver, std::string_view message, uint32 achievementId=0, std::string_view channelName="", LocaleConstant locale=DEFAULT_LOCALE, std::string_view addonPrefix="")
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
Player * GetPlayer() const
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
static PersistentWorldVariable const NextMonthlyQuestResetTimeVarId
static PersistentWorldVariable const NextDailyQuestResetTimeVarId
static PersistentWorldVariable const NextWeeklyQuestResetTimeVarId
static void Visit(std::unordered_map< ObjectGuid, T * > const &)
std::vector< std::pair< uint32, uint32 > > GetTopCreatureCount(std::size_t count) const
std::unordered_map< uint32, uint32 > creatureCountsById
void Visit(std::unordered_map< ObjectGuid, Creature * > const &creatureMap)
static bool HandleDebugThreatListCommand(ChatHandler *handler)
static bool HandleDebugGetItemStateCommand(ChatHandler *handler, std::string itemState)
static bool HandleDebugSendLargePacketCommand(ChatHandler *handler)
std::span< ChatCommandBuilder const > GetCommands() const override
static void HandleDebugGuidLimitsMap(ChatHandler *handler, Map *map)
static bool HandleDebugPlayerConditionCommand(ChatHandler *handler, uint32 playerConditionId)
static bool HandleDebugModifierTreeCommand(ChatHandler *handler, uint32 modifierTreeId)
static bool HandleDebugRaidResetCommand(ChatHandler *handler, uint32 mapId, Optional< uint32 > difficulty)
static bool HandleDebugSendChatMsgCommand(ChatHandler *handler, ChatMsg type)
static bool HandleDebugLoadCellsCommandHelper(ChatHandler *handler, Map *map, Optional< uint32 > tileX, Optional< uint32 > tileY)
static bool HandleDebugAreaTriggersCommand(ChatHandler *handler)
static bool HandleDebugSendSellErrorCommand(ChatHandler *handler, SellResult error)
static bool HandleDebugSendSpellFailCommand(ChatHandler *handler, SpellCastResult result, Optional< int32 > failArg1, Optional< int32 > failArg2)
static bool HandleDebugTransportCommand(ChatHandler *handler, std::string operation)
static bool HandleDebugGetLootRecipientCommand(ChatHandler *handler)
static bool HandleDebugLoSCommand(ChatHandler *handler)
static bool HandleDebugPlayMovieCommand(ChatHandler *handler, uint32 movieId)
static bool HandleWPGPSCommand(ChatHandler *handler)
static bool HandleDebugOutOfBounds(ChatHandler *handler)
static bool HandleDebugSendOpcodeCommand(ChatHandler *handler)
static bool HandleDebugDummyCommand(ChatHandler *handler)
static bool HandleDebugSendEquipErrorCommand(ChatHandler *handler, InventoryResult error)
static bool HandleDebugThreatInfoCommand(ChatHandler *handler)
static bool HandleDebugSpawnVehicleCommand(ChatHandler *handler, uint32 entry, Optional< uint32 > id)
static bool HandleDebugPlayMusicCommand(ChatHandler *handler, uint32 musicId)
static bool HandleDebugWSExpressionCommand(ChatHandler *handler, uint32 expressionId)
static bool HandleDebugBattlegroundCommand(ChatHandler *)
static bool HandleDebugSendBuyErrorCommand(ChatHandler *handler, BuyResult error)
static bool TryExtractTeamId(std::string const &args, TeamId &outFaction)
static bool HandleDebugPhaseCommand(ChatHandler *handler)
static bool HandleDebugWarModeBalanceCommand(ChatHandler *handler, Variant< uint32, EXACT_SEQUENCE("alliance"), EXACT_SEQUENCE("horde"), EXACT_SEQUENCE("neutral"), EXACT_SEQUENCE("off")> command, Optional< int32 > rewardValue)
static bool HandleDebugObjectCountCommand(ChatHandler *handler, Optional< uint32 > mapId)
static bool HandleDebugSendChannelNotifyCommand(ChatHandler *handler, ChatNotify type)
static bool HandleDebugSendQuestPartyMsgCommand(ChatHandler *handler, QuestPushReason msg)
static bool HandleDebugGuidLimitsCommand(ChatHandler *handler, Optional< uint32 > mapId)
static bool HandleDebugCombatListCommand(ChatHandler *handler)
static bool HandleDebugLoadCellsCommand(ChatHandler *handler, Optional< uint32 > mapId, Optional< uint32 > tileX, Optional< uint32 > tileY)
static bool HandleDebugEnterVehicleCommand(ChatHandler *handler, uint32 entry, Optional< int8 > seatId)
static bool HandleDebugSendPlayerChoiceCommand(ChatHandler *handler, int32 choiceId)
static bool HandleDebugMemoryLeak(ChatHandler *handler)
static bool HandleDebugItemExpireCommand(ChatHandler *handler, ObjectGuid::LowType guid)
static bool HandleDebugSendQuestInvalidMsgCommand(ChatHandler *handler, QuestFailedReason msg)
static bool HandleDebugQuestResetCommand(ChatHandler *handler, std::string arg)
static bool HandleDebugPlayCinematicCommand(ChatHandler *handler, uint32 cinematicId)
static bool HandleDebugPlayObjectSoundCommand(ChatHandler *handler, int32 soundKitId, Optional< int32 > broadcastTextId)
static void HandleDebugObjectCountMap(ChatHandler *handler, Map *map)
static bool HandleDebugInstanceSpawns(ChatHandler *handler, Variant< uint32, EXACT_SEQUENCE("explain")> optArg)
static bool HandleDebugNearGraveyard(ChatHandler *handler, Optional< EXACT_SEQUENCE("linked")> linked)
static bool HandleDebugMoveflagsCommand(ChatHandler *handler, Optional< uint32 > moveFlags, Optional< uint32 > moveFlagsExtra, Optional< uint32 > moveFlagsExtra2)
static bool HandleDebugConversationCommand(ChatHandler *handler, uint32 conversationEntry)
static bool HandleDebugAnimCommand(ChatHandler *handler, Emote emote)
static bool HandleDebugBecomePersonalClone(ChatHandler *handler)
static bool HandleDebugSendSetPhaseShiftCommand(ChatHandler *handler, Optional< uint32 > phaseId, Optional< uint32 > visibleMapId, Optional< uint32 > uiMapPhaseId)
static bool HandleDebugUpdateWorldStateCommand(ChatHandler const *handler, int32 variable, int32 value)
static bool HandleDebugArenaCommand(ChatHandler *handler, uint32 battlemasterListId)
static bool HandleDebugBoundaryCommand(ChatHandler *handler, Optional< EXACT_SEQUENCE("fill")> fill, Optional< uint32 > durationArg)
static bool HandleDebugSetAuraStateCommand(ChatHandler *handler, Optional< AuraStateType > state, bool apply)
static bool HandleDebugPlaySoundCommand(ChatHandler *handler, uint32 soundId, Optional< uint32 > broadcastTextId)
void AddSC_debug_commandscript()
@ CONFIG_RESPAWN_GUIDALERTLEVEL
@ CONFIG_RESPAWN_GUIDWARNLEVEL
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
ChatCommandBuilder const [] ChatCommandTable
TC_GAME_API void SetValue(int32 worldStateId, int32 value, bool hidden, Map *map)
@ RBAC_PERM_COMMAND_DEBUG
static void VisitAllObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
std::array< uint16, 8 > Camera
constexpr float GetPositionX() const
constexpr float GetPositionY() const
std::string ToString() const
constexpr void GetPosition(float &x, float &y) const
constexpr float GetOrientation() const
constexpr float GetPositionZ() const