mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Commands: Added .debug playercondition command
This commit is contained in:
@@ -118,8 +118,9 @@ public:
|
||||
{ "raidreset", HandleDebugRaidResetCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
|
||||
{ "neargraveyard", HandleDebugNearGraveyard, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
|
||||
{ "instancespawn", HandleDebugInstanceSpawns, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
|
||||
{ "conversation" , HandleDebugConversationCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
|
||||
{ "wsexpression" , HandleDebugWSExpressionCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
|
||||
{ "conversation", HandleDebugConversationCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
|
||||
{ "wsexpression", HandleDebugWSExpressionCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
|
||||
{ "playercondition", HandleDebugPlayerConditionCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
|
||||
{ "pvp warmode", HandleDebugWarModeBalanceCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes },
|
||||
{ "dummy", HandleDebugDummyCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
|
||||
{ "asan memoryleak", HandleDebugMemoryLeak, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes },
|
||||
@@ -1577,13 +1578,36 @@ public:
|
||||
if (!wsExpressionEntry)
|
||||
return false;
|
||||
|
||||
if (sConditionMgr->IsPlayerMeetingExpression(target, wsExpressionEntry))
|
||||
if (ConditionMgr::IsPlayerMeetingExpression(target, wsExpressionEntry))
|
||||
handler->PSendSysMessage("Expression %u meet", expressionId);
|
||||
else
|
||||
handler->PSendSysMessage("Expression %u not meet", expressionId);
|
||||
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
static bool HandleDebugPlayerConditionCommand(ChatHandler* handler, uint32 playerConditionId)
|
||||
{
|
||||
Player* target = handler->getSelectedPlayerOrSelf();
|
||||
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
PlayerConditionEntry const* playerConditionEntry = sPlayerConditionStore.LookupEntry(playerConditionId);
|
||||
if (!playerConditionEntry)
|
||||
return false;
|
||||
|
||||
if (ConditionMgr::IsPlayerMeetingCondition(target, playerConditionEntry))
|
||||
handler->PSendSysMessage("PlayerCondition %u met", playerConditionId);
|
||||
else
|
||||
handler->PSendSysMessage("PlayerCondition %u not met", playerConditionId);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleDebugOutOfBounds([[maybe_unused]] ChatHandler* handler)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user