ScheduleCSVData.cs 46 KB

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