diff options
| author | Matan Shukry <matanshukry@gmail.com> | 2021-04-13 20:05:36 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-13 19:05:36 +0200 |
| commit | 079bc7800eeb1f5ae8201e59f91d92e980680bcb (patch) | |
| tree | 7d84c960e558384b76ff5c639c439a055617dd24 /src/server/scripts/Commands | |
| parent | 38ad6c2cf043c640c798a1467b8ad71265fd9c6c (diff) | |
Core/Cheats: Power - set max power on all powers initially + on regenerate (#26235)
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_cheat.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |
