public static void SetMaxExp() { if (FacilityManagerPatch.FacilityExpArray == null) { //FacilityManagerPatch.m_FacilityExpArray= AccessTools.Field(typeof(FacilityManager), "m_FacilityAchievementList"); MyLog.LogWarning( "FacilityManagerPatch.m_FacilityExpArray null" , "게임 실행전 FacilityManagerPatch가 이미 켜져 있어야함" ); return; } foreach (KeyValuePair <int, SimpleExperienceSystem> item in FacilityManagerPatch.FacilityExpArray.Copy()) { SimpleExperienceSystem experienceSystem = item.Value; MyLog.LogMessage( "SetMaxExp" , item.Key , experienceSystem.GetCurrentExp() , experienceSystem.GetCurrentLevel() , experienceSystem.GetTotalExp() , experienceSystem.GetMaxLevel() , experienceSystem.GetMaxLevelNeedExp() , experienceSystem.GetNextLevelExp(experienceSystem.GetMaxLevel()) , experienceSystem.GetNextLevelRestExp() ); experienceSystem.AddExp(experienceSystem.GetMaxLevelNeedExp()); } }
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()); } }