Esempio n. 1
0
        public override void Read()
        {
            RaceOrFactionChangeInfo = new CharRaceOrFactionChangeInfo();

            RaceOrFactionChangeInfo.FactionChange = _worldPacket.HasBit();

            uint nameLength = _worldPacket.ReadBits <uint>(6);

            RaceOrFactionChangeInfo.Guid   = _worldPacket.ReadPackedGuid();
            RaceOrFactionChangeInfo.SexID  = (Gender)_worldPacket.ReadUInt8();
            RaceOrFactionChangeInfo.RaceID = (Race)_worldPacket.ReadUInt8();

            RaceOrFactionChangeInfo.SkinID            = _worldPacket.ReadUInt8();
            RaceOrFactionChangeInfo.HairColorID       = _worldPacket.ReadUInt8();
            RaceOrFactionChangeInfo.HairStyleID       = _worldPacket.ReadUInt8();
            RaceOrFactionChangeInfo.FacialHairStyleID = _worldPacket.ReadUInt8();
            RaceOrFactionChangeInfo.FaceID            = _worldPacket.ReadUInt8();

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

            RaceOrFactionChangeInfo.Name = _worldPacket.ReadString(nameLength);
        }
Esempio n. 2
0
        public override void Read()
        {
            RaceOrFactionChangeInfo = new CharRaceOrFactionChangeInfo();

            RaceOrFactionChangeInfo.FactionChange = _worldPacket.HasBit();

            uint nameLength = _worldPacket.ReadBits <uint>(6);

            RaceOrFactionChangeInfo.Guid   = _worldPacket.ReadPackedGuid();
            RaceOrFactionChangeInfo.SexID  = (Gender)_worldPacket.ReadUInt8();
            RaceOrFactionChangeInfo.RaceID = (Race)_worldPacket.ReadUInt8();
            var customizationCount = _worldPacket.ReadUInt32();

            RaceOrFactionChangeInfo.Name = _worldPacket.ReadString(nameLength);

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

            RaceOrFactionChangeInfo.Customizations.Sort();
        }