force quit half when confirm log out
This commit is contained in:
@@ -52,6 +52,8 @@ namespace CSNetwork
|
||||
private Action<RoleInfo> _createRoleCallback;
|
||||
private RoleInfo _selectedRole;
|
||||
public bool IsConnected => _networkManager?.IsConnected ?? false;
|
||||
public bool IsConnectedInternet => Application.internetReachability != NetworkReachability.NotReachable;
|
||||
|
||||
// When true, suppress *gameplay traffic* (mostly gamedatasend C2S commands) during logout/scene transitions.
|
||||
// We still allow account/role flow protocols like rolelist/selectrole so "Return to Select Role" can work.
|
||||
private volatile bool _suppressGameplayTraffic = false;
|
||||
|
||||
@@ -11,17 +11,17 @@ namespace BrewMonster.UI
|
||||
public void OnClick()
|
||||
{
|
||||
// CECUIManager.Instance.ShowMessageBox(
|
||||
// title: "Thoát",
|
||||
// title: "Thoát",
|
||||
// message: "Đang rời khỏi Thế Giới Hoàn Mỹ",
|
||||
// messageBoxType: MessageBoxType.YesButton
|
||||
// );
|
||||
|
||||
|
||||
// CECGameRun.Instance.GetPendingLogOut().AppendForSaveConfig(new CECPendingLogoutHalf());
|
||||
// UnityGameSession.ReturnToSelectRole();
|
||||
|
||||
OnCommandRepick();
|
||||
}
|
||||
|
||||
|
||||
// void CDlgSystem3::OnCommandRepick(const char *szCommand)
|
||||
// {
|
||||
// a_LogOutput(1, "CDlgSystem3::OnCommandRepick ");
|
||||
@@ -36,8 +36,8 @@ namespace BrewMonster.UI
|
||||
// pMsgBox->SetIsModal(false);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
void OnCommandRepick()
|
||||
{
|
||||
CECUIManager.Instance.ShowMessageBoxYes("Thoát",
|
||||
@@ -47,8 +47,13 @@ namespace BrewMonster.UI
|
||||
void OnClickYes()
|
||||
{
|
||||
CECGameRun.Instance.GetPendingLogOut().AppendForSaveConfig(new CECPendingLogoutHalf());
|
||||
if (!UnityGameSession.Instance.GameSession.IsConnectedInternet)
|
||||
{
|
||||
//force log out half
|
||||
EC_Game.GetGameRun().SetLogoutFlag(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user