mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
[Client] Avoid fetching guiMessageBox.type again for every condition
This commit is contained in:
parent
0917184359
commit
7efb374f75
1 changed files with 6 additions and 4 deletions
|
@ -667,13 +667,15 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
getLocalPlayer()->guiMessageBox.type,
|
||||
getLocalPlayer()->guiMessageBox.label.c_str());
|
||||
|
||||
if (getLocalPlayer()->guiMessageBox.type == BasePlayer::GUIMessageBox::MessageBox)
|
||||
int messageBoxType = getLocalPlayer()->guiMessageBox.type;
|
||||
|
||||
if (messageBoxType == BasePlayer::GUIMessageBox::MessageBox)
|
||||
Main::get().getGUIController()->showMessageBox(getLocalPlayer()->guiMessageBox);
|
||||
else if (getLocalPlayer()->guiMessageBox.type == BasePlayer::GUIMessageBox::CustomMessageBox)
|
||||
else if (messageBoxType == BasePlayer::GUIMessageBox::CustomMessageBox)
|
||||
Main::get().getGUIController()->showCustomMessageBox(getLocalPlayer()->guiMessageBox);
|
||||
else if (getLocalPlayer()->guiMessageBox.type == BasePlayer::GUIMessageBox::InputDialog)
|
||||
else if (messageBoxType == BasePlayer::GUIMessageBox::InputDialog)
|
||||
Main::get().getGUIController()->showInputBox(getLocalPlayer()->guiMessageBox);
|
||||
else if (getLocalPlayer()->guiMessageBox.type == BasePlayer::GUIMessageBox::ListBox)
|
||||
else if (messageBoxType == BasePlayer::GUIMessageBox::ListBox)
|
||||
Main::get().getGUIController()->showDialogList(getLocalPlayer()->guiMessageBox);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue