Core/Commands: Added .debug playercondition command
Port From (https://github.com/TrinityCore/TrinityCore/commit/781ca507dd470087d663fde13df2cfde37a07335)
This commit is contained in:
@@ -777,6 +777,28 @@ namespace Game.Chat
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("playercondition", RBACPermissions.CommandDebug)]
|
||||
static bool HandleDebugPlayerConditionCommand(CommandHandler handler, uint playerConditionId)
|
||||
{
|
||||
Player target = handler.GetSelectedPlayerOrSelf();
|
||||
if (!target)
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.PlayerNotFound);
|
||||
return false;
|
||||
}
|
||||
|
||||
var playerConditionEntry = CliDB.PlayerConditionStorage.LookupByKey(playerConditionId);
|
||||
if (playerConditionEntry == null)
|
||||
return false;
|
||||
|
||||
if (ConditionManager.IsPlayerMeetingCondition(target, playerConditionEntry))
|
||||
handler.SendSysMessage($"PlayerCondition {playerConditionId} met");
|
||||
else
|
||||
handler.SendSysMessage($"PlayerCondition {playerConditionId} not met");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("pvp warmode", RBACPermissions.CommandDebug, true)]
|
||||
static bool HandleDebugWarModeBalanceCommand(CommandHandler handler, string command, int? rewardValue)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user