Scripts/Commands: Fix two unreachable code issues found by PVS-studio (#25311)
(cherry picked from commit 3262ef447a9c41bef9a9a3d11f5a89a63137c4df)
This commit is contained in:
committed by
Shauren
parent
fc2f582d4f
commit
582b8458ea
@@ -208,7 +208,6 @@ public:
|
|||||||
_player->SetGMVisible(true);
|
_player->SetGMVisible(true);
|
||||||
_player->UpdateObjectVisibility();
|
_player->UpdateObjectVisibility();
|
||||||
handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE);
|
handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -216,12 +215,9 @@ public:
|
|||||||
_player->SetGMVisible(false);
|
_player->SetGMVisible(false);
|
||||||
_player->UpdateObjectVisibility();
|
_player->UpdateObjectVisibility();
|
||||||
handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE);
|
handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handler->SendSysMessage(LANG_USE_BOL);
|
return true;
|
||||||
handler->SetSentErrorMessage(true);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Enable\Disable GM Mode
|
//Enable\Disable GM Mode
|
||||||
@@ -240,19 +236,15 @@ public:
|
|||||||
_player->SetGameMaster(true);
|
_player->SetGameMaster(true);
|
||||||
handler->GetSession()->SendNotification(LANG_GM_ON);
|
handler->GetSession()->SendNotification(LANG_GM_ON);
|
||||||
_player->UpdateTriggerVisibility();
|
_player->UpdateTriggerVisibility();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_player->SetGameMaster(false);
|
_player->SetGameMaster(false);
|
||||||
handler->GetSession()->SendNotification(LANG_GM_OFF);
|
handler->GetSession()->SendNotification(LANG_GM_OFF);
|
||||||
_player->UpdateTriggerVisibility();
|
_player->UpdateTriggerVisibility();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handler->SendSysMessage(LANG_USE_BOL);
|
return true;
|
||||||
handler->SetSentErrorMessage(true);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user