예제 #1
0
 public static void init()
 {
     MyLog.LogDebug("PresetUtill", "init");
     namesMod    = Enum.GetNames(typeof(ModType));
     namesPreset = Enum.GetNames(typeof(CharacterMgrPatchBase.PresetType));
     namesList   = Enum.GetNames(typeof(ListType));
 }
예제 #2
0
        internal static void RandPreset(Maid m_maid = null, ListType listType = ListType.All)
        {
            if (configEntryUtill["RandPreset", false])
            {
                MyLog.LogDebug("RandPreset");
            }

            if (m_maid == null)
            {
                m_maid = GameMain.Instance.CharacterMgr.GetMaid(0);
                if (m_maid == null)
                {
                    //MyLog.LogWarning("RandPreset maid null");
                    return;
                }
            }
            MyLog.LogMessage("RandPreset", MyUtill.GetMaidFullName(m_maid));

            List <string> list = lists;

            list = GetList(listType, list);

            if (list.Count == 0)
            {
                MyLog.LogWarning("RandPreset No list");
                return;
            }

            string file = list[rand.Next(list.Count)];

            SetMaidPreset(m_maid, file);
        }
예제 #3
0
        private static void SetMaidPreset(Maid m_maid, string file)
        {
            if (m_maid == null)
            {
                //MyLog.LogWarning("SetMaidPreset maid null");
                return;
            }
            if (m_maid.IsBusy)
            {
                if (configEntryUtill["SetMaidPreset", false])
                {
                    MyLog.LogDebug("RandPreset Maid Is Busy");
                }
                return;
            }

            if (configEntryUtill["SetMaidPreset", false])
            {
                MyLog.LogDebug("SetMaidPreset select :" + file);
            }

            CharacterMgr.Preset preset = GameMain.Instance.CharacterMgr.PresetLoad(file);

            //Main.CustomPresetDirectory = Path.GetDirectoryName(file);
            //UnityEngine.Debug.Log("RandPreset preset path "+ GameMain.Instance.CharacterMgr.PresetDirectory);
            //preset.strFileName = file;
            if (preset == null)
            {
                if (configEntryUtill["SetMaidPreset", false])
                {
                    MyLog.LogDebug("SetMaidPreset preset null ");
                }
                return;
            }
            GameMain.Instance.CharacterMgr.PresetSet(m_maid, preset);
            if (Product.isPublic)
            {
                SceneEdit.AllProcPropSeqStart(m_maid);
            }
        }
