示例#1
0
        public static void Send(LobbyClient client)
        {
            PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_LOGIN_SUCCESS);
            Out.WriteUnicodeString(client.Account.RealTag,48);

            Out.WriteUInt32R(21); // Account Type

            Out.WriteInt64R(TCPManager.GetTimeStamp());

            // Temps avant expiration du compte
            Out.WriteByte(0x13); // ms
            Out.WriteByte(0x29); // sec
            Out.WriteUInt16R(0x12); // Hour

            // Date de création
            Out.WriteByte(0x0E); // day
            Out.WriteByte(0x07); // month
            Out.WriteUInt16R(2010); // Year

            Out.WriteInt32R(1450); // Temps de jeu (secondes)
            Out.WriteInt32R(client.Account.Points); // Points APB

            for(int i=1;i<6;++i)
                Out.WriteInt32R(
                    Program.FileMgr.GetFileVersion(client.Account.Id, i, true, "", "")); // Config file, Server Version

            Out.WriteInt32R(0);

            Out.WriteUInt16(0x957D);
            Out.WriteUInt16(0x0400);

            Out.WriteUInt16(0x5052);
            Out.WriteUInt16(0x4F45);
            Out.WriteUInt16(0x552E);
            Out.WriteUInt16(0x3232);
            Out.WriteUInt16(0x3738);
            Out.WriteUInt16(0x3031);
            Out.WriteUInt16(0);

            Out.WriteUInt16(0x0067);

            Out.WriteUInt64(0x526C624331313256);
            Out.WriteUInt64(0x486E314100000000);
            Out.WriteUInt16(0);
            Out.WriteStringBytes("");
            Out.WriteByte(0);

            client.SendTCP(Out);

            ANS_CHARACTER_INFO.Send(client);
        }
示例#2
0
        public static void Send(LobbyClient client)
        {
            List<WorldInfo> _Worlds = Program.CharMgr.GetWorlds();

            PacketOut Out = new PacketOut((UInt32)Opcodes.WORLD_LIST);
            Out.WriteInt32R(0); // Returned Code

            Out.WriteUInt16R((UInt16)_Worlds.Count); // World Count

            foreach (WorldInfo Info in _Worlds)
            {
                Out.WriteUInt32R((UInt32)Info._Info.Id); // WorldUid

                Out.WriteUnicodeString(Info._Info.Name, 32); // WorldName

                Out.WriteByte((byte)(Info.RpcID == 0 ? 0 : 1)); // Status
                Out.WriteByte(Info._Info.Population); // Pop  0:Low 1:Medium 2:High
                Out.WriteByte(Info._Info.Enf); // enf recommended , true or false
                Out.WriteByte(Info._Info.Crim); // crim recommended , true or false
            }

            client.SendTCP(Out);
        }