Пример #1
0
        void HandleConnectToFailed(ConnectToFailed connectToFailed)
        {
            if (_worldSession != null)
            {
                if (_worldSession.PlayerLoading())
                {
                    switch (connectToFailed.Serial)
                    {
                    case ConnectToSerial.WorldAttempt1:
                        _worldSession.SendConnectToInstance(ConnectToSerial.WorldAttempt2);
                        break;

                    case ConnectToSerial.WorldAttempt2:
                        _worldSession.SendConnectToInstance(ConnectToSerial.WorldAttempt3);
                        break;

                    case ConnectToSerial.WorldAttempt3:
                        _worldSession.SendConnectToInstance(ConnectToSerial.WorldAttempt4);
                        break;

                    case ConnectToSerial.WorldAttempt4:
                        _worldSession.SendConnectToInstance(ConnectToSerial.WorldAttempt5);
                        break;

                    case ConnectToSerial.WorldAttempt5:
                    {
                        Log.outError(LogFilter.Network, "{0} failed to connect 5 times to world socket, aborting login", _worldSession.GetPlayerInfo());
                        _worldSession.AbortLogin(LoginFailureReason.NoWorld);
                        break;
                    }

                    default:
                        return;
                    }
                }
                //else
                //{
                //    transfer_aborted when/if we get map node redirection
                //    SendPacket(*WorldPackets.Auth.ResumeComms());
                //}
            }
        }