Ejemplo n.º 1
0
        /// <summary>
        /// Upgrades a CM2 equipment set to a CM3 equipment set file.
        /// </summary>
        public AppearanceFile Upgrade()
        {
            AppearanceFile file = new AppearanceFile();

            file.MainHand = this.MainHand.Upgrade();
            file.OffHand  = this.OffHand.Upgrade();

            byte[] data = this.StringtoBytes(this.EquipmentBytes);

            // From CM2: CharacterDetailsView2.xaml.cs line 801
            file.HeadGear              = new AppearanceFile.ItemSave();
            file.HeadGear.ModelBase    = (ushort)(data[0] + (data[1] * 256));
            file.HeadGear.ModelVariant = data[2];
            file.HeadGear.DyeId        = data[3];

            file.Body              = new AppearanceFile.ItemSave();
            file.Body.ModelBase    = (ushort)(data[4] + (data[5] * 256));
            file.Body.ModelVariant = data[6];
            file.Body.DyeId        = data[7];

            file.Hands              = new AppearanceFile.ItemSave();
            file.Hands.ModelBase    = (ushort)(data[8] + (data[9] * 256));
            file.Hands.ModelVariant = data[10];
            file.Hands.DyeId        = data[11];

            file.Legs              = new AppearanceFile.ItemSave();
            file.Legs.ModelBase    = (ushort)(data[12] + (data[13] * 256));
            file.Legs.ModelVariant = data[14];
            file.Legs.DyeId        = data[15];

            file.Feet              = new AppearanceFile.ItemSave();
            file.Feet.ModelBase    = (ushort)(data[16] + (data[17] * 256));
            file.Feet.ModelVariant = data[18];
            file.Feet.DyeId        = data[19];

            file.Ears              = new AppearanceFile.ItemSave();
            file.Ears.ModelBase    = (ushort)(data[20] + (data[21] * 256));
            file.Ears.ModelVariant = data[22];

            file.Neck              = new AppearanceFile.ItemSave();
            file.Neck.ModelBase    = (ushort)(data[24] + (data[25] * 256));
            file.Neck.ModelVariant = data[26];

            file.Wrists              = new AppearanceFile.ItemSave();
            file.Wrists.ModelBase    = (ushort)(data[28] + (data[29] * 256));
            file.Wrists.ModelVariant = data[30];

            file.RightRing              = new AppearanceFile.ItemSave();
            file.RightRing.ModelBase    = (ushort)(data[32] + (data[33] * 256));
            file.RightRing.ModelVariant = data[34];

            file.LeftRing              = new AppearanceFile.ItemSave();
            file.LeftRing.ModelBase    = (ushort)(data[36] + (data[37] * 256));
            file.LeftRing.ModelVariant = data[38];

            return(file);
        }
Ejemplo n.º 2
0
        public new FileBase Upgrade()
        {
            AppearanceFile allFile = base.Upgrade();

            byte[] data = this.StringtoBytes(this.CharacterBytes);

            // From CM2: MainWindow.xaml.cs line 708
            allFile.Race               = (Appearance.Races)data[0];
            allFile.Gender             = (Appearance.Genders)data[1];
            allFile.Age                = (Appearance.Ages)data[2];
            allFile.Height             = data[3];
            allFile.Tribe              = (Appearance.Tribes)data[4];
            allFile.Head               = data[5];
            allFile.Hair               = data[6];
            allFile.EnableHighlights   = data[7] != 0;
            allFile.Skintone           = data[8];
            allFile.REyeColor          = data[9];
            allFile.HairTone           = data[10];
            allFile.Highlights         = data[11];
            allFile.FacialFeatures     = (Appearance.FacialFeature)data[12];
            allFile.LimbalEyes         = data[13];
            allFile.Eyebrows           = data[14];
            allFile.LEyeColor          = data[15];
            allFile.Eyes               = data[16];
            allFile.Nose               = data[17];
            allFile.Jaw                = data[18];
            allFile.Mouth              = data[19];
            allFile.LipsToneFurPattern = data[20];
            allFile.EarMuscleTailSize  = data[21];
            allFile.TailEarsType       = data[22];
            allFile.Bust               = data[23];
            allFile.FacePaint          = data[24];
            allFile.FacePaintColor     = data[25];

            /*
             * allFile.SkinTint = new Color((float)this.characterDetails.SkinRedPigment.value, (float)this.characterDetails.SkinGreenPigment.value, (float)this.characterDetails.SkinBluePigment.value);
             * allFile.SkinGlow = new Color((float)this.characterDetails.SkinRedGloss.value, (float)this.characterDetails.SkinGreenGloss.value, (float)this.characterDetails.SkinBlueGloss.value);
             * allFile.LeftEyeColor = new Color((float)this.characterDetails.LeftEyeRed.value, (float)this.characterDetails.LeftEyeGreen.value, (float)this.characterDetails.LeftEyeBlue.value);
             * allFile.RightEyeColor = new Color((float)this.characterDetails.RightEyeRed.value, (float)this.characterDetails.RightEyeGreen.value, (float)this.characterDetails.RightEyeBlue.value);
             * allFile.LimbalRingColor = new Color((float)this.characterDetails.LimbalR.value, (float)this.characterDetails.LimbalG.value, (float)this.characterDetails.LimbalB.value);
             * allFile.HairTint = new Color((float)this.characterDetails.HairRedPigment.value, (float)this.characterDetails.HairGreenPigment.value, (float)this.characterDetails.HairBluePigment.value);
             * allFile.HairGlow = new Color((float)this.characterDetails.HairGlowRed.value, (float)this.characterDetails.HairGlowGreen.value, (float)this.characterDetails.HairGlowBlue.value);
             * allFile.HighlightTint = new Color((float)this.characterDetails.HighlightRedPigment.value, (float)this.characterDetails.HighlightGreenPigment.value, (float)this.characterDetails.HighlightBluePigment.value);
             * allFile.LipTint = new Color4((float)this.characterDetails.LipsR.value, (float)this.characterDetails.LipsG.value, (float)this.characterDetails.LipsB.value, (float)this.characterDetails.LipsBrightness.value);
             */

            return(allFile);
        }