ScheduleCSVData.cs 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519
  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.condAdditionalRelation = new List<AdditionalRelation>();
  732. yotogi.condSpecialRelation = new List<SpecialRelation>();
  733. yotogi.condRelationOld = new List<MaidStatus.Old.Relation>();
  734. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  735. {
  736. for (int num6 = 0; num6 < array10.Length; num6++)
  737. {
  738. if (Enum.IsDefined(typeof(MaidStatus.Relation), array10[num6]))
  739. {
  740. yotogi.condRelation.Add((MaidStatus.Relation)Enum.Parse(typeof(MaidStatus.Relation), array10[num6], false));
  741. }
  742. else if (Enum.IsDefined(typeof(AdditionalRelation), array10[num6]))
  743. {
  744. yotogi.condAdditionalRelation.Add((AdditionalRelation)Enum.Parse(typeof(AdditionalRelation), array10[num6], false));
  745. }
  746. else if (Enum.IsDefined(typeof(SpecialRelation), array10[num6]))
  747. {
  748. yotogi.condSpecialRelation.Add((SpecialRelation)Enum.Parse(typeof(SpecialRelation), array10[num6], false));
  749. }
  750. }
  751. }
  752. else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2)
  753. {
  754. for (int num7 = 0; num7 < array10.Length; num7++)
  755. {
  756. if (Enum.IsDefined(typeof(MaidStatus.Old.Relation), array10[num7]))
  757. {
  758. yotogi.condRelationOld.Add((MaidStatus.Old.Relation)Enum.Parse(typeof(MaidStatus.Old.Relation), array10[num7], false));
  759. }
  760. }
  761. }
  762. if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2 && num < csv.max_cell_x)
  763. {
  764. string cellAsString12 = csv.GetCellAsString(num, i);
  765. if (cellAsString12 != null)
  766. {
  767. if (!(cellAsString12 == "表示"))
  768. {
  769. if (cellAsString12 == "非表示")
  770. {
  771. yotogi.disableIfRentalMaid = true;
  772. }
  773. }
  774. else
  775. {
  776. yotogi.visibleIfRentalMaid = true;
  777. }
  778. }
  779. }
  780. num++;
  781. yotogi.subMaidUnipueName = csv.GetCellAsString(num, i);
  782. num++;
  783. if (mode != ScheduleCSVData.ScheduleBase.Mode.CM3D2 || !(yotogi.subMaidUnipueName != string.Empty))
  784. {
  785. yotogi.condPackage = new List<string>();
  786. yotogi.condManVisibleFlag1 = new List<string>();
  787. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  788. {
  789. if (num < csv.max_cell_x)
  790. {
  791. string cellAsString13 = csv.GetCellAsString(num, i);
  792. string[] array11 = cellAsString13.Split(new char[]
  793. {
  794. '&'
  795. }, StringSplitOptions.RemoveEmptyEntries);
  796. for (int num8 = 0; num8 < array11.Length; num8++)
  797. {
  798. yotogi.condManVisibleFlag1.Add(array11[num8]);
  799. }
  800. }
  801. num++;
  802. }
  803. yotogi.condManFlag1 = new List<string>();
  804. if (num < csv.max_cell_x)
  805. {
  806. string cellAsString14 = csv.GetCellAsString(num, i);
  807. string[] array12 = cellAsString14.Split(new char[]
  808. {
  809. '&'
  810. }, StringSplitOptions.RemoveEmptyEntries);
  811. for (int num9 = 0; num9 < array12.Length; num9++)
  812. {
  813. yotogi.condManFlag1.Add(array12[num9]);
  814. }
  815. }
  816. num++;
  817. yotogi.condManFlag0 = new List<string>();
  818. if (num < csv.max_cell_x)
  819. {
  820. string cellAsString15 = csv.GetCellAsString(num, i);
  821. string[] array13 = cellAsString15.Split(new char[]
  822. {
  823. '&'
  824. }, StringSplitOptions.RemoveEmptyEntries);
  825. for (int num10 = 0; num10 < array13.Length; num10++)
  826. {
  827. yotogi.condManFlag0.Add(array13[num10]);
  828. }
  829. }
  830. num++;
  831. yotogi.condPersonal = new List<int>();
  832. if (num < csv.max_cell_x)
  833. {
  834. string cellAsString16 = csv.GetCellAsString(num, i);
  835. string[] array14 = cellAsString16.Split(new char[]
  836. {
  837. '|'
  838. }, StringSplitOptions.RemoveEmptyEntries);
  839. for (int num11 = 0; num11 < array14.Length; num11++)
  840. {
  841. int id4 = MaidStatus.Personal.GetData(array14[num11]).id;
  842. yotogi.condPersonal.Add(id4);
  843. }
  844. }
  845. num++;
  846. yotogi.condMainChara = csv.GetCellBool(num, i);
  847. num++;
  848. yotogi.condFacilityID = new List<List<int>>();
  849. if (num < csv.max_cell_x)
  850. {
  851. string cellAsString17 = csv.GetCellAsString(num, i);
  852. string[] array15 = cellAsString17.Split(new char[]
  853. {
  854. '&'
  855. }, StringSplitOptions.RemoveEmptyEntries);
  856. for (int num12 = 0; num12 < array15.Length; num12++)
  857. {
  858. string[] array16 = array15[num12].Split(new char[]
  859. {
  860. '|'
  861. }, StringSplitOptions.RemoveEmptyEntries);
  862. List<int> list = new List<int>();
  863. for (int num13 = 0; num13 < array16.Length; num13++)
  864. {
  865. int num14 = 0;
  866. if (int.TryParse(array16[num13], out num14) && num14 != 0)
  867. {
  868. list.Add(num14);
  869. }
  870. }
  871. yotogi.condFacilityID.Add(list);
  872. }
  873. }
  874. num++;
  875. yotogi.pairCondPersonal = new List<int>();
  876. if (csv.IsCellToExistData(num, 0) && csv.IsCellToExistData(num, i))
  877. {
  878. string cellAsString18 = csv.GetCellAsString(num, i);
  879. string[] array17 = cellAsString18.Split(new char[]
  880. {
  881. '|'
  882. }, StringSplitOptions.RemoveEmptyEntries);
  883. for (int num15 = 0; num15 < array17.Length; num15++)
  884. {
  885. int id5 = MaidStatus.Personal.GetData(array17[num15]).id;
  886. yotogi.pairCondPersonal.Add(id5);
  887. }
  888. }
  889. num++;
  890. yotogi.isCheckGP002Personal = false;
  891. if (csv.IsCellToExistData(num, 0) && csv.IsCellToExistData(num, i))
  892. {
  893. string cellAsString19 = csv.GetCellAsString(num, i);
  894. yotogi.isCheckGP002Personal = (cellAsString19 == "〇" || cellAsString19 == "○");
  895. }
  896. num++;
  897. if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
  898. {
  899. if (yotogi.yotogiType == ScheduleCSVData.YotogiType.HaveSex)
  900. {
  901. yotogi.mode = ScheduleCSVData.ScheduleBase.Mode.Common;
  902. }
  903. if (yotogi.yotogiType == ScheduleCSVData.YotogiType.Entertain || yotogi.yotogiType == ScheduleCSVData.YotogiType.Rest)
  904. {
  905. yotogi.mode = ScheduleCSVData.ScheduleBase.Mode.CM3D2;
  906. }
  907. }
  908. else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2 && yotogi.yotogiType != ScheduleCSVData.YotogiType.Vip && yotogi.yotogiType != ScheduleCSVData.YotogiType.VipCall)
  909. {
  910. goto IL_B54;
  911. }
  912. if (yotogi.id > 0)
  913. {
  914. ScheduleCSVData.YotogiDataDic[yotogi.id] = yotogi;
  915. }
  916. }
  917. }
  918. IL_B54:;
  919. }
  920. }
  921. private static void CVSReader_EasyYotogiData(CsvParser csv, HashSet<int> enabled_list)
  922. {
  923. int max_cell_y = csv.max_cell_y;
  924. for (int i = 1; i < max_cell_y; i++)
  925. {
  926. int num = 0;
  927. ScheduleCSVData.Yotogi yotogi = new ScheduleCSVData.Yotogi();
  928. ScheduleCSVData.Yotogi.EasyYotogi easyYotogi = new ScheduleCSVData.Yotogi.EasyYotogi();
  929. yotogi.easyYotogi = easyYotogi;
  930. yotogi.isCommu = false;
  931. yotogi.mode = ScheduleCSVData.ScheduleBase.Mode.COM3D;
  932. yotogi.type = ScheduleTaskCtrl.TaskType.Yotogi;
  933. yotogi.id = csv.GetCellAsInteger(num++, i);
  934. if (enabled_list.Contains(yotogi.id))
  935. {
  936. yotogi.name = csv.GetCellAsString(num++, i);
  937. if (yotogi.name == string.Empty)
  938. {
  939. return;
  940. }
  941. num++;
  942. yotogi.icon = csv.GetCellAsString(num++, i);
  943. string cellAsString = csv.GetCellAsString(num++, i);
  944. if (!string.IsNullOrEmpty(cellAsString) && Enum.IsDefined(typeof(ScheduleCSVData.YotogiType), cellAsString))
  945. {
  946. yotogi.yotogiType = (ScheduleCSVData.YotogiType)Enum.Parse(typeof(ScheduleCSVData.YotogiType), cellAsString, false);
  947. }
  948. yotogi.information = csv.GetCellAsString(num++, i);
  949. yotogi.categoryID = csv.GetCellAsInteger(num++, i);
  950. yotogi.easyYotogi.trophyId = csv.GetCellAsInteger(num++, i);
  951. yotogi.easyYotogi.care = csv.GetCellAsInteger(num++, i);
  952. yotogi.easyYotogi.reception = csv.GetCellAsInteger(num++, i);
  953. yotogi.easyYotogi.teach_rate = csv.GetCellAsInteger(num++, i);
  954. yotogi.easyYotogi.inyoku = csv.GetCellAsInteger(num++, i);
  955. yotogi.easyYotogi.hentai = csv.GetCellAsInteger(num++, i);
  956. yotogi.easyYotogi.housi = csv.GetCellAsInteger(num++, i);
  957. yotogi.easyYotogi.msei = csv.GetCellAsInteger(num++, i);
  958. yotogi.easyYotogi.study_rate = csv.GetCellAsInteger(num++, i);
  959. yotogi.condInfo = new List<string>();
  960. yotogi.condContract = new List<Contract>();
  961. yotogi.condSkill = new Dictionary<int, int>();
  962. yotogi.condPersonal = new List<int>();
  963. yotogi.pairCondPersonal = new List<int>();
  964. yotogi.condSeikeiken = new List<Seikeiken>();
  965. yotogi.condYotogiClass = new List<int>();
  966. yotogi.condRelation = new List<MaidStatus.Relation>();
  967. yotogi.condAdditionalRelation = new List<AdditionalRelation>();
  968. yotogi.condSpecialRelation = new List<SpecialRelation>();
  969. yotogi.condPropensity = new List<int>();
  970. yotogi.condFlag0 = new List<string>();
  971. yotogi.condFlag1 = new List<string>();
  972. yotogi.condManVisibleFlag1 = new List<string>();
  973. yotogi.condManFlag1 = new List<string>();
  974. yotogi.condManFlag0 = new List<string>();
  975. yotogi.condMaidClass = new List<int>();
  976. yotogi.condFacilityID = new List<List<int>>();
  977. yotogi.condRelationOld = new List<MaidStatus.Old.Relation>();
  978. yotogi.condPackage = new List<string>();
  979. if (yotogi.id > 0)
  980. {
  981. ScheduleCSVData.YotogiDataDic[yotogi.id] = yotogi;
  982. }
  983. }
  984. }
  985. }
  986. private static void CVSReader_TaskCategoryList(CsvParser csv)
  987. {
  988. if (ScheduleCSVData.TaskCategoryNameMap == null)
  989. {
  990. ScheduleCSVData.TaskCategoryNameMap = new SortedDictionary<int, string>();
  991. }
  992. int max_cell_y = csv.max_cell_y;
  993. for (int i = 1; i < max_cell_y; i++)
  994. {
  995. int num = 0;
  996. int cellAsInteger = csv.GetCellAsInteger(num++, i);
  997. string cellAsString = csv.GetCellAsString(num++, i);
  998. if (!(cellAsString == string.Empty))
  999. {
  1000. if (!ScheduleCSVData.TaskCategoryNameMap.ContainsKey(cellAsInteger))
  1001. {
  1002. ScheduleCSVData.TaskCategoryNameMap.Add(cellAsInteger, cellAsString);
  1003. }
  1004. }
  1005. }
  1006. }
  1007. private static void CVSReader_TaskInitData_Noon_CM3D2(CsvParser csv)
  1008. {
  1009. ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NoonWorkInitDataLegacy);
  1010. }
  1011. private static void CVSReader_TaskInitData_Noon_COM3D(CsvParser csv)
  1012. {
  1013. ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NoonWorkInitData);
  1014. }
  1015. private static void CVSReader_TaskInitData_Night_CM3D2(CsvParser csv)
  1016. {
  1017. ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NightWorkInitDataLegacy);
  1018. }
  1019. private static void CVSReader_TaskInitData_Night_COM3D(CsvParser csv)
  1020. {
  1021. ScheduleCSVData.CVSReader_TaskInitData(csv, ScheduleCSVData.NightWorkInitData);
  1022. }
  1023. private static void CVSReader_TaskInitData(CsvParser csv, Dictionary<int, Dictionary<int, int>> dataDic)
  1024. {
  1025. int max_cell_y = csv.max_cell_y;
  1026. for (int i = 1; i < max_cell_y; i++)
  1027. {
  1028. int num = csv.GetCellAsInteger(0, i);
  1029. if (Product.isPublic && num == 10000)
  1030. {
  1031. num = 10003;
  1032. }
  1033. int num2 = 2;
  1034. while (csv.IsCellToExistData(num2, 0))
  1035. {
  1036. string cellAsString = csv.GetCellAsString(num2, 0);
  1037. MaidStatus.Personal.Data data = MaidStatus.Personal.GetData(cellAsString);
  1038. int cellAsInteger = csv.GetCellAsInteger(num2, i);
  1039. if (cellAsInteger > 0)
  1040. {
  1041. dataDic[data.id][num] = cellAsInteger;
  1042. }
  1043. num2++;
  1044. }
  1045. }
  1046. }
  1047. private static void CVSReader_EntertainNumberData(CsvParser csv)
  1048. {
  1049. int max_cell_y = csv.max_cell_y;
  1050. for (int i = 1; i < max_cell_y; i++)
  1051. {
  1052. int cellAsInteger = csv.GetCellAsInteger(0, i);
  1053. ScheduleCSVData.EntertainNumberData[cellAsInteger] = csv.GetCellAsInteger(1, i);
  1054. }
  1055. }
  1056. private static void CVSReader_EntertainGuestData(CsvParser csv)
  1057. {
  1058. int max_cell_y = csv.max_cell_y;
  1059. for (int i = 1; i < max_cell_y; i++)
  1060. {
  1061. int num = 0;
  1062. ScheduleCSVData.EntertainGuest entertainGuest = new ScheduleCSVData.EntertainGuest();
  1063. int num2 = entertainGuest.condSalonGrade = csv.GetCellAsInteger(num++, i);
  1064. entertainGuest.baseIcome = csv.GetCellAsInteger(num++, i);
  1065. entertainGuest.baseEvaluation = csv.GetCellAsInteger(num++, i);
  1066. entertainGuest.sexual = (csv.GetCellAsString(num++, i) == "○");
  1067. ScheduleCSVData.EntertainGuestData[num2].Add(entertainGuest);
  1068. }
  1069. }
  1070. private static void CVSReader_Define(CsvParser csv)
  1071. {
  1072. int max_cell_y = csv.max_cell_y;
  1073. for (int i = 0; i < max_cell_y; i++)
  1074. {
  1075. string cellAsString = csv.GetCellAsString(0, i);
  1076. switch (cellAsString)
  1077. {
  1078. case "dayAddSalonClean":
  1079. ScheduleCSVData.dayAddSalonClean = csv.GetCellAsInteger(1, i);
  1080. break;
  1081. case "dayAddSalonBeautiful":
  1082. ScheduleCSVData.dayAddSalonBeautiful = csv.GetCellAsInteger(1, i);
  1083. break;
  1084. case "haveSexAddSalonClean":
  1085. ScheduleCSVData.haveSexAddSalonClean = csv.GetCellAsInteger(1, i);
  1086. break;
  1087. case "haveSexAddSalonBeautiful":
  1088. ScheduleCSVData.haveSexAddSalonBeautiful = csv.GetCellAsInteger(1, i);
  1089. break;
  1090. case "entertainAddSalonClean":
  1091. ScheduleCSVData.entertainAddSalonClean = csv.GetCellAsInteger(1, i);
  1092. break;
  1093. case "entertainAddSalonBeautiful":
  1094. ScheduleCSVData.entertainAddSalonBeautiful = csv.GetCellAsInteger(1, i);
  1095. break;
  1096. case "entertainParameterRevisionThreshold":
  1097. ScheduleCSVData.entertainParameterRevisionThreshold = csv.GetCellAsInteger(1, i);
  1098. break;
  1099. case "entertainPropensityRevisionMin":
  1100. ScheduleCSVData.entertainPropensityRevisionMin = csv.GetCellAsInteger(1, i);
  1101. break;
  1102. case "entertainPropensityRevisionMax":
  1103. ScheduleCSVData.entertainPropensityRevisionMax = csv.GetCellAsInteger(1, i);
  1104. break;
  1105. case "workSuccessLvPerfectIncidence":
  1106. ScheduleCSVData.workSuccessLvPerfectIncidence = csv.GetCellAsInteger(1, i);
  1107. break;
  1108. case "workSuccessLvMissIncidence":
  1109. ScheduleCSVData.workSuccessLvMissIncidence = csv.GetCellAsInteger(1, i);
  1110. break;
  1111. case "dispatchIncomCoefficient":
  1112. ScheduleCSVData.dispatchIncomCoefficient = csv.GetCellAsInteger(1, i);
  1113. break;
  1114. case "vipFullOpenDay":
  1115. ScheduleCSVData.vipFullOpenDay = csv.GetCellAsInteger(1, i);
  1116. break;
  1117. case "noonWorkLv2Exp":
  1118. ScheduleCSVData.noonWorkLv2Exp = csv.GetCellAsInteger(1, i);
  1119. break;
  1120. case "noonWorkLv3Exp":
  1121. ScheduleCSVData.noonWorkLv3Exp = csv.GetCellAsInteger(1, i);
  1122. break;
  1123. case "subMaidInitTaskId":
  1124. ScheduleCSVData.subMaidInitTaskId = csv.GetCellAsInteger(1, i);
  1125. break;
  1126. case "faclilityPowerUpWorkId":
  1127. ScheduleCSVData.faclilityPowerUpWorkId = csv.GetCellAsInteger(1, i);
  1128. break;
  1129. }
  1130. }
  1131. }
  1132. [Obsolete("FacilityDataTable.csへ移動しました。", false)]
  1133. private static Dictionary<int, ScheduleCSVData.Work> WorkDataDic;
  1134. private static Dictionary<int, ScheduleCSVData.Training> TrainingDataDic;
  1135. private static Dictionary<int, ScheduleCSVData.Yotogi> YotogiDataDic;
  1136. private static ScheduleCSVData.Work FaclityPowerUp;
  1137. public static SortedDictionary<int, string> TaskCategoryNameMap;
  1138. public static List<int> WorkLegacyDisableId;
  1139. public static List<int> NetorareFlag;
  1140. public static Dictionary<int, Dictionary<int, int>> NoonWorkInitData;
  1141. public static Dictionary<int, Dictionary<int, int>> NoonWorkInitDataLegacy;
  1142. public static Dictionary<int, Dictionary<int, int>> NightWorkInitData;
  1143. public static Dictionary<int, Dictionary<int, int>> NightWorkInitDataLegacy;
  1144. public static int[] EntertainNumberData;
  1145. public static List<ScheduleCSVData.EntertainGuest>[] EntertainGuestData;
  1146. public static int dayAddSalonClean;
  1147. public static int dayAddSalonBeautiful;
  1148. public static int haveSexAddSalonClean;
  1149. public static int haveSexAddSalonBeautiful;
  1150. public static int entertainAddSalonClean;
  1151. public static int entertainAddSalonBeautiful;
  1152. public static int entertainParameterRevisionThreshold;
  1153. public static int entertainPropensityRevisionMin;
  1154. public static int entertainPropensityRevisionMax;
  1155. public static int workSuccessLvPerfectIncidence = 10;
  1156. public static int workSuccessLvMissIncidence = 10;
  1157. public static int dispatchIncomCoefficient = 500;
  1158. public static int vipFullOpenDay = 100;
  1159. public static int noonWorkLv2Exp = 10;
  1160. public static int noonWorkLv3Exp = 30;
  1161. public static int subMaidInitTaskId;
  1162. public static int faclilityPowerUpWorkId = 3000;
  1163. public static int trainingFaclilityID = 100;
  1164. public const int scheduleTrainingCategoryID = 51;
  1165. public const int scheduleWorkCategoryID = 52;
  1166. public const int scheduleYotogiCategoryID = 100;
  1167. [CompilerGenerated]
  1168. private static Action<CsvParser> <>f__mg$cache0;
  1169. [CompilerGenerated]
  1170. private static Action<CsvParser, HashSet<int>> <>f__mg$cache1;
  1171. [CompilerGenerated]
  1172. private static Action<CsvParser, HashSet<int>> <>f__mg$cache2;
  1173. [CompilerGenerated]
  1174. private static Action<CsvParser, HashSet<int>> <>f__mg$cache3;
  1175. [CompilerGenerated]
  1176. private static Action<CsvParser> <>f__mg$cache4;
  1177. [CompilerGenerated]
  1178. private static Action<CsvParser> <>f__mg$cache5;
  1179. [CompilerGenerated]
  1180. private static Action<CsvParser> <>f__mg$cache6;
  1181. [CompilerGenerated]
  1182. private static Action<CsvParser> <>f__mg$cache7;
  1183. [CompilerGenerated]
  1184. private static Action<CsvParser> <>f__mg$cache8;
  1185. [CompilerGenerated]
  1186. private static Action<CsvParser> <>f__mg$cache9;
  1187. [CompilerGenerated]
  1188. private static Action<CsvParser> <>f__mg$cacheA;
  1189. [CompilerGenerated]
  1190. private static Action<CsvParser> <>f__mg$cacheB;
  1191. [CompilerGenerated]
  1192. private static Action<CsvParser> <>f__mg$cacheC;
  1193. [CompilerGenerated]
  1194. private static Action<CsvParser> <>f__mg$cacheD;
  1195. [CompilerGenerated]
  1196. private static Action<CsvParser, HashSet<int>> <>f__mg$cacheE;
  1197. [CompilerGenerated]
  1198. private static Action<CsvParser, HashSet<int>> <>f__mg$cacheF;
  1199. public enum TrainingType
  1200. {
  1201. Basic,
  1202. Dispatch,
  1203. Trainer,
  1204. Trainee,
  1205. Holiday,
  1206. Travel
  1207. }
  1208. public enum YotogiType
  1209. {
  1210. Basic,
  1211. Rest,
  1212. Entertain,
  1213. HaveSex,
  1214. Vip,
  1215. VipCall,
  1216. Travel,
  1217. EasyYotogi,
  1218. NewSex
  1219. }
  1220. public enum WorkType
  1221. {
  1222. Basic,
  1223. PowerUp
  1224. }
  1225. public class ScheduleBase
  1226. {
  1227. public bool IsCommon
  1228. {
  1229. get
  1230. {
  1231. return this.mode == ScheduleCSVData.ScheduleBase.Mode.Common;
  1232. }
  1233. }
  1234. public bool IsLegacy
  1235. {
  1236. get
  1237. {
  1238. return this.mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2;
  1239. }
  1240. }
  1241. public ScheduleCSVData.ScheduleBase.Mode mode = ScheduleCSVData.ScheduleBase.Mode.COM3D;
  1242. public ScheduleTaskCtrl.TaskType type;
  1243. public bool isCommu = true;
  1244. public string name;
  1245. public string icon;
  1246. public int id;
  1247. public string information;
  1248. public int categoryID;
  1249. public List<string> condInfo;
  1250. public bool visibleIfRentalMaid;
  1251. public bool disableIfRentalMaid;
  1252. public enum Mode
  1253. {
  1254. CM3D2,
  1255. COM3D,
  1256. Common
  1257. }
  1258. }
  1259. public class Training : ScheduleCSVData.ScheduleBase
  1260. {
  1261. public FacilityDataTable.FacilityDefaultData facility
  1262. {
  1263. get
  1264. {
  1265. if (this.facilityDefaultData == null)
  1266. {
  1267. this.facilityDefaultData = FacilityDataTable.GetFacilityDefaultData(this.facilityId, true);
  1268. }
  1269. return this.facilityDefaultData;
  1270. }
  1271. set
  1272. {
  1273. this.facilityDefaultData = value;
  1274. }
  1275. }
  1276. private FacilityDataTable.FacilityDefaultData facilityDefaultData;
  1277. public ScheduleCSVData.TrainingType trainingType;
  1278. public int facilityId = 100;
  1279. public int study_rate;
  1280. public int reception;
  1281. public int care;
  1282. public int lovely;
  1283. public int elegance;
  1284. public int charm;
  1285. public int teach_rate;
  1286. public int cooking;
  1287. public int vocal;
  1288. public int dance;
  1289. public int appealPoint;
  1290. public int exp;
  1291. public int income;
  1292. public int cmdExp;
  1293. public List<Contract> condContract;
  1294. public List<int> condMaidClass;
  1295. public string needMaidStatus;
  1296. public List<int> needEventItemIdList;
  1297. public List<string> condPackage;
  1298. }
  1299. public class Work : ScheduleCSVData.Training
  1300. {
  1301. public ScheduleCSVData.WorkType workTyp;
  1302. }
  1303. public class Yotogi : ScheduleCSVData.ScheduleBase
  1304. {
  1305. public ScheduleCSVData.YotogiType yotogiType;
  1306. public int income;
  1307. public int evaluation;
  1308. public int add_play_number;
  1309. public int add_other_play_number;
  1310. public int condSalonGrade;
  1311. public Dictionary<int, int> condSkill;
  1312. public List<Contract> condContract;
  1313. public List<int> condMaidClass;
  1314. public List<int> condYotogiClass;
  1315. public List<int> condPropensity;
  1316. public List<Seikeiken> condSeikeiken;
  1317. public List<string> condFlag1;
  1318. public List<string> condFlag0;
  1319. public List<MaidStatus.Relation> condRelation;
  1320. public List<AdditionalRelation> condAdditionalRelation;
  1321. public List<SpecialRelation> condSpecialRelation;
  1322. public string subMaidUnipueName = string.Empty;
  1323. public List<string> condPackage;
  1324. public List<string> condManVisibleFlag1;
  1325. public List<string> condManFlag1;
  1326. public List<string> condManFlag0;
  1327. public List<int> condPersonal;
  1328. public bool condMainChara;
  1329. public List<List<int>> condFacilityID;
  1330. public List<int> pairCondPersonal;
  1331. public bool isCheckGP002Personal;
  1332. public bool netorareFlag;
  1333. public ScheduleCSVData.Yotogi.EasyYotogi easyYotogi;
  1334. public List<MaidStatus.Old.Relation> condRelationOld;
  1335. public class EasyYotogi
  1336. {
  1337. public int trophyId;
  1338. public int care;
  1339. public int reception;
  1340. public int teach_rate;
  1341. public int inyoku;
  1342. public int hentai;
  1343. public int housi;
  1344. public int msei;
  1345. public int study_rate;
  1346. }
  1347. }
  1348. public class EntertainGuest
  1349. {
  1350. public int condSalonGrade;
  1351. public int baseIcome;
  1352. public int baseEvaluation;
  1353. public bool sexual;
  1354. }
  1355. }
  1356. }