public static string GetFormattedText(DisconnectedByServerEvent.Types.Reason reason)
            {
                int textKey = GetTextKey(reason);

                if (textKey == 0)
                {
                    return($"DisconnectionReason: {reason}");
                }
                return(RuntimeData.FormattedText(textKey));
            }
            private static int GetTextKey(DisconnectedByServerEvent.Types.Reason reason)
            {
                switch (reason)
                {
                case DisconnectedByServerEvent.Types.Reason.Unknown:
                    return(36698);

                case DisconnectedByServerEvent.Types.Reason.Error:
                    return(64692);

                case DisconnectedByServerEvent.Types.Reason.ServerIsStopping:
                    return(37906);

                case DisconnectedByServerEvent.Types.Reason.UnableToLoadAccount:
                    return(86571);

                case DisconnectedByServerEvent.Types.Reason.LoggedInAgainWithSameAccount:
                    return(18083);

                default:
                    Log.Warning($"Reason '{reason}' not handled", 171, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Utility\\TextCollectionUtility.cs");
                    return(0);
                }
            }
예제 #3
0
 public ServerDisconnectionInfo(DisconnectedByServerEvent.Types.Reason reason)
 {
     this.reason = reason;
 }