コード例 #1
0
        public RacialGenderScalingParameter(RacialScalingParameter rsp, XivSubRace race, XivGender gender)
        {
            Race   = race;
            Gender = gender;

            if (gender == XivGender.Male)
            {
                MinSize = rsp.MaleMinSize;
                MaxSize = rsp.MaleMaxSize;
                MinTail = rsp.MaleMinTail;
                MaxTail = rsp.MaleMaxTail;
            }
            else if (gender == XivGender.Female)
            {
                MinSize = rsp.FemaleMinSize;
                MaxSize = rsp.FemaleMaxSize;
                MinTail = rsp.FemaleMinTail;
                MaxTail = rsp.FemaleMaxTail;

                BustMinX = rsp.BustMinX;
                BustMinY = rsp.BustMinY;
                BustMinZ = rsp.BustMinZ;

                BustMaxX = rsp.BustMaxX;
                BustMaxY = rsp.BustMaxY;
                BustMaxZ = rsp.BustMaxZ;
            }
        }
コード例 #2
0
        public RacialGenderScalingParameter GetScalingParameter(XivSubRace Race, XivGender Gender)
        {
            var offset = ((int)Race.GetBaseRace() * 10) + Race.GetSubRaceId();
            var rsp    = RawRacialData[offset];
            var rgsp   = new RacialGenderScalingParameter(rsp, Race, Gender);

            return(rgsp);
        }
コード例 #3
0
ファイル: CMP.cs プロジェクト: goaaats/xivModdingFramework-1
        public static string GetRgspPath(XivSubRace race, XivGender gender)
        {
            var subraceId    = (int)race;
            var genderId     = (int)gender;
            var rgspFilePath = String.Format(RgspPathFormat, subraceId, genderId);

            return(rgspFilePath);
        }
コード例 #4
0
        public RaceGenderScalingEditor(XivSubRace race, XivGender gender)
        {
            Race   = race;
            Gender = gender;
            InitializeComponent();

            Race   = race;
            Gender = gender;
        }
コード例 #5
0
        public RacialGenderScalingParameter(byte[] data)
        {
            var offset = 0;
            var byte0  = data[offset];

            ushort version = 0;

            if (byte0 != 255)
            {
                version = 1;
            }
            else
            {
                offset++;

                version = BitConverter.ToUInt16(data, offset);
                offset += 2;
            }

            Race = (XivSubRace)data[offset];
            offset++;
            Gender = (XivGender)data[offset];
            offset++;

            MinSize = BitConverter.ToSingle(data, offset);
            offset += 4;
            MaxSize = BitConverter.ToSingle(data, offset);
            offset += 4;

            MinTail = BitConverter.ToSingle(data, offset);
            offset += 4;
            MaxTail = BitConverter.ToSingle(data, offset);
            offset += 4;

            BustMinX = BitConverter.ToSingle(data, offset);
            offset  += 4;
            BustMinY = BitConverter.ToSingle(data, offset);
            offset  += 4;
            BustMinZ = BitConverter.ToSingle(data, offset);
            offset  += 4;

            BustMaxX = BitConverter.ToSingle(data, offset);
            offset  += 4;
            BustMaxY = BitConverter.ToSingle(data, offset);
            offset  += 4;
            BustMaxZ = BitConverter.ToSingle(data, offset);
            offset  += 4;
        }
コード例 #6
0
        private Button MakeButton(XivSubRace race, XivGender gender)
        {
            var btn     = new Button();
            var context = new ButtonContext()
            {
                Race = race, Gender = gender
            };

            btn.DataContext = context;

            var text = race.GetDisplayName();

            btn.Content = text;
            btn.Margin  = new Thickness(5);

            btn.Click += Btn_Click;

            return(btn);
        }
コード例 #7
0
ファイル: CMP.cs プロジェクト: goaaats/xivModdingFramework-1
        /// <summary>
        /// Disables the .rgsp file for this race, if it exists, and restores the .cmp file for the race back to default.
        /// </summary>
        /// <param name="race"></param>
        /// <param name="gender"></param>
        /// <returns></returns>
        public static async Task DisableRgspMod(XivSubRace race, XivGender gender)
        {
            var path     = GetRgspPath(race, gender);
            var _modding = new Modding(XivCache.GameInfo.GameDirectory);


            var modlist = await _modding.GetModListAsync();

            var mod = modlist.Mods.FirstOrDefault(x => x.fullPath == path);

            if (mod != null && mod.enabled)
            {
                await _modding.ToggleModStatus(path, false);
            }
            else
            {
                var def = await GetScalingParameter(race, gender, true);
                await SetScalingParameter(def);
            }
        }
コード例 #8
0
ファイル: CMP.cs プロジェクト: goaaats/xivModdingFramework-1
        public static async Task <RacialGenderScalingParameter> GetScalingParameter(XivSubRace race, XivGender gender, bool forceOriginal = false, IndexFile index = null, ModList modlist = null)
        {
            var cmp = await GetCharaMakeParameterSet(forceOriginal, index, modlist);

            return(cmp.GetScalingParameter(race, gender));
        }
コード例 #9
0
ファイル: CMP.cs プロジェクト: goaaats/xivModdingFramework-1
        /// <summary>
        /// Restores the default settings back into the CMP file.
        /// Does NOT delete .rgsp entry.
        /// </summary>
        /// <param name="race"></param>
        /// <param name="gender"></param>
        /// <param name="index"></param>
        /// <param name="modlist"></param>
        /// <returns></returns>
        internal static async Task RestoreDefaultScaling(XivSubRace race, XivGender gender, IndexFile index = null, ModList modlist = null)
        {
            var defaults = await GetScalingParameter(race, gender, true, index, modlist);

            await SetScalingParameter(defaults, index, modlist);
        }