BattleNet.RealmServer.GameJoin C# (CSharp) Метод

GameJoin() защищенный Метод

protected GameJoin ( byte type, List data ) : void
type byte
data List
Результат void
        protected void GameJoin(byte type, List<byte> data)
        {
            UInt32 result = BitConverter.ToUInt32(data.ToArray(), 17);

            switch(result) {
                case 0x00:
                    if (ClientlessBot.debugging) Console.WriteLine("{0}: [MCP] Successfully joined the game",m_owner.Account);
                    break;

                case 0x29:
                    Console.WriteLine("{0}: [MCP] Password is incorrect",m_owner.Account);
                    break;

                case 0x2A:
                    Console.WriteLine("{0}: [MCP] Game does not exist" ,m_owner.Account);

                    break;

                case 0x2B:
                    Console.WriteLine("{0}: [MCP] Game is full" ,m_owner.Account);
                    break;

                case 0x2C:
                    Console.WriteLine("{0}: [MCP] You do not meet the level requirements for this game" ,m_owner.Account);
                    break;

                case 0x71:
                    Console.WriteLine("{0}: [MCP] A non-hardcore character cannot join a game created by a Hardcore character." ,m_owner.Account);
                    break;

                case 0x73:
                    Console.WriteLine("{0}: [MCP] Unable to join a Nightmare game." ,m_owner.Account);
                    break;

                case 0x74:
                    Console.WriteLine("{0}: [MCP] Unable to join a Hell game." ,m_owner.Account);
                    break;

                case 0x78:
                    Console.WriteLine("{0}: [MCP] A non-expansion character cannot join a game created by an Expansion character." ,m_owner.Account);
                    break;

                case 0x79:
                    Console.WriteLine("{0}: [MCP] A Expansion character cannot join a game created by a non-expansion character." ,m_owner.Account);
                    break;

                case 0x7D:
                    Console.WriteLine("{0}: [MCP] A non-ladder character cannot join a game created by a Ladder character." ,m_owner.Account);
                    break;
            }

            if (result == 0) {
                UInt32 ip = (UInt32) IPAddress.NetworkToHostOrder((int)BitConverter.ToUInt32(data.ToArray(), 9));
                m_owner.GsIp = IPAddress.Parse(ip.ToString());
                m_owner.GsHash = data.GetRange(13, 4);
                m_owner.GsToken = data.GetRange(5, 2);

                m_owner.StartGameServerThread();
            }
        }