From 3262ef447a9c41bef9a9a3d11f5a89a63137c4df Mon Sep 17 00:00:00 2001 From: Peter Keresztes Schmidt Date: Sat, 22 Aug 2020 22:24:28 +0200 Subject: Scripts/Commands: Fix two unreachable code issues found by PVS-studio (#25311) --- src/server/scripts/Commands/cs_gm.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index f24bcd843a4..1f6f70ecc3a 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -206,7 +206,6 @@ public: _player->SetGMVisible(true); _player->UpdateObjectVisibility(); handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE); - return true; } else { @@ -214,12 +213,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 @@ -238,19 +234,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; } }; -- cgit v1.2.3