Example #1
0
        public override void OnLoginDataMessage(NetworkConnection conn, LoginServerMessage message)
        {
            if (message.serverAddress == noServerConstant)
            {
                SpawnPlayerWithoutLoginServer(conn);
                return;
            }

            loginManager.UpdateApiAddress(message.serverAddress, conn, SpawnPlayerWithLoginServer);
            loginManager.ApiHeartbeat(BeginLoginProcedure);
        }
Example #2
0
        /**
         * The client recieves the message informing them of the Login Server,
         * Uses this to start the player's character select process
         */
        private void OnLoginDataMessage(NetworkConnection conn, LoginServerMessage message)
        {
            if (message.serverAddress == null) {
                SpawnPlayerWithoutLoginServer(conn);
                return;
            }

            // Update our login server to match theirs. Attempt to connect.
            // If successful, hand over control to the LoginManager, telling it to call SpawnPlayerWithLoginServer when
            // the user has chosen their player.
            loginManager.UpdateApiAddress(message.serverAddress, character => SpawnPlayerWithLoginServer(conn, character));
            loginManager.ApiHeartbeat(BeginLoginProcedure);
        }
Example #3
0
        public override void OnServerConnect(NetworkConnection conn)
        {
            //Must always send a message, so the client knows if they should spawn through the login server or not
            LoginServerMessage message = new LoginServerMessage()
            {
                serverAddress = noServerConstant
            };

            if (hasLoginServer)
            {
                message.serverAddress = loginServerAddress;
            }

            conn.Send(message);
        }
Example #4
0
 public virtual void OnLoginDataMessage(NetworkConnection conn, LoginServerMessage message)
 {
 }