예제 #4
0
        public static void SetMaidStatus(Maid maid)
        {
            if (maid == null)
            {
                MyLog.LogError("MaidStatusUtill.SetMaidStatus:null");
                return;
            }
            MyLog.LogMessage("SetMaidStatus: " + MyUtill.GetMaidFullNale(maid));

            maid.status.employmentDay = 1;// 고용기간

            maid.status.baseAppealPoint = 9999;
            maid.status.baseCare        = 9999;
            maid.status.baseCharm       = 9999;
            maid.status.baseCooking     = 9999;
            maid.status.baseDance       = 9999;
            maid.status.baseElegance    = 9999;
            maid.status.baseHentai      = 9999;
            maid.status.baseHousi       = 9999;
            maid.status.baseInyoku      = 9999;
            maid.status.baseLovely      = 9999;
            maid.status.baseMaxHp       = 9999;
            maid.status.baseMaxMind     = 9999;
            maid.status.baseMaxReason   = 9999;
            maid.status.baseMvalue      = 9999;
            maid.status.baseReception   = 9999;
            maid.status.baseTeachRate   = 9999;
            maid.status.baseVocal       = 9999;

            maid.status.studyRate  = 0;                     // 습득율
            maid.status.likability = 999;                   // 호감도

            maid.status.heroineType = HeroineType.Transfer; // 기본, ? , 이전
            maid.status.relation    = Relation.Lover;       // 호감도
            maid.status.seikeiken   = Seikeiken.Yes_Yes;    //

            MyLog.LogMessage(".SetMaidStatus.AddFeature: " + MyUtill.GetMaidFullNale(maid));
            try
            {
                foreach (Feature.Data data in Feature.GetAllDatas(true))
                {
                    maid.status.AddFeature(data);
                }
            }
            catch (Exception e)
            {
                MyLog.LogError("SetMaidStatus: " + e.ToString());
            }

            MyLog.LogMessage(".SetMaidStatus.AddPropensity: " + MyUtill.GetMaidFullNale(maid));
            try
            {
                // 특성
                foreach (Propensity.Data data in Propensity.GetAllDatas(true))
                {
                    maid.status.AddPropensity(data);
                }
            }
            catch (Exception e)
            {
                MyLog.LogError("SetMaidStatus: " + e.ToString());
            }

            MyLog.LogMessage(".SetMaidStatus.YotogiClass: " + MyUtill.GetMaidFullNale(maid));
            // 피드러 참고
            foreach (YotogiClass.Data data in YotogiClass.GetAllDatas(true))
            {
                ClassData <YotogiClass.Data> classData = maid.status.yotogiClass.Get(data.id) ?? maid.status.yotogiClass.Add(data, true, true);
                if (classData != null)
                {
                    classData.expSystem.SetLevel(classData.expSystem.GetMaxLevel());
                }
            }



            JobClassSystem jobClassSystem = maid.status.jobClass;

            // 실패한듯
            try
            {
                List <JobClass.Data> learnPossibleClassDatas = jobClassSystem.GetLearnPossibleClassDatas(true, AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New);
                //MyLog.LogMessage(".SetMaidStatus.learn: " + MyUtill.GetMaidFullNale(maid));
                MyLog.LogMessage(".JobClass.learn: " + MyUtill.GetMaidFullNale(maid), learnPossibleClassDatas.Count);
                // 클래스 추가?
                foreach (JobClass.Data data in learnPossibleClassDatas)
                {
                    if (jobClassSystem.Contains(data))
                    {
                        continue;
                    }

                    MyLog.LogDebug(".JobClass.learn:" + data.id + " , " + data.uniqueName + " , " + data.drawName + " , " + data.explanatoryText + " , " + data.termExplanatoryText);
                    MyLog.LogDebug(".JobClass.learn: " + jobClassSystem.Contains(data), MyUtill.Join(" , ", data.levelBonuss));

                    ClassData <JobClass.Data> classData = jobClassSystem.Add(data, true, true);

                    //ClassData<JobClass.Data> classData=jobClassSystem.Get(data);
                    //SimpleExperienceSystem expSystem = classData.expSystem;
                    //expSystem.SetTotalExp(expSystem.GetMaxLevelNeedExp());
                    //expSystem.SetLevel(expSystem.GetMaxLevel());
                }
            }
            catch (Exception e)
            {
                MyLog.LogError(".JobClass.learn: " + e.ToString());
            }

            try
            {
                SortedDictionary <int, ClassData <JobClass.Data> > keyValuePairs = jobClassSystem.GetAllDatas();
                MyLog.LogMessage(".JobClass.expSystem: " + MyUtill.GetMaidFullNale(maid), keyValuePairs.Count);
                //MyLog.LogMessage("JobClass.expSystem: " + MaidUtill.GetMaidFullNale(maid), keyValuePairs.Count);
                // 경험치 설정
                foreach (var item in keyValuePairs)
                {
                    ClassData <JobClass.Data> classData = item.Value;
                    JobClass.Data             data      = classData.data;
                    SimpleExperienceSystem    expSystem = classData.expSystem;

                    if (expSystem.GetMaxLevel() == expSystem.GetCurrentLevel())
                    {
                        continue;
                    }

                    MyLog.LogDebug(".JobClass.expSystem:" + data.id + " , " + data.uniqueName + " , " + data.drawName + " , " + data.explanatoryText + " , " + data.termExplanatoryText);
                    MyLog.LogDebug(".JobClass.expSystem:" + expSystem.GetType(), expSystem.GetMaxLevel(), expSystem.GetCurrentLevel());

                    expSystem.SetTotalExp(expSystem.GetMaxLevelNeedExp());
                    expSystem.SetLevel(expSystem.GetMaxLevel());
                }
                //maid.status.UpdateClassBonusStatus();
            }
            catch (Exception e)
            {
                MyLog.LogError(".JobClass.expSystem: " + e.ToString());
            }


            // 스킬 추가
            //___select_maid_.status.yotogiSkill.Add(skillId);
            MyLog.LogMessage(".SetMaidStatus.Skill1: " + MyUtill.GetMaidFullNale(maid));
            try
            {
                List <Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(maid.status);
                foreach (Skill.Data data in learnPossibleSkills)
                {
                    MyLog.LogDebug("id: " + data.id + " , " + data.name + " , " + data.start_call_file + " , " + data.start_call_file2 + " , " + data.termName);
#if DEBUG
                    //MyLog.LogMessage(".Skill1: " + MaidUtill.GetMaidFullNale(maid));
                    MyLog.LogDebug("ban_id_array: " + MyUtill.Join <int>(" , ", data.ban_id_array));
                    MyLog.LogDebug("skill_exp_table: " + MyUtill.Join <int>(" , ", data.skill_exp_table));
                    MyLog.LogDebug("playable_stageid_list: " + MyUtill.Join <int>(" , ", data.playable_stageid_list));
#endif
                    YotogiSkillData        yotogiSkillData = maid.status.yotogiSkill.Add(data);
                    SimpleExperienceSystem expSystem       = yotogiSkillData.expSystem;
                    expSystem.SetTotalExp(expSystem.GetMaxLevelNeedExp());
                    expSystem.SetLevel(expSystem.GetMaxLevel());
                }
            }
            catch (Exception e)
            {
                MyLog.LogWarning(".SetMaidStatus.Skill1: " + MyUtill.GetMaidFullNale(maid));
                MyLog.LogError(".SetMaidStatus.Skill1: " + e.ToString());
            }

            MyLog.LogMessage(".SetMaidStatus.Old.Skill: " + MyUtill.GetMaidFullNale(maid));
            try
            {
                List <Skill.Old.Data> learnPossibleSkills = Skill.Old.GetLearnPossibleSkills(maid.status);
                foreach (Skill.Old.Data data in learnPossibleSkills)
                {
                    MyLog.LogDebug("id: " + data.id + " , " + data.name + " , " + data.start_call_file + " , " + data.start_call_file2);
#if DEBUG
                    MyLog.LogMessage(".Skill2: " + MyUtill.GetMaidFullNale(maid));
                    MyLog.LogDebug("ban_id_array: " + MyUtill.Join(" , ", data.ban_id_array));
                    MyLog.LogDebug("skill_exp_table: " + MyUtill.Join(" , ", data.skill_exp_table));
#endif
                    YotogiSkillData        yotogiSkillData = maid.status.yotogiSkill.Add(data);
                    SimpleExperienceSystem expSystem       = yotogiSkillData.expSystem;
                    expSystem.SetTotalExp(expSystem.GetMaxLevelNeedExp());
                    expSystem.SetLevel(expSystem.GetMaxLevel());
                }
            }
            catch (Exception e)
            {
                MyLog.LogWarning(".SetMaidStatus.Old.Skill: " + MyUtill.GetMaidFullNale(maid));
                MyLog.LogError(".SetMaidStatus.Old.Skill: " + MyUtill.GetMaidFullNale(maid), e.ToString());
            }
        }