Example #1
0
        /// <summary>
        /// Handles the CreateGameIn packet. This packet is sent in response to our CreateGameOut
        /// request. If successful, we will request the game info.
        /// </summary>
        /// <param name="packet">The packet.</param>
        private void OnCreateGame(RealmServerPacket packet)
        {
            CreateGameIn fromServer = new CreateGameIn(packet);

            LogServer(fromServer);

            if (!fromServer.IsSuccessful())
            {
                Fail(FailureArgs.FailureTypes.FailedToCreateGame, fromServer.ToString());
                return;
            }

            GameInfoOut toServer = new GameInfoOut(settings.GameName);

            SendPacket(RealmServerPacketType.GAMEINFO, toServer.GetBytes());
        }
        /// <summary>
        /// Handles the CreateGameIn packet. This packet is sent in response to our CreateGameOut
        /// request. If successful, we will request the game info.
        /// </summary>
        /// <param name="packet">The packet.</param>
        private void OnCreateGame(RealmServerPacket packet)
        {
            CreateGameIn fromServer = new CreateGameIn(packet);
            LogServer(fromServer);

            if (!fromServer.IsSuccessful())
            {
                Fail(FailureArgs.FailureTypes.FailedToCreateGame, fromServer.ToString());
                return;
            }

            GameInfoOut toServer = new GameInfoOut(settings.GameName);
            SendPacket(RealmServerPacketType.GAMEINFO, toServer.GetBytes());
        }