mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
Scripts/Commands: Fix two unreachable code issues found by PVS-studio (#25311)
This commit is contained in:
committed by
GitHub
parent
6611b71457
commit
3262ef447a
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user