diff options
author | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-08-22 22:24:28 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-02-04 00:27:12 +0100 |
commit | 582b8458ea1e68075c2c20b0f4a38a7a399eae26 (patch) | |
tree | 03d0b4d642749355a4a7b61d4fa246c74509016d /src | |
parent | fc2f582d4f644387e6f1f2cbf4893adb346e86e5 (diff) |
Scripts/Commands: Fix two unreachable code issues found by PVS-studio (#25311)
(cherry picked from commit 3262ef447a9c41bef9a9a3d11f5a89a63137c4df)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Commands/cs_gm.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index acc8bd4f582..a7b863aafd3 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -208,7 +208,6 @@ public: _player->SetGMVisible(true); _player->UpdateObjectVisibility(); handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE); - return true; } else { @@ -216,12 +215,9 @@ public: _player->SetGMVisible(false); _player->UpdateObjectVisibility(); handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE); - return true; } - handler->SendSysMessage(LANG_USE_BOL); - handler->SetSentErrorMessage(true); - return false; + return true; } //Enable\Disable GM Mode @@ -240,19 +236,15 @@ public: _player->SetGameMaster(true); handler->GetSession()->SendNotification(LANG_GM_ON); _player->UpdateTriggerVisibility(); - return true; } else { _player->SetGameMaster(false); handler->GetSession()->SendNotification(LANG_GM_OFF); _player->UpdateTriggerVisibility(); - return true; } - handler->SendSysMessage(LANG_USE_BOL); - handler->SetSentErrorMessage(true); - return false; + return true; } }; |