Core/Cheats: Power - set max power on all powers initially + on regenerate (#26235)

This commit is contained in:
Matan Shukry
2021-04-13 19:05:36 +02:00
committed by GitHub
parent 38ad6c2cf0
commit 079bc7800e
2 changed files with 8 additions and 1 deletions
+5 -1
View File
@@ -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;
}