コード例 #1
0
        private void OnClassUpdated(object sender, HookEventArgs args)
        {
            Debugger.WriteLine("Updating maid and/or yotogi class info.");
            MaidInfo maid = SelectedMaid;

            if (maid == null)
            {
                Debugger.WriteLine(LogLevel.Warning, "Maid is NULL!");
                return;
            }

            if (maid.Maid != args.CallerMaid)
            {
                Debugger.WriteLine(LogLevel.Warning, "Caller maid is not the selected one! Aborting...");
                return;
            }

            if (valueUpdateQueue[currentQueue].ContainsKey(args.Tag))
            {
                Debugger.WriteLine(LogLevel.Error, "Tag already in update queue! Aborting...");
                return;
            }
            switch (args.Tag)
            {
            case MaidChangeType.MaidClassType:
                valueUpdateQueue[currentQueue].Add(args.Tag, () => maid.UpdateMaidClasses());
                break;

            case MaidChangeType.YotogiClassType:
                valueUpdateQueue[currentQueue].Add(args.Tag, () => maid.UpdateYotogiClasses());
                break;

            case MaidChangeType.MaidAndYotogiClass:
                valueUpdateQueue[currentQueue].Add(
                    args.Tag,
                    () =>
                {
                    maid.UpdateMaidBonusValues();
                    maid.UpdateMaidClasses();
                    maid.UpdateYotogiClasses();
                });
                break;
            }
        }
コード例 #2
0
        private void SetMaxClassLevel(object sender, EventArgs e)
        {
            MaidInfo selected = SelectedMaid;
            Maid     maid     = selected.Maid;

            for (int maidClass = 0; maidClass < EnumHelper.MaxMaidClass; maidClass++)
            {
                SetClassIsHave(maid, "maid_class_data", maidClass, true);
                SetClassLevel(maid, "maid_class_data", maidClass, 10);
            }
            selected.UpdateMaidClasses();

            foreach (int yotogiClass in EnumHelper.EnabledYotogiClasses)
            {
                SetClassIsHave(maid, "yotogi_class_data", yotogiClass, true);
                SetClassLevel(maid, "yotogi_class_data", yotogiClass, 10);
            }
            selected.UpdateYotogiClasses();
        }
コード例 #3
0
        private void SetClassLevel(object sender, EventArgs e)
        {
            Debugger.WriteLine(LogLevel.Info, "Prompting class level set.");
            uint       v;
            TextDialog td = new TextDialog(Translation.GetTranslation("GUI_CLASS_LVL_TITLE"),
                                           Translation.GetTranslation("GUI_CLASS_LVL_PROMPT"), "0",
                                           s => uint.TryParse(s, out v) && (v <= 10), Translation.GetTranslation("OK"),
                                           Translation.GetTranslation("CANCEL"))
            {
                StartPosition = FormStartPosition.CenterParent
            };
            DialogResult dr = td.ShowDialog(this);

            Debugger.WriteLine(LogLevel.Info, $"Prompt result: {EnumHelper.GetName(dr)}, {td.Input}");

            if (dr != DialogResult.OK)
            {
                return;
            }
            v = uint.Parse(td.Input);
            int val = (int)v;

            td.Dispose();

            MaidInfo selected = SelectedMaid;
            Maid     maid     = selected.Maid;

            for (int maidClass = 0; maidClass < EnumHelper.MaxMaidClass; maidClass++)
            {
                SetClassIsHave(maid, "maid_class_data", maidClass, true);
                SetClassLevel(maid, "maid_class_data", maidClass, val);
            }
            selected.UpdateMaidClasses();

            foreach (int yotogiClass in EnumHelper.EnabledYotogiClasses)
            {
                SetClassIsHave(maid, "yotogi_class_data", yotogiClass, true);
                SetClassLevel(maid, "yotogi_class_data", yotogiClass, val);
            }

            selected.UpdateYotogiClasses();
        }
コード例 #4
0
        private void SetUnlockMaxAllMaids(object sender, EventArgs e)
        {
            foreach (var maid in loadedMaids)
            {
                MaidInfo  maidInfo    = maid.Value;
                Maid      currentMaid = maid.Key;
                MaidParam maidParam   = currentMaid.Param;
                Debugger.WriteLine(LogLevel.Info,
                                   $"Setting all to max for {currentMaid.Param.status.first_name} {currentMaid.Param.status.last_name}");

                for (int maidClass = 0; maidClass < EnumHelper.MaxMaidClass; maidClass++)
                {
                    SetClassIsHave(currentMaid, "maid_class_data", maidClass, true);
                    SetClassLevel(currentMaid, "maid_class_data", maidClass, 10);
                }
                maidInfo.UpdateMaidClasses();

                foreach (int yotogiClass in EnumHelper.EnabledYotogiClasses)
                {
                    SetClassIsHave(currentMaid, "yotogi_class_data", yotogiClass, true);
                    SetClassLevel(currentMaid, "yotogi_class_data", yotogiClass, 10);
                }
                maidInfo.UpdateYotogiClasses();

                maidParam.SetSexualMouth(1000);
                maidParam.SetSexualCuri(1000);
                maidParam.SetSexualNipple(1000);
                maidParam.SetSexualThroat(1000);

                for (Feature i = Feature.Null + 1; i < EnumHelper.MaxFeature; i++)
                {
                    maidParam.SetFeature(i, true);
                }

                for (Propensity i = Propensity.Null + 1; i < EnumHelper.MaxPropensity; i++)
                {
                    maidParam.SetPropensity(i, true);
                }

                maidParam.SetCare(9999);
                maidParam.SetCharm(9999);
                maidParam.SetElegance(9999);
                maidParam.SetEvaluation(999999L);
                maidParam.SetFrustration(0);
                maidParam.SetHentai(9999);
                maidParam.SetHousi(9999);
                maidParam.SetHp(999);
                maidParam.SetInyoku(9999);
                maidParam.SetLikability(999);
                maidParam.SetLovely(9999);
                maidParam.SetMValue(9999);
                maidParam.SetMaidPoint(999);
                maidParam.SetPlayNumber(9999);
                maidParam.SetMind(9999);
                maidParam.SetReason(9999);
                maidParam.SetReception(9999);
                maidParam.SetPopularRank(99);
                maidParam.SetSales(9999999999L);
                maidParam.SetCurHp(999);
                maidParam.SetCurMind(999);
                maidParam.SetCurReason(999);

                foreach (var noonWork in ScheduleCSVData.NoonWorkData)
                {
                    maidParam.SetNewGetWork(noonWork.Value.id);
                    maidInfo.SetWorkValue(noonWork.Value.id, TABLE_COLUMN_TOTAL_XP, 999U);
                }

                foreach (var dataDic in Yotogi.skill_data_list.SelectMany(s => s))
                {
                    maidParam.SetNewGetSkill(dataDic.Value.id);
                    maidParam.AddSkillExp(dataDic.Value.id, 10000);
                    maidParam.status_.skill_data[dataDic.Value.id].play_count = 1;
                    maidInfo.UpdateSkillData(dataDic.Value.id);
                }

                foreach (var dataDic in Yotogi.skill_data_list.SelectMany(s => s))
                {
                    maidParam.SetNewGetSkill(dataDic.Value.id);
                    maidInfo.UpdateHasSkill(dataDic.Value.id);
                }
            }
        }