From 079bc7800eeb1f5ae8201e59f91d92e980680bcb Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Tue, 13 Apr 2021 20:05:36 +0300 Subject: Core/Cheats: Power - set max power on all powers initially + on regenerate (#26235) --- src/server/scripts/Commands/cs_cheat.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp index 04850f949c7..dc046c0d2b5 100644 --- a/src/server/scripts/Commands/cs_cheat.cpp +++ b/src/server/scripts/Commands/cs_cheat.cpp @@ -152,7 +152,11 @@ public: } else if (argstr == "on") { - handler->GetSession()->GetPlayer()->SetCommandStatusOn(CHEAT_POWER); + Player* player = handler->GetSession()->GetPlayer(); + // Set max power to all powers + for (uint32 i = 0; i < MAX_POWERS; ++i) + player->SetPower(Powers(i), player->GetMaxPower(Powers(i))); + player->SetCommandStatusOn(CHEAT_POWER); handler->SendSysMessage("Power Cheat is ON. You don't need mana/rage/energy to use spells."); return true; } -- cgit v1.2.3