Added a new message in error messages

dev-ali
Hazim Bin Ijaz 2 days ago
parent a52bf9139d
commit 4d6fa4035f

@ -22,7 +22,8 @@ namespace Unity.BossRoom.ConnectionManagement
IncompatibleBuildType, //client build type is incompatible with server. IncompatibleBuildType, //client build type is incompatible with server.
HostEndedSession, //host intentionally ended the session. HostEndedSession, //host intentionally ended the session.
StartHostFailed, // server failed to bind StartHostFailed, // server failed to bind
StartClientFailed // failed to connect to server and/or invalid network endpoint StartClientFailed, // failed to connect to server and/or invalid network endpoint
GameInProgress //failed to connect because a game is already in progress
} }

@ -124,7 +124,7 @@ namespace Unity.BossRoom.ConnectionManagement
{ {
Debug.Log($"Connection denied for client {clientId}: Game is already in progress."); Debug.Log($"Connection denied for client {clientId}: Game is already in progress.");
response.Approved = false; response.Approved = false;
response.Reason = JsonUtility.ToJson(ConnectStatus.ServerFull); response.Reason = JsonUtility.ToJson(ConnectStatus.GameInProgress);
return; return;
} }

@ -88,7 +88,7 @@ namespace Unity.BossRoom.ConnectionManagement
{ {
Debug.Log($"Connection denied for client {clientId}: Game is already in progress."); Debug.Log($"Connection denied for client {clientId}: Game is already in progress.");
response.Approved = false; response.Approved = false;
response.Reason = JsonUtility.ToJson(ConnectStatus.ServerFull); response.Reason = JsonUtility.ToJson(ConnectStatus.GameInProgress);
return; return;
} }

@ -68,6 +68,9 @@ namespace Unity.BossRoom.Gameplay.UI
case ConnectStatus.StartClientFailed: case ConnectStatus.StartClientFailed:
PopupManager.ShowPopupPanel("Connection Failed", "Starting client failed."); PopupManager.ShowPopupPanel("Connection Failed", "Starting client failed.");
break; break;
case ConnectStatus.GameInProgress:
PopupManager.ShowPopupPanel("Connection Failed", "A Game is already in progress. Please try again when it has ended");
break;
default: default:
Debug.LogWarning($"New ConnectStatus {status} has been added, but no connect message defined for it."); Debug.LogWarning($"New ConnectStatus {status} has been added, but no connect message defined for it.");
break; break;

Loading…
Cancel
Save