コード例 #1
0
        public override void Read()
        {
            CreateInfo = new CharacterCreateInfo();
            uint nameLength     = _worldPacket.ReadBits <uint>(6);
            bool hasTemplateSet = _worldPacket.HasBit();

            CreateInfo.IsTrialBoost = _worldPacket.HasBit();

            CreateInfo.RaceId          = (Race)_worldPacket.ReadUInt8();
            CreateInfo.ClassId         = (Class)_worldPacket.ReadUInt8();
            CreateInfo.Sex             = (Gender)_worldPacket.ReadUInt8();
            CreateInfo.Skin            = _worldPacket.ReadUInt8();
            CreateInfo.Face            = _worldPacket.ReadUInt8();
            CreateInfo.HairStyle       = _worldPacket.ReadUInt8();
            CreateInfo.HairColor       = _worldPacket.ReadUInt8();
            CreateInfo.FacialHairStyle = _worldPacket.ReadUInt8();
            CreateInfo.OutfitId        = _worldPacket.ReadUInt8();

            for (var i = 0; i < CreateInfo.CustomDisplay.GetLimit(); ++i)
            {
                CreateInfo.CustomDisplay[i] = _worldPacket.ReadUInt8();
            }

            CreateInfo.Name = _worldPacket.ReadString(nameLength);
            if (CreateInfo.TemplateSet.HasValue)
            {
                CreateInfo.TemplateSet.Set(_worldPacket.ReadUInt32());
            }
        }
コード例 #2
0
        public override void Read()
        {
            CreateInfo = new CharacterCreateInfo();
            uint nameLength     = _worldPacket.ReadBits <uint>(6);
            bool hasTemplateSet = _worldPacket.HasBit();

            CreateInfo.IsTrialBoost = _worldPacket.HasBit();
            CreateInfo.UseNPE       = _worldPacket.HasBit();

            CreateInfo.RaceId  = (Race)_worldPacket.ReadUInt8();
            CreateInfo.ClassId = (Class)_worldPacket.ReadUInt8();
            CreateInfo.Sex     = (Gender)_worldPacket.ReadUInt8();
            var customizationCount = _worldPacket.ReadUInt32();

            CreateInfo.Name = _worldPacket.ReadString(nameLength);
            if (CreateInfo.TemplateSet.HasValue)
            {
                CreateInfo.TemplateSet.Set(_worldPacket.ReadUInt32());
            }

            for (var i = 0; i < customizationCount; ++i)
            {
                CreateInfo.Customizations[i] = new ChrCustomizationChoice()
                {
                    ChrCustomizationOptionID = _worldPacket.ReadUInt32(),
                    ChrCustomizationChoiceID = _worldPacket.ReadUInt32()
                };
            }

            CreateInfo.Customizations.Sort();
        }