diff --git a/Source/Game/Chat/CommandHandler.cs b/Source/Game/Chat/CommandHandler.cs index 93b526952..085ed47f3 100644 --- a/Source/Game/Chat/CommandHandler.cs +++ b/Source/Game/Chat/CommandHandler.cs @@ -389,7 +389,7 @@ namespace Game.Chat playerGuid = ObjectGuid.Empty; playerName = ""; - if (!args.Empty()) + if (args != null && !args.Empty()) { string name = ExtractPlayerNameFromLink(args); if (string.IsNullOrEmpty(name)) diff --git a/Source/Game/Chat/Commands/CheatCommands.cs b/Source/Game/Chat/Commands/CheatCommands.cs index e827516cc..481a6b5b8 100644 --- a/Source/Game/Chat/Commands/CheatCommands.cs +++ b/Source/Game/Chat/Commands/CheatCommands.cs @@ -123,7 +123,12 @@ namespace Game.Chat.Commands } else if (argstr == "on") { - handler.GetSession().GetPlayer().SetCommandStatusOn(PlayerCommandStates.Power); + Player player = handler.GetSession().GetPlayer(); + // Set max power to all powers + for (PowerType powerType = 0; powerType < PowerType.Max; ++powerType) + player.SetPower(powerType, player.GetMaxPower(powerType)); + + player.SetCommandStatusOn(PlayerCommandStates.Power); handler.SendSysMessage("Power Cheat is ON. You don't need mana/rage/energy to use spells."); return true; } diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index dbe41b93f..b61b74a09 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -3812,6 +3812,9 @@ namespace Game.Entities } } + if (GetCommandStatus(PlayerCommandStates.Power)) + curValue = maxPower; + if (m_regenTimerCount >= 2000) SetPower(power, curValue); else