Ejemplo n.º 1
0
        /// <summary>
        /// Sends a CharacterCreate packet to the LoginServer.
        /// </summary>
        /// <param name="Character">The character to create.</param>
        /// <param name="TimeStamp">The timestamp of when this character was created.</param>
        public static void SendCharacterCreate(TSOClient.VM.Sim Character, string TimeStamp)
        {
            PacketStream Packet = new PacketStream((byte)PacketType.CHARACTER_CREATE, 0);

            Packet.WritePascalString(PlayerAccount.Client.ClientEncryptor.Username);
            Packet.WritePascalString(TimeStamp);
            Packet.WritePascalString(Character.Name);
            Packet.WritePascalString(Character.Sex);
            Packet.WritePascalString(Character.Description);
            Packet.WriteUInt64(Character.HeadOutfitID);
            Packet.WriteUInt64(Character.BodyOutfitID);
            Packet.WriteByte((byte)Character.AppearanceType);

            Packet.WritePascalString(Character.ResidingCity.Name);
            Packet.WriteUInt64(Character.ResidingCity.Thumbnail);
            Packet.WritePascalString(Character.ResidingCity.UUID);
            Packet.WriteUInt64(Character.ResidingCity.Map);
            Packet.WritePascalString(Character.ResidingCity.IP);
            Packet.WriteInt32(Character.ResidingCity.Port);

            byte[] PacketData = Packet.ToArray();
            PlayerAccount.Client.SendEncrypted((byte)PacketType.CHARACTER_CREATE, PacketData);
        }