using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using MaidStatus; using MaidStatus.Old; using UnityEngine; using wf; namespace Schedule { public static class ScheduleCSVData { static ScheduleCSVData() { ScheduleCSVData.CVSRead(); ScheduleCSVData.FacilityPowerUpTask(); } public static Dictionary TrainingData { get { return ScheduleCSVData.TrainingDataDic; } } public static Dictionary YotogiData { get { return ScheduleCSVData.YotogiDataDic; } } public static Dictionary WorkData { get { Dictionary dictionary = new Dictionary(); if (ScheduleCSVData.FaclityPowerUp != null) { dictionary.Add(ScheduleCSVData.FaclityPowerUp.id, ScheduleCSVData.FaclityPowerUp); } foreach (KeyValuePair keyValuePair in FacilityDataTable.GetAllWorkData(true)) { if (!dictionary.ContainsKey(keyValuePair.Key)) { dictionary.Add(keyValuePair.Key, keyValuePair.Value); } } return dictionary; } } public static Dictionary AllData { get { Dictionary dictionary = new Dictionary(); foreach (KeyValuePair keyValuePair in ScheduleCSVData.TrainingDataDic) { if (!dictionary.ContainsKey(keyValuePair.Key)) { dictionary.Add(keyValuePair.Key, keyValuePair.Value); } } foreach (KeyValuePair keyValuePair2 in ScheduleCSVData.YotogiDataDic) { if (!dictionary.ContainsKey(keyValuePair2.Key)) { dictionary.Add(keyValuePair2.Key, keyValuePair2.Value); } } if (ScheduleCSVData.FaclityPowerUp != null) { dictionary.Add(ScheduleCSVData.FaclityPowerUp.id, ScheduleCSVData.FaclityPowerUp); } foreach (KeyValuePair keyValuePair3 in FacilityDataTable.GetAllWorkData(true)) { if (!dictionary.ContainsKey(keyValuePair3.Key)) { dictionary.Add(keyValuePair3.Key, keyValuePair3.Value); } } return dictionary; } } private static void CVSRead() { ScheduleCSVData.TrainingDataDic = new Dictionary(); ScheduleCSVData.YotogiDataDic = new Dictionary(); ScheduleCSVData.EntertainNumberData = new int[6]; ScheduleCSVData.EntertainGuestData = new List[6]; for (int i = 0; i < ScheduleCSVData.EntertainGuestData.Length; i++) { ScheduleCSVData.EntertainGuestData[i] = new List(); } HashSet enabled_list = new HashSet(); HashSet hashSet = new HashSet(); HashSet hashSet2 = new HashSet(); CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "schedule_work_noon_enabled", ref enabled_list); CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "schedule_work_night_enabled", ref hashSet); CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "schedule_work_facility_enabled", ref hashSet2); ScheduleCSVData.ReadEnabledIdListPlugIn("schedule_work_night_", hashSet, GameUty.FileSystem, GameUty.PathList); string file_name = "schedule_work_night_category_list.nei"; if (ScheduleCSVData.<>f__mg$cache0 == null) { ScheduleCSVData.<>f__mg$cache0 = new Action(ScheduleCSVData.CVSReader_TaskCategoryList); } ScheduleCSVData.CVSReader(file_name, ScheduleCSVData.<>f__mg$cache0, false); string file_name2 = "schedule_work_noon.nei"; if (ScheduleCSVData.<>f__mg$cache1 == null) { ScheduleCSVData.<>f__mg$cache1 = new Action>(ScheduleCSVData.CVSReader_TrainingData_CMO3D); } ScheduleCSVData.CVSReader(file_name2, ScheduleCSVData.<>f__mg$cache1, enabled_list, false); string file_name3 = "schedule_work_night.nei"; if (ScheduleCSVData.<>f__mg$cache2 == null) { ScheduleCSVData.<>f__mg$cache2 = new Action>(ScheduleCSVData.CVSReader_YotogiData_CMO3D); } ScheduleCSVData.CVSReader(file_name3, ScheduleCSVData.<>f__mg$cache2, hashSet, false); string file_name4 = "schedule_work_easyyotogi.nei"; if (ScheduleCSVData.<>f__mg$cache3 == null) { ScheduleCSVData.<>f__mg$cache3 = new Action>(ScheduleCSVData.CVSReader_EasyYotogiData); } ScheduleCSVData.CVSReader(file_name4, ScheduleCSVData.<>f__mg$cache3, hashSet, false); List allDatas = MaidStatus.Personal.GetAllDatas(false); ScheduleCSVData.NoonWorkInitData = new Dictionary>(); ScheduleCSVData.NightWorkInitData = new Dictionary>(); for (int j = 0; j < allDatas.Count; j++) { ScheduleCSVData.NoonWorkInitData.Add(allDatas[j].id, new Dictionary()); ScheduleCSVData.NightWorkInitData.Add(allDatas[j].id, new Dictionary()); } string file_name5 = "schedule_init_noon.nei"; if (ScheduleCSVData.<>f__mg$cache4 == null) { ScheduleCSVData.<>f__mg$cache4 = new Action(ScheduleCSVData.CVSReader_TaskInitData_Noon_COM3D); } ScheduleCSVData.CVSReader(file_name5, ScheduleCSVData.<>f__mg$cache4, false); string file_name6 = "schedule_init_night.nei"; if (ScheduleCSVData.<>f__mg$cache5 == null) { ScheduleCSVData.<>f__mg$cache5 = new Action(ScheduleCSVData.CVSReader_TaskInitData_Night_COM3D); } ScheduleCSVData.CVSReader(file_name6, ScheduleCSVData.<>f__mg$cache5, false); string file_name7 = "schedule_entertain_number.nei"; if (ScheduleCSVData.<>f__mg$cache6 == null) { ScheduleCSVData.<>f__mg$cache6 = new Action(ScheduleCSVData.CVSReader_EntertainNumberData); } ScheduleCSVData.CVSReader(file_name7, ScheduleCSVData.<>f__mg$cache6, false); string file_name8 = "schedule_entertain_guest.nei"; if (ScheduleCSVData.<>f__mg$cache7 == null) { ScheduleCSVData.<>f__mg$cache7 = new Action(ScheduleCSVData.CVSReader_EntertainGuestData); } ScheduleCSVData.CVSReader(file_name8, ScheduleCSVData.<>f__mg$cache7, false); string file_name9 = "schedule_define.nei"; if (ScheduleCSVData.<>f__mg$cache8 == null) { ScheduleCSVData.<>f__mg$cache8 = new Action(ScheduleCSVData.CVSReader_Define); } ScheduleCSVData.CVSReader(file_name9, ScheduleCSVData.<>f__mg$cache8, false); string file_name10 = "schedule_work_netorare.nei"; if (ScheduleCSVData.<>f__mg$cache9 == null) { ScheduleCSVData.<>f__mg$cache9 = new Action(ScheduleCSVData.CVSReader_NetorareIdList); } ScheduleCSVData.CVSReader(file_name10, ScheduleCSVData.<>f__mg$cache9, false); if (GameUty.IsEnabledCompatibilityMode) { ScheduleCSVData.NoonWorkInitDataLegacy = new Dictionary>(); ScheduleCSVData.NightWorkInitDataLegacy = new Dictionary>(); for (int k = 0; k < allDatas.Count; k++) { ScheduleCSVData.NoonWorkInitDataLegacy.Add(allDatas[k].id, new Dictionary()); ScheduleCSVData.NightWorkInitDataLegacy.Add(allDatas[k].id, new Dictionary()); } string file_name11 = "schedule_init_noon.nei"; if (ScheduleCSVData.<>f__mg$cacheA == null) { ScheduleCSVData.<>f__mg$cacheA = new Action(ScheduleCSVData.CVSReader_TaskInitData_Noon_CM3D2); } ScheduleCSVData.CVSReader(file_name11, ScheduleCSVData.<>f__mg$cacheA, true); string file_name12 = "schedule_init_night.nei"; if (ScheduleCSVData.<>f__mg$cacheB == null) { ScheduleCSVData.<>f__mg$cacheB = new Action(ScheduleCSVData.CVSReader_TaskInitData_Night_CM3D2); } ScheduleCSVData.CVSReader(file_name12, ScheduleCSVData.<>f__mg$cacheB, true); CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Old, true, "schedule_work_noon_enabled", ref enabled_list); CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Old, true, "schedule_work_night_enabled", ref hashSet); ScheduleCSVData.ReadEnabledIdListPlugIn("schedule_work_night_", hashSet, GameUty.FileSystemOld, GameUty.PathListOld); string file_name13 = "schedule_work_legacy_disable.nei"; if (ScheduleCSVData.<>f__mg$cacheC == null) { ScheduleCSVData.<>f__mg$cacheC = new Action(ScheduleCSVData.CVSReader_LeagacyDisableIdList); } ScheduleCSVData.CVSReader(file_name13, ScheduleCSVData.<>f__mg$cacheC, false); string file_name14 = "schedule_work_night_category_list.nei"; if (ScheduleCSVData.<>f__mg$cacheD == null) { ScheduleCSVData.<>f__mg$cacheD = new Action(ScheduleCSVData.CVSReader_TaskCategoryList); } ScheduleCSVData.CVSReader(file_name14, ScheduleCSVData.<>f__mg$cacheD, true); string file_name15 = "schedule_work_noon.nei"; if (ScheduleCSVData.<>f__mg$cacheE == null) { ScheduleCSVData.<>f__mg$cacheE = new Action>(ScheduleCSVData.CVSReader_TrainingData_CM3D2); } ScheduleCSVData.CVSReader(file_name15, ScheduleCSVData.<>f__mg$cacheE, enabled_list, true); string file_name16 = "schedule_work_night.nei"; if (ScheduleCSVData.<>f__mg$cacheF == null) { ScheduleCSVData.<>f__mg$cacheF = new Action>(ScheduleCSVData.CVSReader_YotogiData_CM3D2); } ScheduleCSVData.CVSReader(file_name16, ScheduleCSVData.<>f__mg$cacheF, hashSet, true); } } private static void ReadEnabledIdListPlugIn(string csvName, HashSet idlLst, AFileSystemBase fsb, List pathList) { foreach (string str in pathList) { string a = csvName + str; if (!(a == "schedule_work_night_legacy")) { CsvCommonIdManager.ReadEnabledIdList(fsb, null, csvName + str, ref idlLst); } } } private static bool CVSReader(string file_name, Action Reader, bool useOldSystem = false) { AFileBase afileBase; if (useOldSystem) { afileBase = GameUty.FileSystemOld.FileOpen(file_name); } else { afileBase = GameUty.FileSystem.FileOpen(file_name); } using (afileBase) { if (!afileBase.IsValid()) { return false; } using (CsvParser csvParser = new CsvParser()) { if (!csvParser.Open(afileBase)) { Debug.LogWarning("csv open failed.\n" + file_name); return false; } Reader(csvParser); } } return true; } private static bool CVSReader(string file_name, Action> Reader, HashSet enabled_list, bool useOldSystem = false) { AFileBase afileBase; if (useOldSystem) { afileBase = GameUty.FileSystemOld.FileOpen(file_name); } else { afileBase = GameUty.FileSystem.FileOpen(file_name); } using (AFileBase afileBase2 = afileBase) { if (!afileBase2.IsValid()) { return false; } using (CsvParser csvParser = new CsvParser()) { if (!csvParser.Open(afileBase2)) { Debug.LogWarning("csv open failed.\n" + file_name); return false; } Reader(csvParser, enabled_list); } } return true; } private static void CVSReader_WorkData(CsvParser csv, HashSet enabled_list) { int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { int num = 0; ScheduleCSVData.Work work = new ScheduleCSVData.Work(); work.type = ScheduleTaskCtrl.TaskType.Work; work.id = csv.GetCellAsInteger(num++, i); if (enabled_list.Contains(work.id)) { work.name = csv.GetCellAsString(num++, i); num++; work.icon = csv.GetCellAsString(num++, i); string cellAsString = csv.GetCellAsString(num++, i); if (!string.IsNullOrEmpty(cellAsString) && Enum.IsDefined(typeof(ScheduleCSVData.TrainingType), cellAsString)) { work.trainingType = (ScheduleCSVData.TrainingType)Enum.Parse(typeof(ScheduleCSVData.TrainingType), cellAsString, false); } work.study_rate = csv.GetCellAsInteger(num++, i); work.reception = csv.GetCellAsInteger(num++, i); work.care = csv.GetCellAsInteger(num++, i); work.lovely = csv.GetCellAsInteger(num++, i); work.elegance = csv.GetCellAsInteger(num++, i); work.charm = csv.GetCellAsInteger(num++, i); work.teach_rate = csv.GetCellAsInteger(num++, i); work.cooking = csv.GetCellAsInteger(num++, i); work.vocal = csv.GetCellAsInteger(num++, i); work.dance = csv.GetCellAsInteger(num++, i); work.appealPoint = csv.GetCellAsInteger(num++, i); work.exp = csv.GetCellAsInteger(num++, i); work.income = csv.GetCellAsInteger(num++, i); work.cmdExp = csv.GetCellAsInteger(num++, i); string cellAsString2 = csv.GetCellAsString(num++, i); work.condContract = new List(); string[] array = cellAsString2.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); for (int j = 0; j < array.Length; j++) { if (Enum.IsDefined(typeof(Contract), array[j])) { work.condContract.Add((Contract)Enum.Parse(typeof(Contract), array[j], false)); } } string cellAsString3 = csv.GetCellAsString(num++, i); work.condMaidClass = new List(); string[] array2 = cellAsString3.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int k = 0; k < array2.Length; k++) { int id = JobClass.GetData(array2[k]).id; work.condMaidClass.Add(id); } work.needEventItemIdList = new List(); if (csv.GetCellAsString(num, 0) == "必要状態") { work.needMaidStatus = csv.GetCellAsString(num++, i); string cellAsString4 = csv.GetCellAsString(num++, i); if (!string.IsNullOrEmpty(cellAsString4)) { string[] array3 = cellAsString4.Split(new char[] { '|' }); foreach (string s in array3) { work.needEventItemIdList.Add(int.Parse(s)); } } } if (num < csv.max_cell_x) { string cellAsString5 = csv.GetCellAsString(num, i); if (cellAsString5 != null) { if (!(cellAsString5 == "表示")) { if (cellAsString5 == "非表示") { work.disableIfRentalMaid = true; } } else { work.visibleIfRentalMaid = true; } } } num++; work.condPackage = new List(); if (work.id > 0) { work.categoryID = 52; ScheduleCSVData.WorkDataDic[work.id] = work; } } } } private static void CVSReader_LeagacyDisableIdList(CsvParser csv) { ScheduleCSVData.WorkLegacyDisableId = new List(); int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { ScheduleCSVData.WorkLegacyDisableId.Add(csv.GetCellAsInteger(0, i)); } } private static void CVSReader_NetorareIdList(CsvParser csv) { ScheduleCSVData.NetorareFlag = new List(); int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { ScheduleCSVData.NetorareFlag.Add(csv.GetCellAsInteger(0, i)); } } private static void FacilityPowerUpTask() { ScheduleCSVData.FaclityPowerUp = new ScheduleCSVData.Work(); ScheduleCSVData.FaclityPowerUp.name = "施設強化"; ScheduleCSVData.FaclityPowerUp.type = ScheduleTaskCtrl.TaskType.Work; ScheduleCSVData.FaclityPowerUp.workTyp = ScheduleCSVData.WorkType.PowerUp; ScheduleCSVData.FaclityPowerUp.icon = "schedule_icon_shisetsu"; ScheduleCSVData.FaclityPowerUp.id = ScheduleCSVData.faclilityPowerUpWorkId; ScheduleCSVData.FaclityPowerUp.categoryID = 52; ScheduleCSVData.FaclityPowerUp.isCommu = false; } private static void CVSReader_TrainingData_CM3D2(CsvParser csv, HashSet enabled_list) { ScheduleCSVData.CVSReader_TrainingData(csv, enabled_list, ScheduleCSVData.ScheduleBase.Mode.CM3D2); } private static void CVSReader_TrainingData_CMO3D(CsvParser csv, HashSet enabled_list) { ScheduleCSVData.CVSReader_TrainingData(csv, enabled_list, ScheduleCSVData.ScheduleBase.Mode.COM3D); } private static void CVSReader_TrainingData(CsvParser csv, HashSet enabled_list, ScheduleCSVData.ScheduleBase.Mode mode) { int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { int num = 0; ScheduleCSVData.Training training = new ScheduleCSVData.Training(); training.mode = mode; training.type = ScheduleTaskCtrl.TaskType.Training; training.id = csv.GetCellAsInteger(num++, i); if (enabled_list.Contains(training.id)) { training.name = csv.GetCellAsString(num++, i); if (training.name == string.Empty) { return; } num++; if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D) { training.facilityId = csv.GetCellAsInteger(num++, i); } else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2) { training.facilityId = ScheduleCSVData.trainingFaclilityID; } training.icon = csv.GetCellAsString(num++, i); string cellAsString = csv.GetCellAsString(num++, i); if (!string.IsNullOrEmpty(cellAsString) && Enum.IsDefined(typeof(ScheduleCSVData.TrainingType), cellAsString)) { training.trainingType = (ScheduleCSVData.TrainingType)Enum.Parse(typeof(ScheduleCSVData.TrainingType), cellAsString, false); } if (training.trainingType == ScheduleCSVData.TrainingType.Basic || training.trainingType == ScheduleCSVData.TrainingType.Trainee || training.trainingType == ScheduleCSVData.TrainingType.Trainer) { training.isCommu = true; } else { training.isCommu = false; } training.study_rate = csv.GetCellAsInteger(num++, i); training.reception = csv.GetCellAsInteger(num++, i); training.care = csv.GetCellAsInteger(num++, i); training.lovely = csv.GetCellAsInteger(num++, i); training.elegance = csv.GetCellAsInteger(num++, i); training.charm = csv.GetCellAsInteger(num++, i); training.teach_rate = csv.GetCellAsInteger(num++, i); if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D) { training.cooking = csv.GetCellAsInteger(num++, i); training.vocal = csv.GetCellAsInteger(num++, i); training.dance = csv.GetCellAsInteger(num++, i); training.appealPoint = csv.GetCellAsInteger(num++, i); } training.exp = csv.GetCellAsInteger(num++, i); if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2) { num++; num++; } training.income = csv.GetCellAsInteger(num++, i); training.cmdExp = csv.GetCellAsInteger(num++, i); string cellAsString2 = csv.GetCellAsString(num++, i); training.condContract = new List(); string[] array = cellAsString2.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); for (int j = 0; j < array.Length; j++) { if (Enum.IsDefined(typeof(Contract), array[j])) { training.condContract.Add((Contract)Enum.Parse(typeof(Contract), array[j], false)); } } string cellAsString3 = csv.GetCellAsString(num++, i); training.condMaidClass = new List(); string[] array2 = cellAsString3.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int k = 0; k < array2.Length; k++) { int id = JobClass.GetData(array2[k]).id; training.condMaidClass.Add(id); } training.needEventItemIdList = new List(); if (csv.GetCellAsString(num, 0) == "必要状態") { training.needMaidStatus = csv.GetCellAsString(num++, i); string cellAsString4 = csv.GetCellAsString(num++, i); if (!string.IsNullOrEmpty(cellAsString4)) { string[] array3 = cellAsString4.Split(new char[] { '|' }); foreach (string s in array3) { training.needEventItemIdList.Add(int.Parse(s)); } } } if (num < csv.max_cell_x) { string cellAsString5 = csv.GetCellAsString(num, i); if (cellAsString5 != null) { if (!(cellAsString5 == "表示")) { if (cellAsString5 == "非表示") { training.disableIfRentalMaid = true; } } else { training.visibleIfRentalMaid = true; } } } num++; training.condPackage = new List(); if (training.trainingType == ScheduleCSVData.TrainingType.Dispatch) { if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D) { training.mode = ScheduleCSVData.ScheduleBase.Mode.CM3D2; } else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2) { goto IL_489; } } if (training.id > 0) { training.categoryID = 51; ScheduleCSVData.TrainingDataDic[training.id] = training; } } IL_489:; } } private static void CVSReader_YotogiData_CM3D2(CsvParser csv, HashSet enabled_list) { ScheduleCSVData.CVSReader_YotogiData(csv, enabled_list, ScheduleCSVData.ScheduleBase.Mode.CM3D2); } private static void CVSReader_YotogiData_CMO3D(CsvParser csv, HashSet enabled_list) { ScheduleCSVData.CVSReader_YotogiData(csv, enabled_list, ScheduleCSVData.ScheduleBase.Mode.COM3D); } private static void CVSReader_YotogiData(CsvParser csv, HashSet enabled_list, ScheduleCSVData.ScheduleBase.Mode mode) { int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { int num = 0; ScheduleCSVData.Yotogi yotogi = new ScheduleCSVData.Yotogi(); yotogi.mode = mode; yotogi.type = ScheduleTaskCtrl.TaskType.Yotogi; yotogi.id = csv.GetCellAsInteger(num++, i); if (enabled_list.Contains(yotogi.id)) { yotogi.name = csv.GetCellAsString(num++, i); if (yotogi.name == string.Empty) { return; } num++; yotogi.icon = csv.GetCellAsString(num++, i); yotogi.isCommu = false; yotogi.categoryID = csv.GetCellAsInteger(num++, i); if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D) { yotogi.netorareFlag = csv.GetCellBool(num++, i); } string cellAsString = csv.GetCellAsString(num++, i); if (!string.IsNullOrEmpty(cellAsString) && Enum.IsDefined(typeof(ScheduleCSVData.YotogiType), cellAsString)) { yotogi.yotogiType = (ScheduleCSVData.YotogiType)Enum.Parse(typeof(ScheduleCSVData.YotogiType), cellAsString, false); } yotogi.information = csv.GetCellAsString(num++, i); yotogi.income = csv.GetCellAsInteger(num++, i); yotogi.evaluation = csv.GetCellAsInteger(num++, i); yotogi.add_play_number = csv.GetCellAsInteger(num++, i); yotogi.add_other_play_number = csv.GetCellAsInteger(num++, i); yotogi.condInfo = new List(); for (int j = 0; j < 9; j++) { string cellAsString2 = csv.GetCellAsString(num++, i); if (!string.IsNullOrEmpty(cellAsString2)) { yotogi.condInfo.Add(cellAsString2); } } yotogi.condSalonGrade = csv.GetCellAsInteger(num++, i); if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2) { yotogi.condSalonGrade = 1; } yotogi.condSkill = new Dictionary(); string cellAsString3 = csv.GetCellAsString(num++, i); string[] array = cellAsString3.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int k = 0; k < array.Length; k++) { if (array[k].Contains(",")) { string[] array2 = array[k].Split(new char[] { ',' }, StringSplitOptions.None); yotogi.condSkill[int.Parse(array2[0])] = int.Parse(array2[1]); } } string cellAsString4 = csv.GetCellAsString(num++, i); yotogi.condContract = new List(); string[] array3 = cellAsString4.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); for (int l = 0; l < array3.Length; l++) { if (Enum.IsDefined(typeof(Contract), array3[l])) { yotogi.condContract.Add((Contract)Enum.Parse(typeof(Contract), array3[l], false)); } } string cellAsString5 = csv.GetCellAsString(num++, i); yotogi.condMaidClass = new List(); string[] array4 = cellAsString5.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int m = 0; m < array4.Length; m++) { int id = JobClass.GetData(array4[m]).id; yotogi.condMaidClass.Add(id); } string cellAsString6 = csv.GetCellAsString(num++, i); yotogi.condYotogiClass = new List(); string[] array5 = cellAsString6.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int n = 0; n < array5.Length; n++) { int id2 = YotogiClass.GetData(array5[n]).id; yotogi.condYotogiClass.Add(id2); } string cellAsString7 = csv.GetCellAsString(num++, i); yotogi.condPropensity = new List(); string[] array6 = cellAsString7.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); for (int num2 = 0; num2 < array6.Length; num2++) { if (Propensity.Contains(array6[num2])) { int id3 = Propensity.GetData(array6[num2]).id; yotogi.condPropensity.Add(id3); } } string cellAsString8 = csv.GetCellAsString(num++, i); yotogi.condSeikeiken = new List(); string[] array7 = cellAsString8.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); for (int num3 = 0; num3 < array7.Length; num3++) { if (Enum.IsDefined(typeof(Seikeiken), array7[num3])) { yotogi.condSeikeiken.Add((Seikeiken)Enum.Parse(typeof(Seikeiken), array7[num3], false)); } } string cellAsString9 = csv.GetCellAsString(num++, i); yotogi.condFlag1 = new List(); string[] array8 = cellAsString9.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int num4 = 0; num4 < array8.Length; num4++) { yotogi.condFlag1.Add(array8[num4]); } string cellAsString10 = csv.GetCellAsString(num++, i); yotogi.condFlag0 = new List(); string[] array9 = cellAsString10.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int num5 = 0; num5 < array9.Length; num5++) { yotogi.condFlag0.Add(array9[num5]); } string cellAsString11 = csv.GetCellAsString(num++, i); string[] array10 = cellAsString11.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); yotogi.condRelation = new List(); yotogi.condRelationOld = new List(); if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D) { for (int num6 = 0; num6 < array10.Length; num6++) { if (Enum.IsDefined(typeof(MaidStatus.Relation), array10[num6])) { yotogi.condRelation.Add((MaidStatus.Relation)Enum.Parse(typeof(MaidStatus.Relation), array10[num6], false)); } } } else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2) { for (int num7 = 0; num7 < array10.Length; num7++) { if (Enum.IsDefined(typeof(MaidStatus.Old.Relation), array10[num7])) { yotogi.condRelationOld.Add((MaidStatus.Old.Relation)Enum.Parse(typeof(MaidStatus.Old.Relation), array10[num7], false)); } } } if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2 && num < csv.max_cell_x) { string cellAsString12 = csv.GetCellAsString(num, i); if (cellAsString12 != null) { if (!(cellAsString12 == "表示")) { if (cellAsString12 == "非表示") { yotogi.disableIfRentalMaid = true; } } else { yotogi.visibleIfRentalMaid = true; } } } num++; yotogi.subMaidUnipueName = csv.GetCellAsString(num, i); num++; if (mode != ScheduleCSVData.ScheduleBase.Mode.CM3D2 || !(yotogi.subMaidUnipueName != string.Empty)) { yotogi.condPackage = new List(); yotogi.condManVisibleFlag1 = new List(); if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D) { if (num < csv.max_cell_x) { string cellAsString13 = csv.GetCellAsString(num, i); string[] array11 = cellAsString13.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int num8 = 0; num8 < array11.Length; num8++) { yotogi.condManVisibleFlag1.Add(array11[num8]); } } num++; } yotogi.condManFlag1 = new List(); if (num < csv.max_cell_x) { string cellAsString14 = csv.GetCellAsString(num, i); string[] array12 = cellAsString14.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int num9 = 0; num9 < array12.Length; num9++) { yotogi.condManFlag1.Add(array12[num9]); } } num++; yotogi.condManFlag0 = new List(); if (num < csv.max_cell_x) { string cellAsString15 = csv.GetCellAsString(num, i); string[] array13 = cellAsString15.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int num10 = 0; num10 < array13.Length; num10++) { yotogi.condManFlag0.Add(array13[num10]); } } num++; yotogi.condPersonal = new List(); if (num < csv.max_cell_x) { string cellAsString16 = csv.GetCellAsString(num, i); string[] array14 = cellAsString16.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); for (int num11 = 0; num11 < array14.Length; num11++) { int id4 = MaidStatus.Personal.GetData(array14[num11]).id; yotogi.condPersonal.Add(id4); } } num++; yotogi.condMainChara = csv.GetCellBool(num, i); num++; yotogi.condFacilityID = new List>(); if (num < csv.max_cell_x) { string cellAsString17 = csv.GetCellAsString(num, i); string[] array15 = cellAsString17.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries); for (int num12 = 0; num12 < array15.Length; num12++) { string[] array16 = array15[num12].Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); List list = new List(); for (int num13 = 0; num13 < array16.Length; num13++) { int num14 = 0; if (int.TryParse(array16[num13], out num14) && num14 != 0) { list.Add(num14); } } yotogi.condFacilityID.Add(list); } } num++; yotogi.pairCondPersonal = new List(); if (csv.IsCellToExistData(num, 0) && csv.IsCellToExistData(num, i)) { string cellAsString18 = csv.GetCellAsString(num, i); string[] array17 = cellAsString18.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); for (int num15 = 0; num15 < array17.Length; num15++) { int id5 = MaidStatus.Personal.GetData(array17[num15]).id; yotogi.pairCondPersonal.Add(id5); } } num++; if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D) { if (yotogi.yotogiType == ScheduleCSVData.YotogiType.HaveSex) { yotogi.mode = ScheduleCSVData.ScheduleBase.Mode.Common; } if (yotogi.yotogiType == ScheduleCSVData.YotogiType.Entertain || yotogi.yotogiType == ScheduleCSVData.YotogiType.Rest) { yotogi.mode = ScheduleCSVData.ScheduleBase.Mode.CM3D2; } } else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2 && yotogi.yotogiType != ScheduleCSVData.YotogiType.Vip && yotogi.yotogiType != ScheduleCSVData.YotogiType.VipCall) { goto IL_A63; } if (yotogi.id > 0) { ScheduleCSVData.YotogiDataDic[yotogi.id] = yotogi; } } } IL_A63:; } } private static void CVSReader_EasyYotogiData(CsvParser csv, HashSet enabled_list) { int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { int num = 0; ScheduleCSVData.Yotogi yotogi = new ScheduleCSVData.Yotogi(); ScheduleCSVData.Yotogi.EasyYotogi easyYotogi = new ScheduleCSVData.Yotogi.EasyYotogi(); yotogi.easyYotogi = easyYotogi; yotogi.isCommu = false; yotogi.mode = ScheduleCSVData.ScheduleBase.Mode.COM3D; yotogi.type = ScheduleTaskCtrl.TaskType.Yotogi; yotogi.id = csv.GetCellAsInteger(num++, i); if (enabled_list.Contains(yotogi.id)) { yotogi.name = csv.GetCellAsString(num++, i); if (yotogi.name == string.Empty) { return; } num++; yotogi.icon = csv.GetCellAsString(num++, i); string cellAsString = csv.GetCellAsString(num++, i); if (!string.IsNullOrEmpty(cellAsString) && Enum.IsDefined(typeof(ScheduleCSVData.YotogiType), cellAsString)) { yotogi.yotogiType = (ScheduleCSVData.YotogiType)Enum.Parse(typeof(ScheduleCSVData.YotogiType), cellAsString, false); } yotogi.information = csv.GetCellAsString(num++, i); yotogi.categoryID = csv.GetCellAsInteger(num++, i); yotogi.easyYotogi.trophyId = csv.GetCellAsInteger(num++, i); yotogi.easyYotogi.care = csv.GetCellAsInteger(num++, i); yotogi.easyYotogi.reception = csv.GetCellAsInteger(num++, i); yotogi.easyYotogi.teach_rate = csv.GetCellAsInteger(num++, i); yotogi.easyYotogi.inyoku = csv.GetCellAsInteger(num++, i); yotogi.easyYotogi.hentai = csv.GetCellAsInteger(num++, i); yotogi.easyYotogi.housi = csv.GetCellAsInteger(num++, i); yotogi.easyYotogi.msei = csv.GetCellAsInteger(num++, i); yotogi.easyYotogi.study_rate = csv.GetCellAsInteger(num++, i); yotogi.condInfo = new List(); yotogi.condContract = new List(); yotogi.condSkill = new Dictionary(); yotogi.condPersonal = new List(); yotogi.pairCondPersonal = new List(); yotogi.condSeikeiken = new List(); yotogi.condYotogiClass = new List(); yotogi.condRelation = new List(); yotogi.condPropensity = new List(); yotogi.condFlag0 = new List(); yotogi.condFlag1 = new List(); yotogi.condManVisibleFlag1 = new List(); yotogi.condManFlag1 = new List(); yotogi.condManFlag0 = new List(); yotogi.condMaidClass = new List(); yotogi.condFacilityID = new List>(); yotogi.condRelationOld = new List(); yotogi.condPackage = new List(); if (yotogi.id > 0) { ScheduleCSVData.YotogiDataDic[yotogi.id] = yotogi; } } } } private static void CVSReader_TaskCategoryList(CsvParser csv) { if (ScheduleCSVData.TaskCategoryNameMap == null) { ScheduleCSVData.TaskCategoryNameMap = new SortedDictionary(); } int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { int num = 0; int cellAsInteger = csv.GetCellAsInteger(num++, i); string cellAsString = csv.GetCellAsString(num++, i); if (!(cellAsString == string.Empty)) { if (!ScheduleCSVData.TaskCategoryNameMap.ContainsKey(cellAsInteger)) { ScheduleCSVData.TaskCategoryNameMap.Add(cellAsInteger, cellAsString); } } } } private static void CVSReader_TaskInitData_Noon_CM3D2(CsvParser csv) { ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NoonWorkInitDataLegacy); } private static void CVSReader_TaskInitData_Noon_COM3D(CsvParser csv) { ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NoonWorkInitData); } private static void CVSReader_TaskInitData_Night_CM3D2(CsvParser csv) { ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NightWorkInitDataLegacy); } private static void CVSReader_TaskInitData_Night_COM3D(CsvParser csv) { ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NightWorkInitData); } private static void CVSReader_TaskInitData(CsvParser csv, Dictionary> dataDic) { int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { int cellAsInteger = csv.GetCellAsInteger(0, i); int num = 2; while (csv.IsCellToExistData(num, 0)) { string cellAsString = csv.GetCellAsString(num, 0); MaidStatus.Personal.Data data = MaidStatus.Personal.GetData(cellAsString); int cellAsInteger2 = csv.GetCellAsInteger(num, i); if (cellAsInteger2 > 0) { dataDic[data.id][cellAsInteger] = cellAsInteger2; } num++; } } } private static void CVSReader_EntertainNumberData(CsvParser csv) { int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { int cellAsInteger = csv.GetCellAsInteger(0, i); ScheduleCSVData.EntertainNumberData[cellAsInteger] = csv.GetCellAsInteger(1, i); } } private static void CVSReader_EntertainGuestData(CsvParser csv) { int max_cell_y = csv.max_cell_y; for (int i = 1; i < max_cell_y; i++) { int num = 0; ScheduleCSVData.EntertainGuest entertainGuest = new ScheduleCSVData.EntertainGuest(); int num2 = entertainGuest.condSalonGrade = csv.GetCellAsInteger(num++, i); entertainGuest.baseIcome = csv.GetCellAsInteger(num++, i); entertainGuest.baseEvaluation = csv.GetCellAsInteger(num++, i); entertainGuest.sexual = (csv.GetCellAsString(num++, i) == "○"); ScheduleCSVData.EntertainGuestData[num2].Add(entertainGuest); } } private static void CVSReader_Define(CsvParser csv) { int max_cell_y = csv.max_cell_y; for (int i = 0; i < max_cell_y; i++) { string cellAsString = csv.GetCellAsString(0, i); switch (cellAsString) { case "dayAddSalonClean": ScheduleCSVData.dayAddSalonClean = csv.GetCellAsInteger(1, i); break; case "dayAddSalonBeautiful": ScheduleCSVData.dayAddSalonBeautiful = csv.GetCellAsInteger(1, i); break; case "haveSexAddSalonClean": ScheduleCSVData.haveSexAddSalonClean = csv.GetCellAsInteger(1, i); break; case "haveSexAddSalonBeautiful": ScheduleCSVData.haveSexAddSalonBeautiful = csv.GetCellAsInteger(1, i); break; case "entertainAddSalonClean": ScheduleCSVData.entertainAddSalonClean = csv.GetCellAsInteger(1, i); break; case "entertainAddSalonBeautiful": ScheduleCSVData.entertainAddSalonBeautiful = csv.GetCellAsInteger(1, i); break; case "entertainParameterRevisionThreshold": ScheduleCSVData.entertainParameterRevisionThreshold = csv.GetCellAsInteger(1, i); break; case "entertainPropensityRevisionMin": ScheduleCSVData.entertainPropensityRevisionMin = csv.GetCellAsInteger(1, i); break; case "entertainPropensityRevisionMax": ScheduleCSVData.entertainPropensityRevisionMax = csv.GetCellAsInteger(1, i); break; case "workSuccessLvPerfectIncidence": ScheduleCSVData.workSuccessLvPerfectIncidence = csv.GetCellAsInteger(1, i); break; case "workSuccessLvMissIncidence": ScheduleCSVData.workSuccessLvMissIncidence = csv.GetCellAsInteger(1, i); break; case "dispatchIncomCoefficient": ScheduleCSVData.dispatchIncomCoefficient = csv.GetCellAsInteger(1, i); break; case "vipFullOpenDay": ScheduleCSVData.vipFullOpenDay = csv.GetCellAsInteger(1, i); break; case "noonWorkLv2Exp": ScheduleCSVData.noonWorkLv2Exp = csv.GetCellAsInteger(1, i); break; case "noonWorkLv3Exp": ScheduleCSVData.noonWorkLv3Exp = csv.GetCellAsInteger(1, i); break; case "subMaidInitTaskId": ScheduleCSVData.subMaidInitTaskId = csv.GetCellAsInteger(1, i); break; case "faclilityPowerUpWorkId": ScheduleCSVData.faclilityPowerUpWorkId = csv.GetCellAsInteger(1, i); break; } } } [Obsolete("FacilityDataTable.csへ移動しました。", false)] private static Dictionary WorkDataDic; private static Dictionary TrainingDataDic; private static Dictionary YotogiDataDic; private static ScheduleCSVData.Work FaclityPowerUp; public static SortedDictionary TaskCategoryNameMap; public static List WorkLegacyDisableId; public static List NetorareFlag; public static Dictionary> NoonWorkInitData; public static Dictionary> NoonWorkInitDataLegacy; public static Dictionary> NightWorkInitData; public static Dictionary> NightWorkInitDataLegacy; public static int[] EntertainNumberData; public static List[] EntertainGuestData; public static int dayAddSalonClean; public static int dayAddSalonBeautiful; public static int haveSexAddSalonClean; public static int haveSexAddSalonBeautiful; public static int entertainAddSalonClean; public static int entertainAddSalonBeautiful; public static int entertainParameterRevisionThreshold; public static int entertainPropensityRevisionMin; public static int entertainPropensityRevisionMax; public static int workSuccessLvPerfectIncidence = 10; public static int workSuccessLvMissIncidence = 10; public static int dispatchIncomCoefficient = 500; public static int vipFullOpenDay = 100; public static int noonWorkLv2Exp = 10; public static int noonWorkLv3Exp = 30; public static int subMaidInitTaskId; public static int faclilityPowerUpWorkId = 3000; public static int trainingFaclilityID = 100; public const int scheduleTrainingCategoryID = 51; public const int scheduleWorkCategoryID = 52; public const int scheduleYotogiCategoryID = 100; [CompilerGenerated] private static Action <>f__mg$cache0; [CompilerGenerated] private static Action> <>f__mg$cache1; [CompilerGenerated] private static Action> <>f__mg$cache2; [CompilerGenerated] private static Action> <>f__mg$cache3; [CompilerGenerated] private static Action <>f__mg$cache4; [CompilerGenerated] private static Action <>f__mg$cache5; [CompilerGenerated] private static Action <>f__mg$cache6; [CompilerGenerated] private static Action <>f__mg$cache7; [CompilerGenerated] private static Action <>f__mg$cache8; [CompilerGenerated] private static Action <>f__mg$cache9; [CompilerGenerated] private static Action <>f__mg$cacheA; [CompilerGenerated] private static Action <>f__mg$cacheB; [CompilerGenerated] private static Action <>f__mg$cacheC; [CompilerGenerated] private static Action <>f__mg$cacheD; [CompilerGenerated] private static Action> <>f__mg$cacheE; [CompilerGenerated] private static Action> <>f__mg$cacheF; public enum TrainingType { Basic, Dispatch, Trainer, Trainee, Holiday, Travel } public enum YotogiType { Basic, Rest, Entertain, HaveSex, Vip, VipCall, Travel, EasyYotogi, NewSex } public enum WorkType { Basic, PowerUp } public class ScheduleBase { public bool IsCommon { get { return this.mode == ScheduleCSVData.ScheduleBase.Mode.Common; } } public bool IsLegacy { get { return this.mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2; } } public ScheduleCSVData.ScheduleBase.Mode mode = ScheduleCSVData.ScheduleBase.Mode.COM3D; public ScheduleTaskCtrl.TaskType type; public bool isCommu = true; public string name; public string icon; public int id; public string information; public int categoryID; public List condInfo; public bool visibleIfRentalMaid; public bool disableIfRentalMaid; public enum Mode { CM3D2, COM3D, Common } } public class Training : ScheduleCSVData.ScheduleBase { public FacilityDataTable.FacilityDefaultData facility { get { if (this.facilityDefaultData == null) { this.facilityDefaultData = FacilityDataTable.GetFacilityDefaultData(this.facilityId, true); } return this.facilityDefaultData; } set { this.facilityDefaultData = value; } } private FacilityDataTable.FacilityDefaultData facilityDefaultData; public ScheduleCSVData.TrainingType trainingType; public int facilityId = 100; public int study_rate; public int reception; public int care; public int lovely; public int elegance; public int charm; public int teach_rate; public int cooking; public int vocal; public int dance; public int appealPoint; public int exp; public int income; public int cmdExp; public List condContract; public List condMaidClass; public string needMaidStatus; public List needEventItemIdList; public List condPackage; } public class Work : ScheduleCSVData.Training { public ScheduleCSVData.WorkType workTyp; } public class Yotogi : ScheduleCSVData.ScheduleBase { public ScheduleCSVData.YotogiType yotogiType; public int income; public int evaluation; public int add_play_number; public int add_other_play_number; public int condSalonGrade; public Dictionary condSkill; public List condContract; public List condMaidClass; public List condYotogiClass; public List condPropensity; public List condSeikeiken; public List condFlag1; public List condFlag0; public List condRelation; public string subMaidUnipueName = string.Empty; public List condPackage; public List condManVisibleFlag1; public List condManFlag1; public List condManFlag0; public List condPersonal; public bool condMainChara; public List> condFacilityID; public List pairCondPersonal; public bool netorareFlag; public ScheduleCSVData.Yotogi.EasyYotogi easyYotogi; public List condRelationOld; public class EasyYotogi { public int trophyId; public int care; public int reception; public int teach_rate; public int inyoku; public int hentai; public int housi; public int msei; public int study_rate; } } public class EntertainGuest { public int condSalonGrade; public int baseIcome; public int baseEvaluation; public bool sexual; } } }