ScheduleCSVData.cs 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Runtime.CompilerServices;
  4. using MaidStatus;
  5. using MaidStatus.Old;
  6. using UnityEngine;
  7. using wf;
  8. namespace Schedule
  9. {
  10. public static class ScheduleCSVData
  11. {
  12. static ScheduleCSVData()
  13. {
  14. ScheduleCSVData.CVSRead();
  15. ScheduleCSVData.FacilityPowerUpTask();
  16. }
  17. public static Dictionary<int, ScheduleCSVData.Training> TrainingData
  18. {
  19. get
  20. {
  21. return ScheduleCSVData.TrainingDataDic;
  22. }
  23. }
  24. public static Dictionary<int, ScheduleCSVData.Yotogi> YotogiData
  25. {
  26. get
  27. {
  28. return ScheduleCSVData.YotogiDataDic;
  29. }
  30. }
  31. public static ReadOnlyDictionary<int, ScheduleCSVData.Work> WorkData
  32. {
  33. get
  34. {
  35. if (ScheduleCSVData.cacheWorkData == null)
  36. {
  37. ScheduleCSVData.cacheWorkData = new Dictionary<int, ScheduleCSVData.Work>();
  38. if (ScheduleCSVData.FaclityPowerUp != null)
  39. {
  40. ScheduleCSVData.cacheWorkData.Add(ScheduleCSVData.FaclityPowerUp.id, ScheduleCSVData.FaclityPowerUp);
  41. }
  42. foreach (KeyValuePair<int, ScheduleCSVData.Work> keyValuePair in FacilityDataTable.GetAllWorkData(true))
  43. {
  44. if (!ScheduleCSVData.cacheWorkData.ContainsKey(keyValuePair.Key))
  45. {
  46. ScheduleCSVData.cacheWorkData.Add(keyValuePair.Key, keyValuePair.Value);
  47. }
  48. }
  49. }
  50. return new ReadOnlyDictionary<int, ScheduleCSVData.Work>(ScheduleCSVData.cacheWorkData);
  51. }
  52. }
  53. public static ReadOnlyDictionary<int, ScheduleCSVData.ScheduleBase> AllData
  54. {
  55. get
  56. {
  57. if (ScheduleCSVData.cacheAllDataData == null)
  58. {
  59. ScheduleCSVData.cacheAllDataData = new Dictionary<int, ScheduleCSVData.ScheduleBase>();
  60. foreach (KeyValuePair<int, ScheduleCSVData.Training> keyValuePair in ScheduleCSVData.TrainingDataDic)
  61. {
  62. if (!ScheduleCSVData.cacheAllDataData.ContainsKey(keyValuePair.Key))
  63. {
  64. ScheduleCSVData.cacheAllDataData.Add(keyValuePair.Key, keyValuePair.Value);
  65. }
  66. }
  67. foreach (KeyValuePair<int, ScheduleCSVData.Yotogi> keyValuePair2 in ScheduleCSVData.YotogiDataDic)
  68. {
  69. if (!ScheduleCSVData.cacheAllDataData.ContainsKey(keyValuePair2.Key))
  70. {
  71. ScheduleCSVData.cacheAllDataData.Add(keyValuePair2.Key, keyValuePair2.Value);
  72. }
  73. }
  74. if (ScheduleCSVData.FaclityPowerUp != null)
  75. {
  76. ScheduleCSVData.cacheAllDataData.Add(ScheduleCSVData.FaclityPowerUp.id, ScheduleCSVData.FaclityPowerUp);
  77. }
  78. foreach (KeyValuePair<int, ScheduleCSVData.Work> keyValuePair3 in FacilityDataTable.GetAllWorkData(true))
  79. {
  80. if (!ScheduleCSVData.cacheAllDataData.ContainsKey(keyValuePair3.Key))
  81. {
  82. ScheduleCSVData.cacheAllDataData.Add(keyValuePair3.Key, keyValuePair3.Value);
  83. }
  84. }
  85. }
  86. return new ReadOnlyDictionary<int, ScheduleCSVData.ScheduleBase>(ScheduleCSVData.cacheAllDataData);
  87. }
  88. }
  89. private static void CVSRead()
  90. {
  91. ScheduleCSVData.TrainingDataDic = new Dictionary<int, ScheduleCSVData.Training>();
  92. ScheduleCSVData.YotogiDataDic = new Dictionary<int, ScheduleCSVData.Yotogi>();
  93. ScheduleCSVData.EntertainNumberData = new int[6];
  94. ScheduleCSVData.EntertainGuestData = new List<ScheduleCSVData.EntertainGuest>[6];
  95. for (int i = 0; i < ScheduleCSVData.EntertainGuestData.Length; i++)
  96. {
  97. ScheduleCSVData.EntertainGuestData[i] = new List<ScheduleCSVData.EntertainGuest>();
  98. }
  99. HashSet<int> enabled_list = new HashSet<int>();
  100. HashSet<int> hashSet = new HashSet<int>();
  101. HashSet<int> hashSet2 = new HashSet<int>();
  102. CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "schedule_work_noon_enabled", ref enabled_list);
  103. CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "schedule_work_night_enabled", ref hashSet);
  104. CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "schedule_work_facility_enabled", ref hashSet2);
  105. ScheduleCSVData.ReadEnabledIdListPlugIn("schedule_work_night_", hashSet, GameUty.FileSystem, GameUty.PathList);
  106. string file_name = "schedule_work_night_category_list.nei";
  107. if (ScheduleCSVData.<>f__mg$cache0 == null)
  108. {
  109. ScheduleCSVData.<>f__mg$cache0 = new Action<CsvParser>(ScheduleCSVData.CVSReader_TaskCategoryList);
  110. }
  111. ScheduleCSVData.CVSReader(file_name, ScheduleCSVData.<>f__mg$cache0, false);
  112. string file_name2 = "schedule_work_noon.nei";
  113. if (ScheduleCSVData.<>f__mg$cache1 == null)
  114. {
  115. ScheduleCSVData.<>f__mg$cache1 = new Action<CsvParser, HashSet<int>>(ScheduleCSVData.CVSReader_TrainingData_CMO3D);
  116. }
  117. ScheduleCSVData.CVSReader(file_name2, ScheduleCSVData.<>f__mg$cache1, enabled_list, false);
  118. string file_name3 = "schedule_work_night.nei";
  119. if (ScheduleCSVData.<>f__mg$cache2 == null)
  120. {
  121. ScheduleCSVData.<>f__mg$cache2 = new Action<CsvParser, HashSet<int>>(ScheduleCSVData.CVSReader_YotogiData_CMO3D);
  122. }
  123. ScheduleCSVData.CVSReader(file_name3, ScheduleCSVData.<>f__mg$cache2, hashSet, false);
  124. string file_name4 = "schedule_work_easyyotogi.nei";
  125. if (ScheduleCSVData.<>f__mg$cache3 == null)
  126. {
  127. ScheduleCSVData.<>f__mg$cache3 = new Action<CsvParser, HashSet<int>>(ScheduleCSVData.CVSReader_EasyYotogiData);
  128. }
  129. ScheduleCSVData.CVSReader(file_name4, ScheduleCSVData.<>f__mg$cache3, hashSet, false);
  130. List<MaidStatus.Personal.Data> allDatas = MaidStatus.Personal.GetAllDatas(false);
  131. ScheduleCSVData.NoonWorkInitData = new Dictionary<int, Dictionary<int, int>>();
  132. ScheduleCSVData.NightWorkInitData = new Dictionary<int, Dictionary<int, int>>();
  133. for (int j = 0; j < allDatas.Count; j++)
  134. {
  135. ScheduleCSVData.NoonWorkInitData.Add(allDatas[j].id, new Dictionary<int, int>());
  136. ScheduleCSVData.NightWorkInitData.Add(allDatas[j].id, new Dictionary<int, int>());
  137. }
  138. string file_name5 = "schedule_init_noon.nei";
  139. if (ScheduleCSVData.<>f__mg$cache4 == null)
  140. {
  141. ScheduleCSVData.<>f__mg$cache4 = new Action<CsvParser>(ScheduleCSVData.CVSReader_TaskInitData_Noon_COM3D);
  142. }
  143. ScheduleCSVData.CVSReader(file_name5, ScheduleCSVData.<>f__mg$cache4, false);
  144. string file_name6 = "schedule_init_night.nei";
  145. if (ScheduleCSVData.<>f__mg$cache5 == null)
  146. {
  147. ScheduleCSVData.<>f__mg$cache5 = new Action<CsvParser>(ScheduleCSVData.CVSReader_TaskInitData_Night_COM3D);
  148. }
  149. ScheduleCSVData.CVSReader(file_name6, ScheduleCSVData.<>f__mg$cache5, false);
  150. string file_name7 = "schedule_entertain_number.nei";
  151. if (ScheduleCSVData.<>f__mg$cache6 == null)
  152. {
  153. ScheduleCSVData.<>f__mg$cache6 = new Action<CsvParser>(ScheduleCSVData.CVSReader_EntertainNumberData);
  154. }
  155. ScheduleCSVData.CVSReader(file_name7, ScheduleCSVData.<>f__mg$cache6, false);
  156. string file_name8 = "schedule_entertain_guest.nei";
  157. if (ScheduleCSVData.<>f__mg$cache7 == null)
  158. {
  159. ScheduleCSVData.<>f__mg$cache7 = new Action<CsvParser>(ScheduleCSVData.CVSReader_EntertainGuestData);
  160. }
  161. ScheduleCSVData.CVSReader(file_name8, ScheduleCSVData.<>f__mg$cache7, false);
  162. string file_name9 = "schedule_define.nei";
  163. if (ScheduleCSVData.<>f__mg$cache8 == null)
  164. {
  165. ScheduleCSVData.<>f__mg$cache8 = new Action<CsvParser>(ScheduleCSVData.CVSReader_Define);
  166. }
  167. ScheduleCSVData.CVSReader(file_name9, ScheduleCSVData.<>f__mg$cache8, false);
  168. string file_name10 = "schedule_work_netorare.nei";
  169. if (ScheduleCSVData.<>f__mg$cache9 == null)
  170. {
  171. ScheduleCSVData.<>f__mg$cache9 = new Action<CsvParser>(ScheduleCSVData.CVSReader_NetorareIdList);
  172. }
  173. ScheduleCSVData.CVSReader(file_name10, ScheduleCSVData.<>f__mg$cache9, false);
  174. if (GameUty.IsEnabledCompatibilityMode)
  175. {
  176. ScheduleCSVData.NoonWorkInitDataLegacy = new Dictionary<int, Dictionary<int, int>>();
  177. ScheduleCSVData.NightWorkInitDataLegacy = new Dictionary<int, Dictionary<int, int>>();
  178. for (int k = 0; k < allDatas.Count; k++)
  179. {
  180. ScheduleCSVData.NoonWorkInitDataLegacy.Add(allDatas[k].id, new Dictionary<int, int>());
  181. ScheduleCSVData.NightWorkInitDataLegacy.Add(allDatas[k].id, new Dictionary<int, int>());
  182. }
  183. string file_name11 = "schedule_init_noon.nei";
  184. if (ScheduleCSVData.<>f__mg$cacheA == null)
  185. {
  186. ScheduleCSVData.<>f__mg$cacheA = new Action<CsvParser>(ScheduleCSVData.CVSReader_TaskInitData_Noon_CM3D2);
  187. }
  188. ScheduleCSVData.CVSReader(file_name11, ScheduleCSVData.<>f__mg$cacheA, true);
  189. string file_name12 = "schedule_init_night.nei";
  190. if (ScheduleCSVData.<>f__mg$cacheB == null)
  191. {
  192. ScheduleCSVData.<>f__mg$cacheB = new Action<CsvParser>(ScheduleCSVData.CVSReader_TaskInitData_Night_CM3D2);
  193. }
  194. ScheduleCSVData.CVSReader(file_name12, ScheduleCSVData.<>f__mg$cacheB, true);
  195. CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Old, true, "schedule_work_noon_enabled", ref enabled_list);
  196. CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Old, true, "schedule_work_night_enabled", ref hashSet);
  197. ScheduleCSVData.ReadEnabledIdListPlugIn("schedule_work_night_", hashSet, GameUty.FileSystemOld, GameUty.PathListOld);
  198. string file_name13 = "schedule_work_legacy_disable.nei";
  199. if (ScheduleCSVData.<>f__mg$cacheC == null)
  200. {
  201. ScheduleCSVData.<>f__mg$cacheC = new Action<CsvParser>(ScheduleCSVData.CVSReader_LeagacyDisableIdList);
  202. }
  203. ScheduleCSVData.CVSReader(file_name13, ScheduleCSVData.<>f__mg$cacheC, false);
  204. string file_name14 = "schedule_work_night_category_list.nei";
  205. if (ScheduleCSVData.<>f__mg$cacheD == null)
  206. {
  207. ScheduleCSVData.<>f__mg$cacheD = new Action<CsvParser>(ScheduleCSVData.CVSReader_TaskCategoryList);
  208. }
  209. ScheduleCSVData.CVSReader(file_name14, ScheduleCSVData.<>f__mg$cacheD, true);
  210. string file_name15 = "schedule_work_noon.nei";
  211. if (ScheduleCSVData.<>f__mg$cacheE == null)
  212. {
  213. ScheduleCSVData.<>f__mg$cacheE = new Action<CsvParser, HashSet<int>>(ScheduleCSVData.CVSReader_TrainingData_CM3D2);
  214. }
  215. ScheduleCSVData.CVSReader(file_name15, ScheduleCSVData.<>f__mg$cacheE, enabled_list, true);
  216. string file_name16 = "schedule_work_night.nei";
  217. if (ScheduleCSVData.<>f__mg$cacheF == null)
  218. {
  219. ScheduleCSVData.<>f__mg$cacheF = new Action<CsvParser, HashSet<int>>(ScheduleCSVData.CVSReader_YotogiData_CM3D2);
  220. }
  221. ScheduleCSVData.CVSReader(file_name16, ScheduleCSVData.<>f__mg$cacheF, hashSet, true);
  222. }
  223. }
  224. private static void ReadEnabledIdListPlugIn(string csvName, HashSet<int> idlLst, AFileSystemBase fsb, List<string> pathList)
  225. {
  226. foreach (string str in pathList)
  227. {
  228. string a = csvName + str;
  229. if (!(a == "schedule_work_night_legacy"))
  230. {
  231. CsvCommonIdManager.ReadEnabledIdList(fsb, null, csvName + str, ref idlLst);
  232. }
  233. }
  234. }
  235. private static bool CVSReader(string file_name, Action<CsvParser> Reader, bool useOldSystem = false)
  236. {
  237. AFileBase afileBase;
  238. if (useOldSystem)
  239. {
  240. afileBase = GameUty.FileSystemOld.FileOpen(file_name);
  241. }
  242. else
  243. {
  244. afileBase = GameUty.FileSystem.FileOpen(file_name);
  245. }
  246. using (afileBase)
  247. {
  248. if (!afileBase.IsValid())
  249. {
  250. return false;
  251. }
  252. using (CsvParser csvParser = new CsvParser())
  253. {
  254. if (!csvParser.Open(afileBase))
  255. {
  256. Debug.LogWarning("csv open failed.\n" + file_name);
  257. return false;
  258. }
  259. Reader(csvParser);
  260. }
  261. }
  262. return true;
  263. }
  264. private static bool CVSReader(string file_name, Action<CsvParser, HashSet<int>> Reader, HashSet<int> enabled_list, bool useOldSystem = false)
  265. {
  266. AFileBase afileBase;
  267. if (useOldSystem)
  268. {
  269. afileBase = GameUty.FileSystemOld.FileOpen(file_name);
  270. }
  271. else
  272. {
  273. afileBase = GameUty.FileSystem.FileOpen(file_name);
  274. }
  275. using (AFileBase afileBase2 = afileBase)
  276. {
  277. if (!afileBase2.IsValid())
  278. {
  279. return false;
  280. }
  281. using (CsvParser csvParser = new CsvParser())
  282. {
  283. if (!csvParser.Open(afileBase2))
  284. {
  285. Debug.LogWarning("csv open failed.\n" + file_name);
  286. return false;
  287. }
  288. Reader(csvParser, enabled_list);
  289. }
  290. }
  291. return true;
  292. }
  293. private static void CVSReader_WorkData(CsvParser csv, HashSet<int> enabled_list)
  294. {
  295. int max_cell_y = csv.max_cell_y;
  296. for (int i = 1; i < max_cell_y; i++)
  297. {
  298. int num = 0;
  299. ScheduleCSVData.Work work = new ScheduleCSVData.Work();
  300. work.type = ScheduleTaskCtrl.TaskType.Work;
  301. work.id = csv.GetCellAsInteger(num++, i);
  302. if (enabled_list.Contains(work.id))
  303. {
  304. work.name = csv.GetCellAsString(num++, i);
  305. num++;
  306. work.icon = csv.GetCellAsString(num++, i);
  307. string cellAsString = csv.GetCellAsString(num++, i);
  308. if (!string.IsNullOrEmpty(cellAsString) && Enum.IsDefined(typeof(ScheduleCSVData.TrainingType), cellAsString))
  309. {
  310. work.trainingType = (ScheduleCSVData.TrainingType)Enum.Parse(typeof(ScheduleCSVData.TrainingType), cellAsString, false);
  311. }
  312. work.study_rate = csv.GetCellAsInteger(num++, i);
  313. work.reception = csv.GetCellAsInteger(num++, i);
  314. work.care = csv.GetCellAsInteger(num++, i);
  315. work.lovely = csv.GetCellAsInteger(num++, i);
  316. work.elegance = csv.GetCellAsInteger(num++, i);
  317. work.charm = csv.GetCellAsInteger(num++, i);
  318. work.teach_rate = csv.GetCellAsInteger(num++, i);
  319. work.cooking = csv.GetCellAsInteger(num++, i);
  320. work.vocal = csv.GetCellAsInteger(num++, i);
  321. work.dance = csv.GetCellAsInteger(num++, i);
  322. work.appealPoint = csv.GetCellAsInteger(num++, i);
  323. work.exp = csv.GetCellAsInteger(num++, i);
  324. work.income = csv.GetCellAsInteger(num++, i);
  325. work.cmdExp = csv.GetCellAsInteger(num++, i);
  326. string cellAsString2 = csv.GetCellAsString(num++, i);
  327. work.condContract = new List<Contract>();
  328. string[] array = cellAsString2.Split(new char[]
  329. {
  330. '|'
  331. }, StringSplitOptions.RemoveEmptyEntries);
  332. for (int j = 0; j < array.Length; j++)
  333. {
  334. if (Enum.IsDefined(typeof(Contract), array[j]))
  335. {
  336. work.condContract.Add((Contract)Enum.Parse(typeof(Contract), array[j], false));
  337. }
  338. }
  339. string cellAsString3 = csv.GetCellAsString(num++, i);
  340. work.condMaidClass = new List<int>();
  341. string[] array2 = cellAsString3.Split(new char[]
  342. {
  343. '&'
  344. }, StringSplitOptions.RemoveEmptyEntries);
  345. for (int k = 0; k < array2.Length; k++)
  346. {
  347. int id = JobClass.GetData(array2[k]).id;
  348. work.condMaidClass.Add(id);
  349. }
  350. work.needEventItemIdList = new List<int>();
  351. if (csv.GetCellAsString(num, 0) == "必要状態")
  352. {
  353. work.needMaidStatus = csv.GetCellAsString(num++, i);
  354. string cellAsString4 = csv.GetCellAsString(num++, i);
  355. if (!string.IsNullOrEmpty(cellAsString4))
  356. {
  357. string[] array3 = cellAsString4.Split(new char[]
  358. {
  359. '|'
  360. });
  361. foreach (string s in array3)
  362. {
  363. work.needEventItemIdList.Add(int.Parse(s));
  364. }
  365. }
  366. }
  367. if (num < csv.max_cell_x)
  368. {
  369. string cellAsString5 = csv.GetCellAsString(num, i);
  370. if (cellAsString5 != null)
  371. {
  372. if (!(cellAsString5 == "表示"))
  373. {
  374. if (cellAsString5 == "非表示")
  375. {
  376. work.disableIfRentalMaid = true;
  377. }
  378. }
  379. else
  380. {
  381. work.visibleIfRentalMaid = true;
  382. }
  383. }
  384. }
  385. num++;
  386. work.condPackage = new List<string>();
  387. if (work.id > 0)
  388. {
  389. work.categoryID = 52;
  390. ScheduleCSVData.WorkDataDic[work.id] = work;
  391. }
  392. }
  393. }
  394. }
  395. private static void CVSReader_LeagacyDisableIdList(CsvParser csv)
  396. {
  397. ScheduleCSVData.WorkLegacyDisableId = new List<int>();
  398. int max_cell_y = csv.max_cell_y;
  399. for (int i = 1; i < max_cell_y; i++)
  400. {
  401. ScheduleCSVData.WorkLegacyDisableId.Add(csv.GetCellAsInteger(0, i));
  402. }
  403. }
  404. private static void CVSReader_NetorareIdList(CsvParser csv)
  405. {
  406. ScheduleCSVData.NetorareFlag = new List<int>();
  407. int max_cell_y = csv.max_cell_y;
  408. for (int i = 1; i < max_cell_y; i++)
  409. {
  410. ScheduleCSVData.NetorareFlag.Add(csv.GetCellAsInteger(0, i));
  411. }
  412. }
  413. private static void FacilityPowerUpTask()
  414. {
  415. ScheduleCSVData.FaclityPowerUp = new ScheduleCSVData.Work();
  416. ScheduleCSVData.FaclityPowerUp.name = "施設強化";
  417. ScheduleCSVData.FaclityPowerUp.type = ScheduleTaskCtrl.TaskType.Work;
  418. ScheduleCSVData.FaclityPowerUp.workTyp = ScheduleCSVData.WorkType.PowerUp;
  419. ScheduleCSVData.FaclityPowerUp.icon = "schedule_icon_shisetsu";
  420. ScheduleCSVData.FaclityPowerUp.id = ScheduleCSVData.faclilityPowerUpWorkId;
  421. ScheduleCSVData.FaclityPowerUp.categoryID = 52;
  422. ScheduleCSVData.FaclityPowerUp.isCommu = false;
  423. }
  424. private static void CVSReader_TrainingData_CM3D2(CsvParser csv, HashSet<int> enabled_list)
  425. {
  426. ScheduleCSVData.CVSReader_TrainingData(csv, enabled_list, ScheduleCSVData.ScheduleBase.Mode.CM3D2);
  427. }
  428. private static void CVSReader_TrainingData_CMO3D(CsvParser csv, HashSet<int> enabled_list)
  429. {
  430. ScheduleCSVData.CVSReader_TrainingData(csv, enabled_list, ScheduleCSVData.ScheduleBase.Mode.COM3D);
  431. }
  432. private static void CVSReader_TrainingData(CsvParser csv, HashSet<int> enabled_list, ScheduleCSVData.ScheduleBase.Mode mode)
  433. {
  434. int max_cell_y = csv.max_cell_y;
  435. for (int i = 1; i < max_cell_y; i++)
  436. {
  437. int num = 0;
  438. ScheduleCSVData.Training training = new ScheduleCSVData.Training();
  439. training.mode = mode;
  440. training.type = ScheduleTaskCtrl.TaskType.Training;
  441. training.id = csv.GetCellAsInteger(num++, i);
  442. if (enabled_list.Contains(training.id))
  443. {
  444. training.name = csv.GetCellAsString(num++, i);
  445. if (training.name == string.Empty)
  446. {
  447. return;
  448. }
  449. num++;
  450. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  451. {
  452. training.facilityId = csv.GetCellAsInteger(num++, i);
  453. }
  454. else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2)
  455. {
  456. training.facilityId = ScheduleCSVData.trainingFaclilityID;
  457. }
  458. training.icon = csv.GetCellAsString(num++, i);
  459. string cellAsString = csv.GetCellAsString(num++, i);
  460. if (!string.IsNullOrEmpty(cellAsString) && Enum.IsDefined(typeof(ScheduleCSVData.TrainingType), cellAsString))
  461. {
  462. training.trainingType = (ScheduleCSVData.TrainingType)Enum.Parse(typeof(ScheduleCSVData.TrainingType), cellAsString, false);
  463. }
  464. if (training.trainingType == ScheduleCSVData.TrainingType.Basic || training.trainingType == ScheduleCSVData.TrainingType.Trainee || training.trainingType == ScheduleCSVData.TrainingType.Trainer)
  465. {
  466. training.isCommu = true;
  467. }
  468. else
  469. {
  470. training.isCommu = false;
  471. }
  472. training.study_rate = csv.GetCellAsInteger(num++, i);
  473. training.reception = csv.GetCellAsInteger(num++, i);
  474. training.care = csv.GetCellAsInteger(num++, i);
  475. training.lovely = csv.GetCellAsInteger(num++, i);
  476. training.elegance = csv.GetCellAsInteger(num++, i);
  477. training.charm = csv.GetCellAsInteger(num++, i);
  478. training.teach_rate = csv.GetCellAsInteger(num++, i);
  479. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  480. {
  481. training.cooking = csv.GetCellAsInteger(num++, i);
  482. training.vocal = csv.GetCellAsInteger(num++, i);
  483. training.dance = csv.GetCellAsInteger(num++, i);
  484. training.appealPoint = csv.GetCellAsInteger(num++, i);
  485. }
  486. training.exp = csv.GetCellAsInteger(num++, i);
  487. if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2)
  488. {
  489. num++;
  490. num++;
  491. }
  492. training.income = csv.GetCellAsInteger(num++, i);
  493. training.cmdExp = csv.GetCellAsInteger(num++, i);
  494. string cellAsString2 = csv.GetCellAsString(num++, i);
  495. training.condContract = new List<Contract>();
  496. string[] array = cellAsString2.Split(new char[]
  497. {
  498. '|'
  499. }, StringSplitOptions.RemoveEmptyEntries);
  500. for (int j = 0; j < array.Length; j++)
  501. {
  502. if (Enum.IsDefined(typeof(Contract), array[j]))
  503. {
  504. training.condContract.Add((Contract)Enum.Parse(typeof(Contract), array[j], false));
  505. }
  506. }
  507. string cellAsString3 = csv.GetCellAsString(num++, i);
  508. training.condMaidClass = new List<int>();
  509. string[] array2 = cellAsString3.Split(new char[]
  510. {
  511. '&'
  512. }, StringSplitOptions.RemoveEmptyEntries);
  513. for (int k = 0; k < array2.Length; k++)
  514. {
  515. int id = JobClass.GetData(array2[k]).id;
  516. training.condMaidClass.Add(id);
  517. }
  518. training.needEventItemIdList = new List<int>();
  519. if (csv.GetCellAsString(num, 0) == "必要状態")
  520. {
  521. training.needMaidStatus = csv.GetCellAsString(num++, i);
  522. string cellAsString4 = csv.GetCellAsString(num++, i);
  523. if (!string.IsNullOrEmpty(cellAsString4))
  524. {
  525. string[] array3 = cellAsString4.Split(new char[]
  526. {
  527. '|'
  528. });
  529. foreach (string s in array3)
  530. {
  531. training.needEventItemIdList.Add(int.Parse(s));
  532. }
  533. }
  534. }
  535. if (num < csv.max_cell_x)
  536. {
  537. string cellAsString5 = csv.GetCellAsString(num, i);
  538. if (cellAsString5 != null)
  539. {
  540. if (!(cellAsString5 == "表示"))
  541. {
  542. if (cellAsString5 == "非表示")
  543. {
  544. training.disableIfRentalMaid = true;
  545. }
  546. }
  547. else
  548. {
  549. training.visibleIfRentalMaid = true;
  550. }
  551. }
  552. }
  553. num++;
  554. training.condPackage = new List<string>();
  555. if (training.trainingType == ScheduleCSVData.TrainingType.Dispatch)
  556. {
  557. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  558. {
  559. training.mode = ScheduleCSVData.ScheduleBase.Mode.CM3D2;
  560. }
  561. else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2)
  562. {
  563. goto IL_489;
  564. }
  565. }
  566. if (training.id > 0)
  567. {
  568. training.categoryID = 51;
  569. ScheduleCSVData.TrainingDataDic[training.id] = training;
  570. }
  571. }
  572. IL_489:;
  573. }
  574. }
  575. private static void CVSReader_YotogiData_CM3D2(CsvParser csv, HashSet<int> enabled_list)
  576. {
  577. ScheduleCSVData.CVSReader_YotogiData(csv, enabled_list, ScheduleCSVData.ScheduleBase.Mode.CM3D2);
  578. }
  579. private static void CVSReader_YotogiData_CMO3D(CsvParser csv, HashSet<int> enabled_list)
  580. {
  581. ScheduleCSVData.CVSReader_YotogiData(csv, enabled_list, ScheduleCSVData.ScheduleBase.Mode.COM3D);
  582. }
  583. private static void CVSReader_YotogiData(CsvParser csv, HashSet<int> enabled_list, ScheduleCSVData.ScheduleBase.Mode mode)
  584. {
  585. int max_cell_y = csv.max_cell_y;
  586. for (int i = 1; i < max_cell_y; i++)
  587. {
  588. int num = 0;
  589. ScheduleCSVData.Yotogi yotogi = new ScheduleCSVData.Yotogi();
  590. yotogi.mode = mode;
  591. yotogi.type = ScheduleTaskCtrl.TaskType.Yotogi;
  592. yotogi.id = csv.GetCellAsInteger(num++, i);
  593. if (enabled_list.Contains(yotogi.id))
  594. {
  595. yotogi.name = csv.GetCellAsString(num++, i);
  596. if (yotogi.name == string.Empty)
  597. {
  598. return;
  599. }
  600. num++;
  601. yotogi.icon = csv.GetCellAsString(num++, i);
  602. yotogi.isCommu = false;
  603. yotogi.categoryID = csv.GetCellAsInteger(num++, i);
  604. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  605. {
  606. yotogi.netorareFlag = csv.GetCellBool(num++, i);
  607. }
  608. string cellAsString = csv.GetCellAsString(num++, i);
  609. if (!string.IsNullOrEmpty(cellAsString) && Enum.IsDefined(typeof(ScheduleCSVData.YotogiType), cellAsString))
  610. {
  611. yotogi.yotogiType = (ScheduleCSVData.YotogiType)Enum.Parse(typeof(ScheduleCSVData.YotogiType), cellAsString, false);
  612. }
  613. yotogi.information = csv.GetCellAsString(num++, i);
  614. yotogi.income = csv.GetCellAsInteger(num++, i);
  615. yotogi.evaluation = csv.GetCellAsInteger(num++, i);
  616. yotogi.add_play_number = csv.GetCellAsInteger(num++, i);
  617. yotogi.add_other_play_number = csv.GetCellAsInteger(num++, i);
  618. yotogi.condInfo = new List<string>();
  619. for (int j = 0; j < 9; j++)
  620. {
  621. string cellAsString2 = csv.GetCellAsString(num++, i);
  622. if (!string.IsNullOrEmpty(cellAsString2))
  623. {
  624. yotogi.condInfo.Add(cellAsString2);
  625. }
  626. }
  627. yotogi.condSalonGrade = csv.GetCellAsInteger(num++, i);
  628. if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2)
  629. {
  630. yotogi.condSalonGrade = 1;
  631. }
  632. yotogi.condSkill = new Dictionary<int, int>();
  633. string cellAsString3 = csv.GetCellAsString(num++, i);
  634. string[] array = cellAsString3.Split(new char[]
  635. {
  636. '&'
  637. }, StringSplitOptions.RemoveEmptyEntries);
  638. for (int k = 0; k < array.Length; k++)
  639. {
  640. if (array[k].Contains(","))
  641. {
  642. string[] array2 = array[k].Split(new char[]
  643. {
  644. ','
  645. }, StringSplitOptions.None);
  646. yotogi.condSkill[int.Parse(array2[0])] = int.Parse(array2[1]);
  647. }
  648. }
  649. string cellAsString4 = csv.GetCellAsString(num++, i);
  650. yotogi.condContract = new List<Contract>();
  651. string[] array3 = cellAsString4.Split(new char[]
  652. {
  653. '|'
  654. }, StringSplitOptions.RemoveEmptyEntries);
  655. for (int l = 0; l < array3.Length; l++)
  656. {
  657. if (Enum.IsDefined(typeof(Contract), array3[l]))
  658. {
  659. yotogi.condContract.Add((Contract)Enum.Parse(typeof(Contract), array3[l], false));
  660. }
  661. }
  662. string cellAsString5 = csv.GetCellAsString(num++, i);
  663. yotogi.condMaidClass = new List<int>();
  664. string[] array4 = cellAsString5.Split(new char[]
  665. {
  666. '&'
  667. }, StringSplitOptions.RemoveEmptyEntries);
  668. for (int m = 0; m < array4.Length; m++)
  669. {
  670. int id = JobClass.GetData(array4[m]).id;
  671. yotogi.condMaidClass.Add(id);
  672. }
  673. string cellAsString6 = csv.GetCellAsString(num++, i);
  674. yotogi.condYotogiClass = new List<int>();
  675. string[] array5 = cellAsString6.Split(new char[]
  676. {
  677. '&'
  678. }, StringSplitOptions.RemoveEmptyEntries);
  679. for (int n = 0; n < array5.Length; n++)
  680. {
  681. int id2 = YotogiClass.GetData(array5[n]).id;
  682. yotogi.condYotogiClass.Add(id2);
  683. }
  684. string cellAsString7 = csv.GetCellAsString(num++, i);
  685. yotogi.condPropensity = new List<int>();
  686. string[] array6 = cellAsString7.Split(new char[]
  687. {
  688. '|'
  689. }, StringSplitOptions.RemoveEmptyEntries);
  690. for (int num2 = 0; num2 < array6.Length; num2++)
  691. {
  692. if (Propensity.Contains(array6[num2]))
  693. {
  694. int id3 = Propensity.GetData(array6[num2]).id;
  695. yotogi.condPropensity.Add(id3);
  696. }
  697. }
  698. string cellAsString8 = csv.GetCellAsString(num++, i);
  699. yotogi.condSeikeiken = new List<Seikeiken>();
  700. string[] array7 = cellAsString8.Split(new char[]
  701. {
  702. '|'
  703. }, StringSplitOptions.RemoveEmptyEntries);
  704. for (int num3 = 0; num3 < array7.Length; num3++)
  705. {
  706. if (Enum.IsDefined(typeof(Seikeiken), array7[num3]))
  707. {
  708. yotogi.condSeikeiken.Add((Seikeiken)Enum.Parse(typeof(Seikeiken), array7[num3], false));
  709. }
  710. }
  711. string cellAsString9 = csv.GetCellAsString(num++, i);
  712. yotogi.condFlag1 = new List<string>();
  713. string[] array8 = cellAsString9.Split(new char[]
  714. {
  715. '&'
  716. }, StringSplitOptions.RemoveEmptyEntries);
  717. for (int num4 = 0; num4 < array8.Length; num4++)
  718. {
  719. yotogi.condFlag1.Add(array8[num4]);
  720. }
  721. string cellAsString10 = csv.GetCellAsString(num++, i);
  722. yotogi.condFlag0 = new List<string>();
  723. string[] array9 = cellAsString10.Split(new char[]
  724. {
  725. '&'
  726. }, StringSplitOptions.RemoveEmptyEntries);
  727. for (int num5 = 0; num5 < array9.Length; num5++)
  728. {
  729. yotogi.condFlag0.Add(array9[num5]);
  730. }
  731. string cellAsString11 = csv.GetCellAsString(num++, i);
  732. string[] array10 = cellAsString11.Split(new char[]
  733. {
  734. '|'
  735. }, StringSplitOptions.RemoveEmptyEntries);
  736. yotogi.condRelation = new List<MaidStatus.Relation>();
  737. yotogi.condAdditionalRelation = new List<AdditionalRelation>();
  738. yotogi.condSpecialRelation = new List<SpecialRelation>();
  739. yotogi.condRelationOld = new List<MaidStatus.Old.Relation>();
  740. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  741. {
  742. for (int num6 = 0; num6 < array10.Length; num6++)
  743. {
  744. if (Enum.IsDefined(typeof(MaidStatus.Relation), array10[num6]))
  745. {
  746. yotogi.condRelation.Add((MaidStatus.Relation)Enum.Parse(typeof(MaidStatus.Relation), array10[num6], false));
  747. }
  748. else if (Enum.IsDefined(typeof(AdditionalRelation), array10[num6]))
  749. {
  750. yotogi.condAdditionalRelation.Add((AdditionalRelation)Enum.Parse(typeof(AdditionalRelation), array10[num6], false));
  751. }
  752. else if (Enum.IsDefined(typeof(SpecialRelation), array10[num6]))
  753. {
  754. yotogi.condSpecialRelation.Add((SpecialRelation)Enum.Parse(typeof(SpecialRelation), array10[num6], false));
  755. }
  756. }
  757. }
  758. else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2)
  759. {
  760. for (int num7 = 0; num7 < array10.Length; num7++)
  761. {
  762. if (Enum.IsDefined(typeof(MaidStatus.Old.Relation), array10[num7]))
  763. {
  764. yotogi.condRelationOld.Add((MaidStatus.Old.Relation)Enum.Parse(typeof(MaidStatus.Old.Relation), array10[num7], false));
  765. }
  766. }
  767. }
  768. if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2 && num < csv.max_cell_x)
  769. {
  770. string cellAsString12 = csv.GetCellAsString(num, i);
  771. if (cellAsString12 != null)
  772. {
  773. if (!(cellAsString12 == "表示"))
  774. {
  775. if (cellAsString12 == "非表示")
  776. {
  777. yotogi.disableIfRentalMaid = true;
  778. }
  779. }
  780. else
  781. {
  782. yotogi.visibleIfRentalMaid = true;
  783. }
  784. }
  785. }
  786. num++;
  787. yotogi.subMaidUnipueName = csv.GetCellAsString(num, i);
  788. num++;
  789. if (mode != ScheduleCSVData.ScheduleBase.Mode.CM3D2 || !(yotogi.subMaidUnipueName != string.Empty))
  790. {
  791. yotogi.condPackage = new List<string>();
  792. yotogi.condManVisibleFlag1 = new List<string>();
  793. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  794. {
  795. if (num < csv.max_cell_x)
  796. {
  797. string cellAsString13 = csv.GetCellAsString(num, i);
  798. string[] array11 = cellAsString13.Split(new char[]
  799. {
  800. '&'
  801. }, StringSplitOptions.RemoveEmptyEntries);
  802. for (int num8 = 0; num8 < array11.Length; num8++)
  803. {
  804. yotogi.condManVisibleFlag1.Add(array11[num8]);
  805. }
  806. }
  807. num++;
  808. }
  809. yotogi.condManFlag1 = new List<string>();
  810. if (num < csv.max_cell_x)
  811. {
  812. string cellAsString14 = csv.GetCellAsString(num, i);
  813. string[] array12 = cellAsString14.Split(new char[]
  814. {
  815. '&'
  816. }, StringSplitOptions.RemoveEmptyEntries);
  817. for (int num9 = 0; num9 < array12.Length; num9++)
  818. {
  819. yotogi.condManFlag1.Add(array12[num9]);
  820. }
  821. }
  822. num++;
  823. yotogi.condManFlag0 = new List<string>();
  824. if (num < csv.max_cell_x)
  825. {
  826. string cellAsString15 = csv.GetCellAsString(num, i);
  827. string[] array13 = cellAsString15.Split(new char[]
  828. {
  829. '&'
  830. }, StringSplitOptions.RemoveEmptyEntries);
  831. for (int num10 = 0; num10 < array13.Length; num10++)
  832. {
  833. yotogi.condManFlag0.Add(array13[num10]);
  834. }
  835. }
  836. num++;
  837. yotogi.condPersonal = new List<int>();
  838. if (num < csv.max_cell_x)
  839. {
  840. string cellAsString16 = csv.GetCellAsString(num, i);
  841. string[] array14 = cellAsString16.Split(new char[]
  842. {
  843. '|'
  844. }, StringSplitOptions.RemoveEmptyEntries);
  845. for (int num11 = 0; num11 < array14.Length; num11++)
  846. {
  847. int id4 = MaidStatus.Personal.GetData(array14[num11]).id;
  848. yotogi.condPersonal.Add(id4);
  849. }
  850. }
  851. num++;
  852. yotogi.condMainChara = csv.GetCellBool(num, i);
  853. num++;
  854. yotogi.condFacilityID = new List<List<int>>();
  855. if (num < csv.max_cell_x)
  856. {
  857. string cellAsString17 = csv.GetCellAsString(num, i);
  858. string[] array15 = cellAsString17.Split(new char[]
  859. {
  860. '&'
  861. }, StringSplitOptions.RemoveEmptyEntries);
  862. for (int num12 = 0; num12 < array15.Length; num12++)
  863. {
  864. string[] array16 = array15[num12].Split(new char[]
  865. {
  866. '|'
  867. }, StringSplitOptions.RemoveEmptyEntries);
  868. List<int> list = new List<int>();
  869. for (int num13 = 0; num13 < array16.Length; num13++)
  870. {
  871. int num14 = 0;
  872. if (int.TryParse(array16[num13], out num14) && num14 != 0)
  873. {
  874. list.Add(num14);
  875. }
  876. }
  877. yotogi.condFacilityID.Add(list);
  878. }
  879. }
  880. num++;
  881. yotogi.pairCondPersonal = new List<int>();
  882. if (csv.IsCellToExistData(num, 0) && csv.IsCellToExistData(num, i))
  883. {
  884. string cellAsString18 = csv.GetCellAsString(num, i);
  885. string[] array17 = cellAsString18.Split(new char[]
  886. {
  887. '|'
  888. }, StringSplitOptions.RemoveEmptyEntries);
  889. for (int num15 = 0; num15 < array17.Length; num15++)
  890. {
  891. int id5 = MaidStatus.Personal.GetData(array17[num15]).id;
  892. yotogi.pairCondPersonal.Add(id5);
  893. }
  894. }
  895. num++;
  896. yotogi.isCheckGP002Personal = false;
  897. if (csv.IsCellToExistData(num, 0) && csv.IsCellToExistData(num, i))
  898. {
  899. string cellAsString19 = csv.GetCellAsString(num, i);
  900. yotogi.isCheckGP002Personal = (cellAsString19 == "〇" || cellAsString19 == "○");
  901. }
  902. num++;
  903. yotogi.isCheckBodyType = false;
  904. if (csv.IsCellToExistData(num, 0) && csv.IsCellToExistData(num, i))
  905. {
  906. string cellAsString20 = csv.GetCellAsString(num, i);
  907. yotogi.isCheckBodyType = (cellAsString20 == "〇" || cellAsString20 == "○");
  908. }
  909. num++;
  910. yotogi.isNewBodyBlock = false;
  911. if (csv.IsCellToExistData(num, 0) && csv.IsCellToExistData(num, i))
  912. {
  913. string cellAsString21 = csv.GetCellAsString(num, i);
  914. yotogi.isNewBodyBlock = (cellAsString21 == "〇" || cellAsString21 == "○");
  915. }
  916. num++;
  917. if (csv.IsCellToExistData(num, 0) && csv.IsCellToExistData(num, i))
  918. {
  919. yotogi.mainHeroineBodyTypeMatchCheckList = new HashSet<string>();
  920. string cellAsString22 = csv.GetCellAsString(num, i);
  921. foreach (string text in cellAsString22.Split(new char[]
  922. {
  923. ','
  924. }))
  925. {
  926. if (!string.IsNullOrEmpty(text))
  927. {
  928. string text2 = text.Trim();
  929. if (text2 != null)
  930. {
  931. if (text2 == "無垢" || text2 == "真面目" || text2 == "凜デレ")
  932. {
  933. yotogi.mainHeroineBodyTypeMatchCheckList.Add(text.Trim());
  934. goto IL_C91;
  935. }
  936. }
  937. Debug.LogError(string.Concat(new object[]
  938. {
  939. "ID[",
  940. yotogi.id,
  941. "]",
  942. yotogi.name,
  943. "のメインキャラとのボディ一致チェック項目で不正な文字列が指定されています=>",
  944. text.Trim()
  945. }));
  946. }
  947. IL_C91:;
  948. }
  949. }
  950. num++;
  951. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  952. {
  953. if (yotogi.yotogiType == ScheduleCSVData.YotogiType.HaveSex)
  954. {
  955. yotogi.mode = ScheduleCSVData.ScheduleBase.Mode.Common;
  956. }
  957. if (yotogi.yotogiType == ScheduleCSVData.YotogiType.Entertain || yotogi.yotogiType == ScheduleCSVData.YotogiType.Rest)
  958. {
  959. yotogi.mode = ScheduleCSVData.ScheduleBase.Mode.CM3D2;
  960. }
  961. }
  962. else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2 && yotogi.yotogiType != ScheduleCSVData.YotogiType.Vip && yotogi.yotogiType != ScheduleCSVData.YotogiType.VipCall)
  963. {
  964. goto IL_D24;
  965. }
  966. if (yotogi.id > 0)
  967. {
  968. ScheduleCSVData.YotogiDataDic[yotogi.id] = yotogi;
  969. }
  970. }
  971. }
  972. IL_D24:;
  973. }
  974. }
  975. private static void CVSReader_EasyYotogiData(CsvParser csv, HashSet<int> enabled_list)
  976. {
  977. int max_cell_y = csv.max_cell_y;
  978. for (int i = 1; i < max_cell_y; i++)
  979. {
  980. int num = 0;
  981. ScheduleCSVData.Yotogi yotogi = new ScheduleCSVData.Yotogi();
  982. ScheduleCSVData.Yotogi.EasyYotogi easyYotogi = new ScheduleCSVData.Yotogi.EasyYotogi();
  983. yotogi.easyYotogi = easyYotogi;
  984. yotogi.isCommu = false;
  985. yotogi.mode = ScheduleCSVData.ScheduleBase.Mode.COM3D;
  986. yotogi.type = ScheduleTaskCtrl.TaskType.Yotogi;
  987. yotogi.id = csv.GetCellAsInteger(num++, i);
  988. if (enabled_list.Contains(yotogi.id))
  989. {
  990. yotogi.name = csv.GetCellAsString(num++, i);
  991. if (yotogi.name == string.Empty)
  992. {
  993. return;
  994. }
  995. num++;
  996. yotogi.icon = csv.GetCellAsString(num++, i);
  997. string cellAsString = csv.GetCellAsString(num++, i);
  998. if (!string.IsNullOrEmpty(cellAsString) && Enum.IsDefined(typeof(ScheduleCSVData.YotogiType), cellAsString))
  999. {
  1000. yotogi.yotogiType = (ScheduleCSVData.YotogiType)Enum.Parse(typeof(ScheduleCSVData.YotogiType), cellAsString, false);
  1001. }
  1002. yotogi.information = csv.GetCellAsString(num++, i);
  1003. yotogi.categoryID = csv.GetCellAsInteger(num++, i);
  1004. yotogi.easyYotogi.trophyId = csv.GetCellAsInteger(num++, i);
  1005. yotogi.easyYotogi.care = csv.GetCellAsInteger(num++, i);
  1006. yotogi.easyYotogi.reception = csv.GetCellAsInteger(num++, i);
  1007. yotogi.easyYotogi.teach_rate = csv.GetCellAsInteger(num++, i);
  1008. yotogi.easyYotogi.inyoku = csv.GetCellAsInteger(num++, i);
  1009. yotogi.easyYotogi.hentai = csv.GetCellAsInteger(num++, i);
  1010. yotogi.easyYotogi.housi = csv.GetCellAsInteger(num++, i);
  1011. yotogi.easyYotogi.msei = csv.GetCellAsInteger(num++, i);
  1012. yotogi.easyYotogi.study_rate = csv.GetCellAsInteger(num++, i);
  1013. yotogi.condInfo = new List<string>();
  1014. yotogi.condContract = new List<Contract>();
  1015. yotogi.condSkill = new Dictionary<int, int>();
  1016. yotogi.condPersonal = new List<int>();
  1017. yotogi.pairCondPersonal = new List<int>();
  1018. yotogi.condSeikeiken = new List<Seikeiken>();
  1019. yotogi.condYotogiClass = new List<int>();
  1020. yotogi.condRelation = new List<MaidStatus.Relation>();
  1021. yotogi.condAdditionalRelation = new List<AdditionalRelation>();
  1022. yotogi.condSpecialRelation = new List<SpecialRelation>();
  1023. yotogi.condPropensity = new List<int>();
  1024. yotogi.condFlag0 = new List<string>();
  1025. yotogi.condFlag1 = new List<string>();
  1026. yotogi.condManVisibleFlag1 = new List<string>();
  1027. yotogi.condManFlag1 = new List<string>();
  1028. yotogi.condManFlag0 = new List<string>();
  1029. yotogi.condMaidClass = new List<int>();
  1030. yotogi.condFacilityID = new List<List<int>>();
  1031. yotogi.condRelationOld = new List<MaidStatus.Old.Relation>();
  1032. yotogi.condPackage = new List<string>();
  1033. if (yotogi.id > 0)
  1034. {
  1035. ScheduleCSVData.YotogiDataDic[yotogi.id] = yotogi;
  1036. }
  1037. }
  1038. }
  1039. }
  1040. private static void CVSReader_TaskCategoryList(CsvParser csv)
  1041. {
  1042. if (ScheduleCSVData.TaskCategoryNameMap == null)
  1043. {
  1044. ScheduleCSVData.TaskCategoryNameMap = new SortedDictionary<int, string>();
  1045. }
  1046. int max_cell_y = csv.max_cell_y;
  1047. for (int i = 1; i < max_cell_y; i++)
  1048. {
  1049. int num = 0;
  1050. int cellAsInteger = csv.GetCellAsInteger(num++, i);
  1051. string cellAsString = csv.GetCellAsString(num++, i);
  1052. if (!(cellAsString == string.Empty))
  1053. {
  1054. if (!ScheduleCSVData.TaskCategoryNameMap.ContainsKey(cellAsInteger))
  1055. {
  1056. ScheduleCSVData.TaskCategoryNameMap.Add(cellAsInteger, cellAsString);
  1057. }
  1058. }
  1059. }
  1060. }
  1061. private static void CVSReader_TaskInitData_Noon_CM3D2(CsvParser csv)
  1062. {
  1063. ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NoonWorkInitDataLegacy);
  1064. }
  1065. private static void CVSReader_TaskInitData_Noon_COM3D(CsvParser csv)
  1066. {
  1067. ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NoonWorkInitData);
  1068. }
  1069. private static void CVSReader_TaskInitData_Night_CM3D2(CsvParser csv)
  1070. {
  1071. ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NightWorkInitDataLegacy);
  1072. }
  1073. private static void CVSReader_TaskInitData_Night_COM3D(CsvParser csv)
  1074. {
  1075. ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NightWorkInitData);
  1076. }
  1077. private static void CVSReader_TaskInitData(CsvParser csv, Dictionary<int, Dictionary<int, int>> dataDic)
  1078. {
  1079. int max_cell_y = csv.max_cell_y;
  1080. for (int i = 1; i < max_cell_y; i++)
  1081. {
  1082. int num = csv.GetCellAsInteger(0, i);
  1083. if (Product.isPublic && num == 10000)
  1084. {
  1085. num = 10003;
  1086. }
  1087. int num2 = 2;
  1088. while (csv.IsCellToExistData(num2, 0))
  1089. {
  1090. string cellAsString = csv.GetCellAsString(num2, 0);
  1091. MaidStatus.Personal.Data data = MaidStatus.Personal.GetData(cellAsString);
  1092. int cellAsInteger = csv.GetCellAsInteger(num2, i);
  1093. if (cellAsInteger > 0)
  1094. {
  1095. dataDic[data.id][num] = cellAsInteger;
  1096. }
  1097. num2++;
  1098. }
  1099. }
  1100. }
  1101. private static void CVSReader_EntertainNumberData(CsvParser csv)
  1102. {
  1103. int max_cell_y = csv.max_cell_y;
  1104. for (int i = 1; i < max_cell_y; i++)
  1105. {
  1106. int cellAsInteger = csv.GetCellAsInteger(0, i);
  1107. ScheduleCSVData.EntertainNumberData[cellAsInteger] = csv.GetCellAsInteger(1, i);
  1108. }
  1109. }
  1110. private static void CVSReader_EntertainGuestData(CsvParser csv)
  1111. {
  1112. int max_cell_y = csv.max_cell_y;
  1113. for (int i = 1; i < max_cell_y; i++)
  1114. {
  1115. int num = 0;
  1116. ScheduleCSVData.EntertainGuest entertainGuest = new ScheduleCSVData.EntertainGuest();
  1117. int num2 = entertainGuest.condSalonGrade = csv.GetCellAsInteger(num++, i);
  1118. entertainGuest.baseIcome = csv.GetCellAsInteger(num++, i);
  1119. entertainGuest.baseEvaluation = csv.GetCellAsInteger(num++, i);
  1120. entertainGuest.sexual = (csv.GetCellAsString(num++, i) == "○");
  1121. ScheduleCSVData.EntertainGuestData[num2].Add(entertainGuest);
  1122. }
  1123. }
  1124. private static void CVSReader_Define(CsvParser csv)
  1125. {
  1126. int max_cell_y = csv.max_cell_y;
  1127. for (int i = 0; i < max_cell_y; i++)
  1128. {
  1129. string cellAsString = csv.GetCellAsString(0, i);
  1130. switch (cellAsString)
  1131. {
  1132. case "dayAddSalonClean":
  1133. ScheduleCSVData.dayAddSalonClean = csv.GetCellAsInteger(1, i);
  1134. break;
  1135. case "dayAddSalonBeautiful":
  1136. ScheduleCSVData.dayAddSalonBeautiful = csv.GetCellAsInteger(1, i);
  1137. break;
  1138. case "haveSexAddSalonClean":
  1139. ScheduleCSVData.haveSexAddSalonClean = csv.GetCellAsInteger(1, i);
  1140. break;
  1141. case "haveSexAddSalonBeautiful":
  1142. ScheduleCSVData.haveSexAddSalonBeautiful = csv.GetCellAsInteger(1, i);
  1143. break;
  1144. case "entertainAddSalonClean":
  1145. ScheduleCSVData.entertainAddSalonClean = csv.GetCellAsInteger(1, i);
  1146. break;
  1147. case "entertainAddSalonBeautiful":
  1148. ScheduleCSVData.entertainAddSalonBeautiful = csv.GetCellAsInteger(1, i);
  1149. break;
  1150. case "entertainParameterRevisionThreshold":
  1151. ScheduleCSVData.entertainParameterRevisionThreshold = csv.GetCellAsInteger(1, i);
  1152. break;
  1153. case "entertainPropensityRevisionMin":
  1154. ScheduleCSVData.entertainPropensityRevisionMin = csv.GetCellAsInteger(1, i);
  1155. break;
  1156. case "entertainPropensityRevisionMax":
  1157. ScheduleCSVData.entertainPropensityRevisionMax = csv.GetCellAsInteger(1, i);
  1158. break;
  1159. case "workSuccessLvPerfectIncidence":
  1160. ScheduleCSVData.workSuccessLvPerfectIncidence = csv.GetCellAsInteger(1, i);
  1161. break;
  1162. case "workSuccessLvMissIncidence":
  1163. ScheduleCSVData.workSuccessLvMissIncidence = csv.GetCellAsInteger(1, i);
  1164. break;
  1165. case "dispatchIncomCoefficient":
  1166. ScheduleCSVData.dispatchIncomCoefficient = csv.GetCellAsInteger(1, i);
  1167. break;
  1168. case "vipFullOpenDay":
  1169. ScheduleCSVData.vipFullOpenDay = csv.GetCellAsInteger(1, i);
  1170. break;
  1171. case "noonWorkLv2Exp":
  1172. ScheduleCSVData.noonWorkLv2Exp = csv.GetCellAsInteger(1, i);
  1173. break;
  1174. case "noonWorkLv3Exp":
  1175. ScheduleCSVData.noonWorkLv3Exp = csv.GetCellAsInteger(1, i);
  1176. break;
  1177. case "subMaidInitTaskId":
  1178. ScheduleCSVData.subMaidInitTaskId = csv.GetCellAsInteger(1, i);
  1179. break;
  1180. case "faclilityPowerUpWorkId":
  1181. ScheduleCSVData.faclilityPowerUpWorkId = csv.GetCellAsInteger(1, i);
  1182. break;
  1183. }
  1184. }
  1185. }
  1186. [Obsolete("FacilityDataTable.csへ移動しました。", false)]
  1187. private static Dictionary<int, ScheduleCSVData.Work> WorkDataDic;
  1188. private static Dictionary<int, ScheduleCSVData.Training> TrainingDataDic;
  1189. private static Dictionary<int, ScheduleCSVData.Yotogi> YotogiDataDic;
  1190. private static ScheduleCSVData.Work FaclityPowerUp;
  1191. private static Dictionary<int, ScheduleCSVData.Work> cacheWorkData;
  1192. private static Dictionary<int, ScheduleCSVData.ScheduleBase> cacheAllDataData;
  1193. public static SortedDictionary<int, string> TaskCategoryNameMap;
  1194. public static List<int> WorkLegacyDisableId;
  1195. public static List<int> NetorareFlag;
  1196. public static Dictionary<int, Dictionary<int, int>> NoonWorkInitData;
  1197. public static Dictionary<int, Dictionary<int, int>> NoonWorkInitDataLegacy;
  1198. public static Dictionary<int, Dictionary<int, int>> NightWorkInitData;
  1199. public static Dictionary<int, Dictionary<int, int>> NightWorkInitDataLegacy;
  1200. public static int[] EntertainNumberData;
  1201. public static List<ScheduleCSVData.EntertainGuest>[] EntertainGuestData;
  1202. public static int dayAddSalonClean;
  1203. public static int dayAddSalonBeautiful;
  1204. public static int haveSexAddSalonClean;
  1205. public static int haveSexAddSalonBeautiful;
  1206. public static int entertainAddSalonClean;
  1207. public static int entertainAddSalonBeautiful;
  1208. public static int entertainParameterRevisionThreshold;
  1209. public static int entertainPropensityRevisionMin;
  1210. public static int entertainPropensityRevisionMax;
  1211. public static int workSuccessLvPerfectIncidence = 10;
  1212. public static int workSuccessLvMissIncidence = 10;
  1213. public static int dispatchIncomCoefficient = 500;
  1214. public static int vipFullOpenDay = 100;
  1215. public static int noonWorkLv2Exp = 10;
  1216. public static int noonWorkLv3Exp = 30;
  1217. public static int subMaidInitTaskId;
  1218. public static int faclilityPowerUpWorkId = 3000;
  1219. public static int trainingFaclilityID = 100;
  1220. public const int scheduleTrainingCategoryID = 51;
  1221. public const int scheduleWorkCategoryID = 52;
  1222. public const int scheduleYotogiCategoryID = 100;
  1223. [CompilerGenerated]
  1224. private static Action<CsvParser> <>f__mg$cache0;
  1225. [CompilerGenerated]
  1226. private static Action<CsvParser, HashSet<int>> <>f__mg$cache1;
  1227. [CompilerGenerated]
  1228. private static Action<CsvParser, HashSet<int>> <>f__mg$cache2;
  1229. [CompilerGenerated]
  1230. private static Action<CsvParser, HashSet<int>> <>f__mg$cache3;
  1231. [CompilerGenerated]
  1232. private static Action<CsvParser> <>f__mg$cache4;
  1233. [CompilerGenerated]
  1234. private static Action<CsvParser> <>f__mg$cache5;
  1235. [CompilerGenerated]
  1236. private static Action<CsvParser> <>f__mg$cache6;
  1237. [CompilerGenerated]
  1238. private static Action<CsvParser> <>f__mg$cache7;
  1239. [CompilerGenerated]
  1240. private static Action<CsvParser> <>f__mg$cache8;
  1241. [CompilerGenerated]
  1242. private static Action<CsvParser> <>f__mg$cache9;
  1243. [CompilerGenerated]
  1244. private static Action<CsvParser> <>f__mg$cacheA;
  1245. [CompilerGenerated]
  1246. private static Action<CsvParser> <>f__mg$cacheB;
  1247. [CompilerGenerated]
  1248. private static Action<CsvParser> <>f__mg$cacheC;
  1249. [CompilerGenerated]
  1250. private static Action<CsvParser> <>f__mg$cacheD;
  1251. [CompilerGenerated]
  1252. private static Action<CsvParser, HashSet<int>> <>f__mg$cacheE;
  1253. [CompilerGenerated]
  1254. private static Action<CsvParser, HashSet<int>> <>f__mg$cacheF;
  1255. public enum TrainingType
  1256. {
  1257. Basic,
  1258. Dispatch,
  1259. Trainer,
  1260. Trainee,
  1261. Holiday,
  1262. Travel
  1263. }
  1264. public enum YotogiType
  1265. {
  1266. Basic,
  1267. Rest,
  1268. Entertain,
  1269. HaveSex,
  1270. Vip,
  1271. VipCall,
  1272. Travel,
  1273. EasyYotogi,
  1274. NewSex
  1275. }
  1276. public enum WorkType
  1277. {
  1278. Basic,
  1279. PowerUp
  1280. }
  1281. public class ScheduleBase
  1282. {
  1283. public bool IsCommon
  1284. {
  1285. get
  1286. {
  1287. return this.mode == ScheduleCSVData.ScheduleBase.Mode.Common;
  1288. }
  1289. }
  1290. public bool IsLegacy
  1291. {
  1292. get
  1293. {
  1294. return this.mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2;
  1295. }
  1296. }
  1297. public bool CheckMainHeroineBodyTypeMatch(Maid maid)
  1298. {
  1299. return ScheduleCSVData.ScheduleBase.CheckMainHeroineBodyTypeMatch(this.mainHeroineBodyTypeMatchCheckList, maid);
  1300. }
  1301. public static bool CheckMainHeroineBodyTypeMatch(HashSet<string> mainHeroineBodyTypeMatchCheckList, Maid maid)
  1302. {
  1303. if (maid == null || mainHeroineBodyTypeMatchCheckList == null || mainHeroineBodyTypeMatchCheckList.Count <= 0)
  1304. {
  1305. return true;
  1306. }
  1307. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1308. Dictionary<string, Maid> dictionary = new Dictionary<string, Maid>();
  1309. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  1310. {
  1311. Maid stockMaid = characterMgr.GetStockMaid(i);
  1312. if (stockMaid != null && stockMaid.status.mainChara)
  1313. {
  1314. string text = string.Empty;
  1315. int num = stockMaid.status.personal.id;
  1316. if (num != 80)
  1317. {
  1318. if (num != 90)
  1319. {
  1320. if (num == 100)
  1321. {
  1322. text = "凜デレ";
  1323. }
  1324. }
  1325. else
  1326. {
  1327. text = "真面目";
  1328. }
  1329. }
  1330. else
  1331. {
  1332. text = "無垢";
  1333. }
  1334. if (!string.IsNullOrEmpty(text) && !dictionary.ContainsKey(text))
  1335. {
  1336. dictionary.Add(text, stockMaid);
  1337. }
  1338. }
  1339. }
  1340. foreach (string key in mainHeroineBodyTypeMatchCheckList)
  1341. {
  1342. Maid maid2;
  1343. if (!dictionary.TryGetValue(key, out maid2) || maid2.IsCrcBody != maid.IsCrcBody)
  1344. {
  1345. return false;
  1346. }
  1347. }
  1348. return true;
  1349. }
  1350. public ScheduleCSVData.ScheduleBase.Mode mode = ScheduleCSVData.ScheduleBase.Mode.COM3D;
  1351. public ScheduleTaskCtrl.TaskType type;
  1352. public bool isCommu = true;
  1353. public string name;
  1354. public string icon;
  1355. public int id;
  1356. public string information;
  1357. public int categoryID;
  1358. public List<string> condInfo;
  1359. public bool visibleIfRentalMaid;
  1360. public bool disableIfRentalMaid;
  1361. public bool isNewBodyBlock;
  1362. public HashSet<string> mainHeroineBodyTypeMatchCheckList;
  1363. public enum Mode
  1364. {
  1365. CM3D2,
  1366. COM3D,
  1367. Common
  1368. }
  1369. }
  1370. public class Training : ScheduleCSVData.ScheduleBase
  1371. {
  1372. public FacilityDataTable.FacilityDefaultData facility
  1373. {
  1374. get
  1375. {
  1376. if (this.facilityDefaultData == null)
  1377. {
  1378. this.facilityDefaultData = FacilityDataTable.GetFacilityDefaultData(this.facilityId, true);
  1379. }
  1380. return this.facilityDefaultData;
  1381. }
  1382. set
  1383. {
  1384. this.facilityDefaultData = value;
  1385. }
  1386. }
  1387. private FacilityDataTable.FacilityDefaultData facilityDefaultData;
  1388. public ScheduleCSVData.TrainingType trainingType;
  1389. public int facilityId = 100;
  1390. public int study_rate;
  1391. public int reception;
  1392. public int care;
  1393. public int lovely;
  1394. public int elegance;
  1395. public int charm;
  1396. public int teach_rate;
  1397. public int cooking;
  1398. public int vocal;
  1399. public int dance;
  1400. public int appealPoint;
  1401. public int exp;
  1402. public int income;
  1403. public int cmdExp;
  1404. public List<Contract> condContract;
  1405. public List<int> condMaidClass;
  1406. public string needMaidStatus;
  1407. public List<int> needEventItemIdList;
  1408. public List<string> condPackage;
  1409. }
  1410. public class Work : ScheduleCSVData.Training
  1411. {
  1412. public ScheduleCSVData.WorkType workTyp;
  1413. }
  1414. public class Yotogi : ScheduleCSVData.ScheduleBase
  1415. {
  1416. public ScheduleCSVData.YotogiType yotogiType;
  1417. public int income;
  1418. public int evaluation;
  1419. public int add_play_number;
  1420. public int add_other_play_number;
  1421. public int condSalonGrade;
  1422. public Dictionary<int, int> condSkill;
  1423. public List<Contract> condContract;
  1424. public List<int> condMaidClass;
  1425. public List<int> condYotogiClass;
  1426. public List<int> condPropensity;
  1427. public List<Seikeiken> condSeikeiken;
  1428. public List<string> condFlag1;
  1429. public List<string> condFlag0;
  1430. public List<MaidStatus.Relation> condRelation;
  1431. public List<AdditionalRelation> condAdditionalRelation;
  1432. public List<SpecialRelation> condSpecialRelation;
  1433. public string subMaidUnipueName = string.Empty;
  1434. public List<string> condPackage;
  1435. public List<string> condManVisibleFlag1;
  1436. public List<string> condManFlag1;
  1437. public List<string> condManFlag0;
  1438. public List<int> condPersonal;
  1439. public bool condMainChara;
  1440. public List<List<int>> condFacilityID;
  1441. public List<int> pairCondPersonal;
  1442. public bool isCheckGP002Personal;
  1443. public bool isCheckBodyType;
  1444. public bool netorareFlag;
  1445. public ScheduleCSVData.Yotogi.EasyYotogi easyYotogi;
  1446. public List<MaidStatus.Old.Relation> condRelationOld;
  1447. public class EasyYotogi
  1448. {
  1449. public int trophyId;
  1450. public int care;
  1451. public int reception;
  1452. public int teach_rate;
  1453. public int inyoku;
  1454. public int hentai;
  1455. public int housi;
  1456. public int msei;
  1457. public int study_rate;
  1458. }
  1459. }
  1460. public class EntertainGuest
  1461. {
  1462. public int condSalonGrade;
  1463. public int baseIcome;
  1464. public int baseEvaluation;
  1465. public bool sexual;
  1466. }
  1467. }
  1468. }