Added a new message in error messages

dev-ali
Hazim Bin Ijaz 1 day ago
parent a52bf9139d
commit 4d6fa4035f

@ -22,7 +22,8 @@ namespace Unity.BossRoom.ConnectionManagement
IncompatibleBuildType, //client build type is incompatible with server.
HostEndedSession, //host intentionally ended the session.
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.");
response.Approved = false;
response.Reason = JsonUtility.ToJson(ConnectStatus.ServerFull);
response.Reason = JsonUtility.ToJson(ConnectStatus.GameInProgress);
return;
}

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

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

Loading…
Cancel
Save