CharacterSelectMain.cs 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.CompilerServices;
  5. using com.workman.cm3d2.scene.dailyEtc;
  6. using I2.Loc;
  7. using MaidStatus;
  8. using PlayerStatus;
  9. using Schedule;
  10. using UnityEngine;
  11. using wf;
  12. public class CharacterSelectMain : WfScreenChildren
  13. {
  14. public static bool compatibilityMode
  15. {
  16. get
  17. {
  18. return DailyMgr.IsLegacy;
  19. }
  20. }
  21. public override void Awake()
  22. {
  23. base.Awake();
  24. this.explanatory_label_ = UTY.GetChildObject(base.root_obj, "ExplanatoryText/Value", false).GetComponent<UILabel>();
  25. GameObject childObject = UTY.GetChildObject(base.root_obj, "ButtonParent/Tower/Grid", false);
  26. this.button_dic_.Add("全選択", UTY.GetChildObject(childObject, "全選択", false).GetComponent<UIButton>());
  27. EventDelegate.Add(this.button_dic_["全選択"].onClick, new EventDelegate.Callback(this.OnSelectAllChara));
  28. this.button_dic_.Add("全解除", UTY.GetChildObject(childObject, "全解除", false).GetComponent<UIButton>());
  29. EventDelegate.Add(this.button_dic_["全解除"].onClick, new EventDelegate.Callback(this.OnSelectAllReleaseChara));
  30. this.button_dic_.Add("OK", UTY.GetChildObject(base.root_obj, "ButtonParent/OK", false).GetComponent<UIButton>());
  31. this.button_dic_.Add("Cancel", UTY.GetChildObject(base.root_obj, "ButtonParent/Cancel", false).GetComponent<UIButton>());
  32. this.button_dic_["Cancel"].gameObject.SetActive(false);
  33. foreach (KeyValuePair<string, UIButton> keyValuePair in this.button_dic_)
  34. {
  35. EventDelegate.Add(keyValuePair.Value.onClick, new EventDelegate.Callback(this.OnClickButton));
  36. }
  37. this.chara_select_mgr_ = UTY.GetChildObject(base.root_obj, "CharacterSelectPanel", false).GetComponent<CharacterSelectManager>();
  38. this.InitSelectedMaidPanelUI();
  39. }
  40. protected override void OnCall()
  41. {
  42. this.auto_select_ = false;
  43. this.wait_count_ = 0;
  44. this.loaded_check_maid_.Clear();
  45. this.select_maid_ = null;
  46. this.chara_mgr_ = GameMain.Instance.CharacterMgr;
  47. this.scene_chara_select_ = (base.parent_mgr as SceneCharacterSelect);
  48. NDebug.AssertNull(this.scene_chara_select_);
  49. this.button_dic_["全選択"].gameObject.SetActive(false);
  50. this.button_dic_["全解除"].gameObject.SetActive(false);
  51. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Additional)
  52. {
  53. this.OnCallAdditionalType();
  54. return;
  55. }
  56. bool flag = this.scene_chara_select_.select_type != SceneCharacterSelect.SelectType.NewYotogiAdditional;
  57. flag &= (this.scene_chara_select_.select_type != SceneCharacterSelect.SelectType.LifeModeRecollection);
  58. if (flag)
  59. {
  60. for (int i = 0; i < this.chara_mgr_.GetMaidCount(); i++)
  61. {
  62. if (this.chara_mgr_.GetMaid(i) != null)
  63. {
  64. this.chara_mgr_.Deactivate(i, false);
  65. }
  66. }
  67. }
  68. else
  69. {
  70. for (int j = 0; j < this.chara_mgr_.GetMaidCount(); j++)
  71. {
  72. if (this.chara_mgr_.GetMaid(j) != null)
  73. {
  74. this.chara_mgr_.GetMaid(j).Visible = false;
  75. }
  76. }
  77. }
  78. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Communication)
  79. {
  80. NDebug.Assert("コミュキャラ選択は廃止されました", false);
  81. GameMain.Instance.BgMgr.ChangeBg("Syosai");
  82. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(-2.526511f, 1.715126f, -2.023701f), 7.999995f, new Vector2(-128.2036f, -6.149067f));
  83. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  84. {
  85. List<Maid> list3 = ScheduleAPI.CanCommunicationMaids(true);
  86. for (int n = 0; n < list3.Count; n++)
  87. {
  88. draw_maid_list.Add(list3[n]);
  89. }
  90. });
  91. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  92. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  93. if (this.chara_select_mgr_.maid_list_count == 1)
  94. {
  95. this.auto_select_ = true;
  96. }
  97. if (!this.auto_select_)
  98. {
  99. GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 0.5f, true);
  100. }
  101. this.SetExplanatoryLabel("コミュニケーションを行うメイドを選択してください。");
  102. }
  103. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Yotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.NewYotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.NewYotogiAdditional || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Vip || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Facility)
  104. {
  105. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Yotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.NewYotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.NewYotogiAdditional || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Vip)
  106. {
  107. if (!CharacterSelectMain.compatibilityMode)
  108. {
  109. GameMain.Instance.BgMgr.ChangeBg("Theater");
  110. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(12.39468f, 5.495444f, 22.72065f), 0.1f, new Vector2(-6.047941f, 14.65832f));
  111. }
  112. else
  113. {
  114. GameMain.Instance.BgMgr.ChangeBg("Salon");
  115. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(1.485176f, 0.5354422f, 1.606312f), 13.60001f, new Vector2(-208.1436f, -0.869565f));
  116. }
  117. }
  118. else
  119. {
  120. GameMain.Instance.BgMgr.ChangeBg("EmpireClub_Rotary");
  121. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(6.673284f, 3.031431f, 20.00305f), 0.2f, new Vector2(562.5145f, -4.906824f));
  122. }
  123. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  124. {
  125. List<string> chara_guid_stock_list = SceneCharacterSelect.chara_guid_stock_list;
  126. for (int n = 0; n < chara_guid_stock_list.Count; n++)
  127. {
  128. Maid stockMaid2 = GameMain.Instance.CharacterMgr.GetStockMaid(chara_guid_stock_list[n]);
  129. if (stockMaid2 != null)
  130. {
  131. if (!CharacterSelectMain.compatibilityMode)
  132. {
  133. draw_maid_list.Add(stockMaid2);
  134. }
  135. else if (stockMaid2.status.isCompatiblePersonality)
  136. {
  137. draw_maid_list.Add(stockMaid2);
  138. }
  139. }
  140. }
  141. });
  142. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  143. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  144. if (this.chara_select_mgr_.maid_list_count == 1 && this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Vip)
  145. {
  146. this.auto_select_ = true;
  147. }
  148. string explanatoryLabel = string.Empty;
  149. SceneCharacterSelect.SelectType select_type = this.scene_chara_select_.select_type;
  150. if (select_type != SceneCharacterSelect.SelectType.Yotogi)
  151. {
  152. if (select_type != SceneCharacterSelect.SelectType.Vip)
  153. {
  154. if (select_type != SceneCharacterSelect.SelectType.NewYotogi)
  155. {
  156. if (select_type != SceneCharacterSelect.SelectType.NewYotogiAdditional)
  157. {
  158. explanatoryLabel = "施設強化を行うメイドを選択してください。";
  159. }
  160. else
  161. {
  162. explanatoryLabel = "ハーレムのペアとなるメイドを選択してください。";
  163. }
  164. }
  165. else
  166. {
  167. explanatoryLabel = "GP01夜伽を行うメイドを選択してください。";
  168. }
  169. }
  170. else
  171. {
  172. explanatoryLabel = "Hイベントを行うメイドを選択してください。";
  173. }
  174. }
  175. else
  176. {
  177. explanatoryLabel = (Product.isPublic ? "メイドを選択してください。" : "夜伽を行うメイドを選択してください。");
  178. }
  179. this.SetExplanatoryLabel(explanatoryLabel);
  180. if (!this.auto_select_)
  181. {
  182. if (!CharacterSelectMain.compatibilityMode)
  183. {
  184. GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 0.5f, true);
  185. }
  186. else
  187. {
  188. GameMain.Instance.SoundMgr.PlayBGMLegacy("BGM014.ogg", 0.5f, true);
  189. }
  190. }
  191. }
  192. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.CompetitiveShow)
  193. {
  194. if (!CharacterSelectMain.compatibilityMode)
  195. {
  196. GameMain.Instance.BgMgr.ChangeBg("Theater");
  197. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(6.502444f, 1.154878f, 27.09383f), 0.1f, new Vector2(200.2396f, -12.36027f));
  198. }
  199. else
  200. {
  201. GameMain.Instance.BgMgr.ChangeBg("Salon_Day");
  202. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(1.485176f, 0.5354422f, 1.606312f), 13.60001f, new Vector2(-208.1436f, -0.869565f));
  203. }
  204. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  205. {
  206. List<Maid> list3 = new List<Maid>();
  207. CharacterSelectManager.DefaultMaidList(list3);
  208. for (int n = 0; n < list3.Count; n++)
  209. {
  210. if (!CharacterSelectMain.compatibilityMode && (list3[n].status.heroineType == HeroineType.Original || list3[n].status.heroineType == HeroineType.Transfer))
  211. {
  212. draw_maid_list.Add(list3[n]);
  213. }
  214. else if (CharacterSelectMain.compatibilityMode && list3[n].status.isCompatiblePersonality)
  215. {
  216. draw_maid_list.Add(list3[n]);
  217. }
  218. }
  219. });
  220. this.chara_select_mgr_.SetCallBackOnMultiSelect(new CharacterSelectManager.CallBackOnMultiSelect(this.OnMultiSelectChara));
  221. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Multiple, this.chara_mgr_.GetStockMaidCount(), false);
  222. this.button_dic_["OK"].isEnabled = false;
  223. if (this.chara_select_mgr_.maid_list_count == 1)
  224. {
  225. Maid[] array = new Maid[1];
  226. List<Maid> list = new List<Maid>();
  227. List<Maid> list2 = new List<Maid>();
  228. CharacterSelectManager.DefaultMaidList(list2);
  229. for (int k = 0; k < list2.Count; k++)
  230. {
  231. if (!CharacterSelectMain.compatibilityMode && list2[k].status.heroineType == HeroineType.Original)
  232. {
  233. list.Add(list2[k]);
  234. }
  235. else if (CharacterSelectMain.compatibilityMode && list2[k].status.isCompatiblePersonality)
  236. {
  237. list.Add(list2[k]);
  238. }
  239. }
  240. if (0 < list.Count)
  241. {
  242. array[0] = list[0];
  243. }
  244. if (array[0] != null)
  245. {
  246. this.OnMultiSelectChara(array);
  247. this.auto_select_ = true;
  248. }
  249. }
  250. if (!this.auto_select_)
  251. {
  252. if (!CharacterSelectMain.compatibilityMode)
  253. {
  254. GameMain.Instance.SoundMgr.PlayBGM("BGM006.ogg", 0.5f, true);
  255. }
  256. else
  257. {
  258. GameMain.Instance.SoundMgr.PlayBGMLegacy("BGM021.ogg", 0.5f, true);
  259. }
  260. }
  261. this.button_dic_["全選択"].gameObject.SetActive(true);
  262. this.button_dic_["全解除"].gameObject.SetActive(true);
  263. this.button_dic_["全選択"].isEnabled = true;
  264. this.button_dic_["全解除"].isEnabled = false;
  265. this.SetExplanatoryLabel("品評会を行うメイドを選択してください。");
  266. }
  267. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Free)
  268. {
  269. if (!CharacterSelectMain.compatibilityMode)
  270. {
  271. GameMain.Instance.BgMgr.ChangeBg("Theater");
  272. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(12.39468f, 5.495444f, 22.72065f), 0.1f, new Vector2(-6.047941f, 14.65832f));
  273. }
  274. else
  275. {
  276. GameMain.Instance.BgMgr.ChangeBg("Syosai");
  277. }
  278. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  279. {
  280. List<Maid> list3 = new List<Maid>();
  281. CharacterSelectManager.DefaultMaidList(list3);
  282. for (int n = 0; n < list3.Count; n++)
  283. {
  284. if (!CharacterSelectMain.compatibilityMode)
  285. {
  286. draw_maid_list.Add(list3[n]);
  287. }
  288. else if (list3[n].status.isCompatiblePersonality)
  289. {
  290. draw_maid_list.Add(list3[n]);
  291. }
  292. }
  293. });
  294. this.SetExplanatoryLabel("メイドを選択してください。");
  295. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  296. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  297. if (this.chara_select_mgr_.maid_list_count == 1)
  298. {
  299. this.auto_select_ = true;
  300. }
  301. }
  302. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.TouchCharaSelect)
  303. {
  304. if (GameMain.Instance.CharacterMgr.status.isDaytime)
  305. {
  306. GameMain.Instance.BgMgr.ChangeBg(DailyAPI.dayBg);
  307. }
  308. else
  309. {
  310. GameMain.Instance.BgMgr.ChangeBg(DailyAPI.nightBg);
  311. }
  312. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(1.32781f, 1.400725f, -0.06648348f), 0.1f, new Vector2(214.6109f, 8.136656f));
  313. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  314. {
  315. List<Maid> list3 = new List<Maid>();
  316. CharacterSelectManager.DefaultMaidList(list3);
  317. for (int n = 0; n < list3.Count; n++)
  318. {
  319. if (!CharacterSelectMain.compatibilityMode)
  320. {
  321. draw_maid_list.Add(list3[n]);
  322. }
  323. else if (list3[n].status.isCompatiblePersonality)
  324. {
  325. draw_maid_list.Add(list3[n]);
  326. }
  327. }
  328. });
  329. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  330. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  331. if (this.chara_select_mgr_.maid_list_count == 1)
  332. {
  333. this.auto_select_ = true;
  334. }
  335. if (!this.auto_select_)
  336. {
  337. GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 0.5f, true);
  338. }
  339. this.SetExplanatoryLabel("おさわりを行うメイドを選択してください。");
  340. }
  341. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRComSelect)
  342. {
  343. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  344. {
  345. List<Maid> list3 = new List<Maid>();
  346. CharacterSelectManager.DefaultMaidList(list3);
  347. for (int n = 0; n < list3.Count; n++)
  348. {
  349. if (!CharacterSelectMain.compatibilityMode)
  350. {
  351. draw_maid_list.Add(list3[n]);
  352. }
  353. else if (list3[n].status.isCompatiblePersonality)
  354. {
  355. draw_maid_list.Add(list3[n]);
  356. }
  357. }
  358. });
  359. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  360. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  361. if (this.chara_select_mgr_.maid_list_count == 1)
  362. {
  363. this.auto_select_ = true;
  364. }
  365. this.SetExplanatoryLabel("バカンスに連れていくメイドを選択してください。");
  366. }
  367. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRKaraokeSelect)
  368. {
  369. CharacterSelectManager characterSelectManager = this.chara_select_mgr_;
  370. if (CharacterSelectMain.<>f__mg$cache0 == null)
  371. {
  372. CharacterSelectMain.<>f__mg$cache0 = new CharacterSelectManager.CallBackMaidList(KaraokeDataManager.GetMaidListKaraoke);
  373. }
  374. characterSelectManager.SetCallBackMaidList(CharacterSelectMain.<>f__mg$cache0);
  375. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  376. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  377. if (this.chara_select_mgr_.maid_list_count == 1)
  378. {
  379. this.auto_select_ = true;
  380. }
  381. this.SetExplanatoryLabel("カラオケに連れていくメイドを選択してください。");
  382. }
  383. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Recollection)
  384. {
  385. if (!CharacterSelectMain.compatibilityMode)
  386. {
  387. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  388. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(-0.4103856f, 1.075485f, 0.775088f), 1.6f, new Vector2(321.3178f, 3.478252f));
  389. }
  390. else
  391. {
  392. GameMain.Instance.BgMgr.ChangeBg("Syosai");
  393. }
  394. string text = "recollection_subheroine.nei";
  395. List<int> subMaidList = new List<int>();
  396. using (AFileBase afileBase = GameUty.FileSystem.FileOpen(text))
  397. {
  398. using (CsvParser csvParser = new CsvParser())
  399. {
  400. bool condition = csvParser.Open(afileBase);
  401. NDebug.Assert(condition, text + "\nopen failed.");
  402. for (int l = 1; l < csvParser.max_cell_y; l++)
  403. {
  404. if (csvParser.IsCellToExistData(0, l))
  405. {
  406. int cellAsInteger = csvParser.GetCellAsInteger(0, l);
  407. int cellAsInteger2 = csvParser.GetCellAsInteger(2, l);
  408. subMaidList.Add(cellAsInteger2);
  409. }
  410. }
  411. }
  412. }
  413. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  414. {
  415. List<Maid> list3 = new List<Maid>();
  416. CharacterSelectManager.DefaultMaidList(list3);
  417. for (int n = 0; n < list3.Count; n++)
  418. {
  419. Maid maid2 = list3[n];
  420. if (maid2.status.subCharaData == null || subMaidList.Contains(maid2.status.subCharaData.id))
  421. {
  422. if (!CharacterSelectMain.compatibilityMode || maid2.status.isCompatiblePersonality)
  423. {
  424. draw_maid_list.Add(list3[n]);
  425. }
  426. }
  427. }
  428. });
  429. this.SetExplanatoryLabel("メイドを選択してください。");
  430. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  431. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  432. if (this.chara_select_mgr_.maid_list_count == 1)
  433. {
  434. this.auto_select_ = true;
  435. }
  436. }
  437. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.LifeMode)
  438. {
  439. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  440. {
  441. List<Maid> list3 = new List<Maid>();
  442. CharacterSelectManager.DefaultMaidList(list3);
  443. foreach (Maid item in EmpireLifeModeAPI.SelectionMaidList(list3))
  444. {
  445. draw_maid_list.Add(item);
  446. }
  447. });
  448. this.chara_select_mgr_.big_thumbnail.isEnabled = false;
  449. this.CreateSelectedMaidPanelOfLifeMode();
  450. this.chara_select_mgr_.SetCallBackOnMultiSelect(new CharacterSelectManager.CallBackOnMultiSelect(this.OnMultiSelectCharaLifeMode));
  451. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Multiple, EmpireLifeModeAPI.GetMaxMaidCount(), false);
  452. this.button_dic_["OK"].isEnabled = false;
  453. foreach (Maid maid in GameMain.Instance.LifeModeMgr.lifeModeAllMaidList)
  454. {
  455. this.chara_select_mgr_.SetSelectStateMaid(maid, true);
  456. }
  457. if (this.chara_select_mgr_.maid_list_count == 1)
  458. {
  459. this.chara_select_mgr_.SelectAllMaid();
  460. this.auto_select_ = true;
  461. }
  462. if (!this.auto_select_)
  463. {
  464. GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 0.5f, true);
  465. }
  466. this.button_dic_["全選択"].gameObject.SetActive(false);
  467. this.button_dic_["全解除"].gameObject.SetActive(false);
  468. this.SetExplanatoryLabel("ライフモードに登場するメイドを選択してください");
  469. }
  470. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.LifeModeRecollection)
  471. {
  472. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  473. {
  474. List<Maid> list3 = new List<Maid>();
  475. CharacterSelectManager.DefaultMaidList(list3);
  476. foreach (Maid item in EmpireLifeModeAPI.SelectionMaidList(list3))
  477. {
  478. draw_maid_list.Add(item);
  479. }
  480. });
  481. this.chara_select_mgr_.big_thumbnail.isEnabled = false;
  482. this.CreateSelectedMaidPanelOfLifeModeRecollection();
  483. this.chara_select_mgr_.SetCallBackOnMultiSelect(new CharacterSelectManager.CallBackOnMultiSelect(this.OnMultiSelectCharaLifeModeRecollection));
  484. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Multiple, EmpireLifeModeAPI.GetEnabledPersonalListOfRecollection().Count, false);
  485. this.button_dic_["OK"].isEnabled = false;
  486. if (this.chara_select_mgr_.maid_list_count == 1)
  487. {
  488. this.chara_select_mgr_.SelectAllMaid();
  489. this.auto_select_ = true;
  490. }
  491. if (!this.auto_select_)
  492. {
  493. GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 0.5f, true);
  494. }
  495. this.button_dic_["全選択"].gameObject.SetActive(false);
  496. this.button_dic_["全解除"].gameObject.SetActive(false);
  497. this.SetExplanatoryLabel("ライフモードに登場するメイドを選択してください");
  498. }
  499. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  500. for (int m = 0; m < characterMgr.GetStockMaidCount(); m++)
  501. {
  502. Maid stockMaid = characterMgr.GetStockMaid(m);
  503. if (stockMaid != null)
  504. {
  505. stockMaid.FaceAnime("通常", 0f, 0);
  506. stockMaid.FaceBlend("無し");
  507. }
  508. }
  509. if (flag)
  510. {
  511. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  512. }
  513. }
  514. private void OnCallAdditionalType()
  515. {
  516. Debug.Log("メイドをアクティブ化させるスロット : " + this.scene_chara_select_.select_maid_slot);
  517. CharacterSelectManager characterSelectManager = this.chara_select_mgr_;
  518. if (CharacterSelectMain.<>f__mg$cache1 == null)
  519. {
  520. CharacterSelectMain.<>f__mg$cache1 = new CharacterSelectManager.CallBackMaidList(KaraokeDataManager.GetMaidListAdditional);
  521. }
  522. characterSelectManager.SetCallBackMaidList(CharacterSelectMain.<>f__mg$cache1);
  523. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  524. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  525. if (this.chara_select_mgr_.maid_list_count == 1)
  526. {
  527. this.auto_select_ = true;
  528. }
  529. this.SetExplanatoryLabel("*メイドの追加呼び出し*");
  530. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  531. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  532. {
  533. Maid stockMaid = characterMgr.GetStockMaid(i);
  534. if (stockMaid != null)
  535. {
  536. stockMaid.FaceAnime("通常", 0f, 0);
  537. stockMaid.FaceBlend("無し");
  538. }
  539. }
  540. }
  541. protected override bool IsCallFadeIn()
  542. {
  543. if (this.auto_select_)
  544. {
  545. base.SetFadeStatus(WfScreenChildren.FadeStatus.Wait);
  546. float fade_time = base.fade_time;
  547. base.SetFadeTime(0f);
  548. this.Finish();
  549. base.SetFadeTime(fade_time);
  550. return false;
  551. }
  552. this.wait_count_++;
  553. return 2 < this.wait_count_;
  554. }
  555. public void SetExplanatoryLabel(string text)
  556. {
  557. this.explanatory_label_.text = text;
  558. Localize component = this.explanatory_label_.gameObject.GetComponent<Localize>();
  559. component.SetTerm("SceneCharaSelect/" + text);
  560. }
  561. public void SetCancelLabel(string cancel_call_label)
  562. {
  563. this.cancel_call_label_ = cancel_call_label;
  564. this.button_dic_["Cancel"].gameObject.SetActive(!string.IsNullOrEmpty(this.cancel_call_label_));
  565. }
  566. private void OnSelectAllChara()
  567. {
  568. this.chara_select_mgr_.SelectAllMaid();
  569. }
  570. private void OnSelectAllReleaseChara()
  571. {
  572. this.chara_select_mgr_.SelectAllReleaseMaid();
  573. }
  574. private void OnSelectChara(Maid select_maid)
  575. {
  576. this.select_maid_ = select_maid;
  577. }
  578. private void OnSingleDanceSelectChara(Maid select_maid)
  579. {
  580. this.loaded_check_maid_.Clear();
  581. this.loaded_check_maid_.Add(select_maid);
  582. }
  583. private void OnMultiDanceSelectChara(Maid[] maid_array)
  584. {
  585. this.loaded_check_maid_.Clear();
  586. for (int i = 0; i < maid_array.Length; i++)
  587. {
  588. this.loaded_check_maid_.Add(maid_array[i]);
  589. }
  590. }
  591. private void OnMultiSelectChara(Maid[] maid_array)
  592. {
  593. this.loaded_check_maid_.Clear();
  594. bool isEnabled = false;
  595. bool flag = true;
  596. bool flag2 = true;
  597. for (int i = 0; i < maid_array.Length; i++)
  598. {
  599. if (maid_array[i] == null)
  600. {
  601. flag = false;
  602. }
  603. else
  604. {
  605. flag2 = false;
  606. isEnabled = true;
  607. this.loaded_check_maid_.Add(maid_array[i]);
  608. }
  609. }
  610. this.button_dic_["OK"].isEnabled = isEnabled;
  611. this.button_dic_["全選択"].isEnabled = !flag;
  612. this.button_dic_["全解除"].isEnabled = !flag2;
  613. }
  614. private void OnMultiSelectCharaLifeMode(Maid[] maidArray)
  615. {
  616. this.loaded_check_maid_.Clear();
  617. foreach (Maid maid in maidArray)
  618. {
  619. if (maid != null)
  620. {
  621. this.loaded_check_maid_.Add(maid);
  622. }
  623. }
  624. this.UpdateSelectedMaidPanelOfLifeMode(maidArray);
  625. this.button_dic_["OK"].isEnabled = (this.loaded_check_maid_.Count > 0);
  626. }
  627. private void OnMultiSelectCharaLifeModeRecollection(Maid[] maidArray)
  628. {
  629. this.loaded_check_maid_.Clear();
  630. foreach (Maid maid in maidArray)
  631. {
  632. if (maid != null)
  633. {
  634. this.loaded_check_maid_.Add(maid);
  635. }
  636. }
  637. this.UpdateSelectedMaidPanelOfLifeModeRecollection(maidArray);
  638. this.button_dic_["OK"].isEnabled = (this.loaded_check_maid_.Count > 0);
  639. }
  640. private void OnClickButton()
  641. {
  642. string text = string.Empty;
  643. foreach (KeyValuePair<string, UIButton> keyValuePair in this.button_dic_)
  644. {
  645. if (keyValuePair.Value == UIButton.current)
  646. {
  647. text = keyValuePair.Key;
  648. break;
  649. }
  650. }
  651. if (string.IsNullOrEmpty(text))
  652. {
  653. return;
  654. }
  655. if (text == "OK")
  656. {
  657. this.Finish();
  658. }
  659. else if (text == "Cancel")
  660. {
  661. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Yotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.NewYotogi)
  662. {
  663. string messageTerm = "Dialog/まだ夜伽を実行していないメイドがいます。夜伽を終了しますか?";
  664. if (Product.isPublic)
  665. {
  666. messageTerm = "Dialog/まだ会話を実行していないメイドがいます。会話を終了しますか?";
  667. }
  668. GameMain.Instance.SysDlg.ShowFromLanguageTerm(messageTerm, null, SystemDialog.TYPE.OK_CANCEL, delegate
  669. {
  670. GameMain.Instance.SysDlg.Close();
  671. this.select_maid_ = null;
  672. this.scene_chara_select_.move_screen.SetNextLabel(this.cancel_call_label_);
  673. this.Finish();
  674. }, null);
  675. }
  676. else
  677. {
  678. this.select_maid_ = null;
  679. this.scene_chara_select_.move_screen.SetNextLabel(this.cancel_call_label_);
  680. this.Finish();
  681. }
  682. }
  683. }
  684. private void OnOvrCamFree()
  685. {
  686. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 0);
  687. this.Finish();
  688. }
  689. private void OnOvrCamMove()
  690. {
  691. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 1);
  692. this.Finish();
  693. }
  694. public override bool Finish()
  695. {
  696. bool flag = base.Finish();
  697. if (flag && 0 < this.loaded_check_maid_.Count)
  698. {
  699. GameMain.Instance.SoundMgr.StopBGM(1.5f);
  700. }
  701. return flag;
  702. }
  703. protected override void OnFinish()
  704. {
  705. this.button_dic_["Cancel"].gameObject.SetActive(false);
  706. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Communication && this.select_maid_ != null)
  707. {
  708. int noonWorkId = this.select_maid_.status.noonWorkId;
  709. this.loaded_check_maid_.Add(this.select_maid_);
  710. ScheduleData[] scheduleSlot = GameMain.Instance.CharacterMgr.status.scheduleSlot;
  711. for (int i = 0; i < scheduleSlot.Length; i++)
  712. {
  713. if (scheduleSlot[i].maid_guid == this.select_maid_.status.guid)
  714. {
  715. scheduleSlot[i].noon_communication = true;
  716. break;
  717. }
  718. }
  719. if (noonWorkId == ScheduleAPI.GetNoonTrainerWorkId())
  720. {
  721. Maid noonTraineeMaid = ScheduleAPI.GetNoonTraineeMaid();
  722. NDebug.Assert(noonTraineeMaid != null, "研修生を特定できませんでした");
  723. this.loaded_check_maid_.Add(noonTraineeMaid);
  724. }
  725. else if (noonWorkId == ScheduleAPI.GetTraineeWorkId())
  726. {
  727. Maid noonTrainerMaid = ScheduleAPI.GetNoonTrainerMaid();
  728. NDebug.Assert(noonTrainerMaid != null, "研修官を特定できませんでした");
  729. this.loaded_check_maid_.Add(noonTrainerMaid);
  730. }
  731. }
  732. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Yotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.NewYotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Vip || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Facility || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Free || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Recollection)
  733. {
  734. if (this.select_maid_ != null)
  735. {
  736. this.loaded_check_maid_.Add(this.select_maid_);
  737. SceneCharacterSelect.chara_guid_stock_list.Remove(this.select_maid_.status.guid);
  738. }
  739. else
  740. {
  741. SceneCharacterSelect.chara_guid_stock_list.Clear();
  742. }
  743. }
  744. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.CompetitiveShow)
  745. {
  746. CompetitiveShowMgr.check_maid_list.Clear();
  747. SceneCharacterSelect.select_maid_list.Clear();
  748. for (int j = 0; j < this.loaded_check_maid_.Count; j++)
  749. {
  750. SceneCharacterSelect.select_maid_list.Add(this.loaded_check_maid_[j]);
  751. }
  752. this.loaded_check_maid_.Clear();
  753. }
  754. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.TouchCharaSelect && this.select_maid_ != null)
  755. {
  756. this.loaded_check_maid_.Add(this.select_maid_);
  757. }
  758. if ((this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRComSelect || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRKaraokeSelect) && this.select_maid_ != null)
  759. {
  760. this.loaded_check_maid_.Add(this.select_maid_);
  761. }
  762. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Additional)
  763. {
  764. this.chara_mgr_.SetActiveMaid(this.select_maid_, this.scene_chara_select_.select_maid_slot);
  765. }
  766. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.LifeMode)
  767. {
  768. NDebug.Assert(this.loaded_check_maid_.Count > 0);
  769. GameMain.Instance.LifeModeMgr.SetAllMaidList(this.loaded_check_maid_);
  770. this.loaded_check_maid_.Clear();
  771. }
  772. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.LifeModeRecollection)
  773. {
  774. GameMain.Instance.LifeModeMgr.SetAllMaidList(this.loaded_check_maid_);
  775. this.loaded_check_maid_.Clear();
  776. }
  777. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.NewYotogiAdditional)
  778. {
  779. this.loaded_check_maid_.Clear();
  780. this.loaded_check_maid_.Add(this.select_maid_);
  781. this.chara_mgr_.SetActiveMaid(this.loaded_check_maid_[0], 1);
  782. this.loaded_check_maid_[0].Visible = true;
  783. this.loaded_check_maid_[0].AllProcPropSeqStart();
  784. }
  785. else
  786. {
  787. for (int k = 0; k < this.loaded_check_maid_.Count; k++)
  788. {
  789. this.chara_mgr_.SetActiveMaid(this.loaded_check_maid_[k], k);
  790. this.loaded_check_maid_[k].Visible = true;
  791. this.loaded_check_maid_[k].AllProcPropSeqStart();
  792. }
  793. }
  794. GameMain.Instance.LoadIcon.NextLoadIcontImmediatelyDisplay();
  795. if (this.loaded_check_maid_.Count == 0)
  796. {
  797. base.parent_mgr.CallScreen("Move");
  798. }
  799. }
  800. protected override void OnFadeEnd()
  801. {
  802. if (this.loaded_check_maid_.Count == 0)
  803. {
  804. return;
  805. }
  806. bool flag = true;
  807. for (int i = 0; i < this.loaded_check_maid_.Count; i++)
  808. {
  809. if (this.loaded_check_maid_[i].IsBusy)
  810. {
  811. flag = false;
  812. break;
  813. }
  814. }
  815. if (flag)
  816. {
  817. base.parent_mgr.CallScreen("Move");
  818. this.loaded_check_maid_.Clear();
  819. }
  820. }
  821. private void InitSelectedMaidPanelUI()
  822. {
  823. this.m_SelectedMaidPanelParent = UTY.GetChildObject(base.root_obj, "SelectedMaidParent", false);
  824. this.m_SelectedMaidPanelGrid = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/Grid", false).GetComponent<UIGrid>();
  825. this.m_SelectedMaidPanelListViewer = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/Grid", false).GetComponent<uGUIListViewer>();
  826. this.m_SelectedMaidPanelButtonAutoSelect = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/parent buttons/auto select", false).GetComponent<UIButton>();
  827. this.m_SelectedMaidPanelButtonAllRelease = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/parent buttons/all release", false).GetComponent<UIButton>();
  828. NDebug.AssertNull(this.m_SelectedMaidPanelGrid);
  829. NDebug.AssertNull(this.m_SelectedMaidPanelListViewer);
  830. NDebug.AssertNull(this.m_SelectedMaidPanelButtonAutoSelect);
  831. NDebug.AssertNull(this.m_SelectedMaidPanelButtonAllRelease);
  832. this.m_SelectedMaidPanelParent.SetActive(false);
  833. }
  834. private void CreateSelectedMaidPanelOfLifeMode()
  835. {
  836. this.m_SelectedMaidPanelParent.SetActive(true);
  837. GameObject gameObject = Utility.CreatePrefab(this.m_SelectedMaidPanelGrid.gameObject, "CharacterSelect/Prefab/MaidPlateSimple", true);
  838. gameObject.SetActive(false);
  839. this.m_SelectedMaidPanelListViewer.tempItem = gameObject;
  840. this.m_SelectedMaidPanelListViewer.Show<MaidPlate>(21, delegate(int index, MaidPlate maidPlate)
  841. {
  842. if (EmpireLifeModeAPI.GetMaxMaidCount() <= index)
  843. {
  844. maidPlate.gameObject.SetActive(false);
  845. }
  846. else
  847. {
  848. maidPlate.gameObject.SetActive(true);
  849. }
  850. maidPlate.SetEmpty();
  851. UIButton uibutton = UTY.GetChildObject(maidPlate.gameObject, "Button", false).AddComponent<UIButton>();
  852. EventDelegate.Add(uibutton.onClick, delegate()
  853. {
  854. if (maidPlate.maid != null)
  855. {
  856. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  857. this.chara_select_mgr_.SetSelectStateMaid(maidPlate.maid, false);
  858. }
  859. });
  860. maidPlate.GetComponentInChildren<Collider>().enabled = false;
  861. maidPlate.GetComponentInChildren<UIButton>().defaultColor = new Color(0f, 0f, 0f, 0.5f);
  862. maidPlate.GetComponentInChildren<UIPlayAnimation>().enabled = false;
  863. });
  864. EventDelegate.Add(this.m_SelectedMaidPanelButtonAutoSelect.onClick, new EventDelegate.Callback(this.OnClickButtonMaidAutoSelect));
  865. EventDelegate.Add(this.m_SelectedMaidPanelButtonAllRelease.onClick, new EventDelegate.Callback(this.OnClickButtonMaidAllRelease));
  866. }
  867. private void UpdateSelectedMaidPanelOfLifeMode(Maid[] nowMaidSelectState)
  868. {
  869. bool flag = false;
  870. int num = 0;
  871. while (num < nowMaidSelectState.Length && num < this.m_SelectedMaidPanelListViewer.ItemArray.Length)
  872. {
  873. GameObject gameObject = this.m_SelectedMaidPanelListViewer.ItemArray[num];
  874. MaidPlate component = gameObject.GetComponent<MaidPlate>();
  875. UIButton componentInChildren = gameObject.GetComponentInChildren<UIButton>();
  876. Maid maid = nowMaidSelectState[num];
  877. component.GetComponentInChildren<Collider>().enabled = (maid != null);
  878. componentInChildren.defaultColor = ((!(maid != null)) ? new Color(0f, 0f, 0f, 0.5f) : new Color(0f, 0f, 0f, 0f));
  879. if (maid == null)
  880. {
  881. component.SetEmpty();
  882. component.transform.SetAsLastSibling();
  883. flag = true;
  884. }
  885. if (!gameObject.activeSelf)
  886. {
  887. gameObject.SetActive(true);
  888. component.transform.SetAsLastSibling();
  889. flag = true;
  890. }
  891. if (maid != component.maid)
  892. {
  893. component.SetMaidData(maid);
  894. component.transform.SetAsLastSibling();
  895. flag = true;
  896. }
  897. num++;
  898. }
  899. if (flag)
  900. {
  901. this.m_SelectedMaidPanelGrid.Reposition();
  902. }
  903. foreach (Transform transform in this.chara_select_mgr_.MaidPlateParentGrid.GetChildList())
  904. {
  905. MaidPlate component2 = transform.GetComponent<MaidPlate>();
  906. if (component2.maid != null && this.loaded_check_maid_.Contains(component2.maid))
  907. {
  908. this.chara_select_mgr_.MoveNoDrawArea(component2.maid);
  909. }
  910. }
  911. foreach (MaidPlate maidPlate in this.chara_select_mgr_.NoDrawArea.GetComponentsInChildren<MaidPlate>())
  912. {
  913. if (maidPlate.maid != null && !this.loaded_check_maid_.Contains(maidPlate.maid))
  914. {
  915. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  916. }
  917. }
  918. }
  919. private void OnClickButtonMaidAutoSelect()
  920. {
  921. int num = 0;
  922. List<Maid> list = new List<Maid>();
  923. List<MaidPlate> list2 = new List<MaidPlate>();
  924. int num2 = 0;
  925. while (num2 < this.m_SelectedMaidPanelListViewer.ItemArray.Length && num2 < this.chara_select_mgr_.select_max)
  926. {
  927. GameObject gameObject = this.m_SelectedMaidPanelListViewer.ItemArray[num2];
  928. MaidPlate component = gameObject.GetComponent<MaidPlate>();
  929. if (component.maid == null)
  930. {
  931. num++;
  932. }
  933. else
  934. {
  935. list.Add(component.maid);
  936. }
  937. num2++;
  938. }
  939. List<Transform> childList = this.chara_select_mgr_.MaidPlateParentGrid.GetChildList();
  940. for (int i = 0; i < childList.Count; i++)
  941. {
  942. MaidPlate component2 = childList[i].GetComponent<MaidPlate>();
  943. if (!list.Contains(component2.maid))
  944. {
  945. list2.Add(component2);
  946. }
  947. }
  948. foreach (MaidPlate maidPlate in from maid in list2
  949. orderby UnityEngine.Random.Range(0, 10)
  950. select maid)
  951. {
  952. if (num-- <= 0)
  953. {
  954. break;
  955. }
  956. this.chara_select_mgr_.SetSelectStateMaid(maidPlate.maid, true);
  957. }
  958. }
  959. private void OnClickButtonMaidAllRelease()
  960. {
  961. foreach (MaidPlate maidPlate in this.chara_select_mgr_.NoDrawArea.GetComponentsInChildren<MaidPlate>())
  962. {
  963. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  964. }
  965. this.chara_select_mgr_.SelectAllReleaseMaid();
  966. }
  967. private void CreateSelectedMaidPanelOfLifeModeRecollection()
  968. {
  969. this.m_SelectedMaidPanelParent.SetActive(true);
  970. GameObject gameObject = Utility.CreatePrefab(this.m_SelectedMaidPanelGrid.gameObject, "CharacterSelect/Prefab/MaidPlateSimple", true);
  971. gameObject.SetActive(false);
  972. this.m_SelectedMaidPanelListViewer.tempItem = gameObject;
  973. this.m_SelectedMaidPanelListViewer.Show<MaidPlate>(EmpireLifeModeAPI.GetEnabledPersonalListOfRecollection().Count, delegate(int index, MaidPlate maidPlate)
  974. {
  975. if (EmpireLifeModeAPI.GetEnabledPersonalListOfRecollection().Count <= index)
  976. {
  977. maidPlate.gameObject.SetActive(false);
  978. }
  979. else
  980. {
  981. maidPlate.gameObject.SetActive(true);
  982. }
  983. maidPlate.SetEmpty();
  984. UIButton uibutton = UTY.GetChildObject(maidPlate.gameObject, "Button", false).AddComponent<UIButton>();
  985. EventDelegate.Add(uibutton.onClick, delegate()
  986. {
  987. if (maidPlate.maid != null)
  988. {
  989. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  990. this.chara_select_mgr_.SetSelectStateMaid(maidPlate.maid, false);
  991. }
  992. });
  993. maidPlate.GetComponentInChildren<Collider>().enabled = false;
  994. maidPlate.GetComponentInChildren<UIButton>().defaultColor = new Color(0f, 0f, 0f, 0.5f);
  995. maidPlate.GetComponentInChildren<UIPlayAnimation>().enabled = false;
  996. });
  997. this.m_SelectedMaidPanelButtonAutoSelect.gameObject.SetActive(false);
  998. EventDelegate.Add(this.m_SelectedMaidPanelButtonAllRelease.onClick, new EventDelegate.Callback(this.OnClickButtonMaidAllRelease));
  999. }
  1000. private void UpdateSelectedMaidPanelOfLifeModeRecollection(Maid[] nowMaidSelectState)
  1001. {
  1002. bool flag = false;
  1003. int num = 0;
  1004. while (num < nowMaidSelectState.Length && num < this.m_SelectedMaidPanelListViewer.ItemArray.Length)
  1005. {
  1006. GameObject gameObject = this.m_SelectedMaidPanelListViewer.ItemArray[num];
  1007. MaidPlate component = gameObject.GetComponent<MaidPlate>();
  1008. UIButton componentInChildren = gameObject.GetComponentInChildren<UIButton>();
  1009. Maid maid = nowMaidSelectState[num];
  1010. component.GetComponentInChildren<Collider>().enabled = (maid != null);
  1011. componentInChildren.defaultColor = ((!(maid != null)) ? new Color(0f, 0f, 0f, 0.5f) : new Color(0f, 0f, 0f, 0f));
  1012. if (maid == null)
  1013. {
  1014. component.SetEmpty();
  1015. component.transform.SetAsLastSibling();
  1016. flag = true;
  1017. }
  1018. if (!gameObject.activeSelf)
  1019. {
  1020. gameObject.SetActive(true);
  1021. component.transform.SetAsLastSibling();
  1022. flag = true;
  1023. }
  1024. if (maid != component.maid)
  1025. {
  1026. component.SetMaidData(maid);
  1027. component.transform.SetAsLastSibling();
  1028. flag = true;
  1029. }
  1030. num++;
  1031. }
  1032. if (flag)
  1033. {
  1034. this.m_SelectedMaidPanelGrid.Reposition();
  1035. }
  1036. foreach (Transform transform in this.chara_select_mgr_.MaidPlateParentGrid.GetChildList())
  1037. {
  1038. MaidPlate component2 = transform.GetComponent<MaidPlate>();
  1039. if (component2.maid != null && this.loaded_check_maid_.Contains(component2.maid))
  1040. {
  1041. this.chara_select_mgr_.MoveNoDrawArea(component2.maid);
  1042. }
  1043. }
  1044. foreach (MaidPlate maidPlate in this.chara_select_mgr_.NoDrawArea.GetComponentsInChildren<MaidPlate>())
  1045. {
  1046. if (maidPlate.maid != null && !this.loaded_check_maid_.Contains(maidPlate.maid))
  1047. {
  1048. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  1049. }
  1050. }
  1051. List<string> list = new List<string>();
  1052. foreach (Maid maid2 in nowMaidSelectState)
  1053. {
  1054. if (maid2 != null && !list.Contains(maid2.status.personal.uniqueName))
  1055. {
  1056. list.Add(maid2.status.personal.uniqueName);
  1057. }
  1058. }
  1059. foreach (Transform transform2 in this.chara_select_mgr_.MaidPlateParentGrid.GetChildList())
  1060. {
  1061. MaidPlate component3 = transform2.GetComponent<MaidPlate>();
  1062. UIButton componentInChildren2 = component3.GetComponentInChildren<UIButton>(true);
  1063. bool flag2 = true;
  1064. if (component3.maid == null || list.Contains(component3.maid.status.personal.uniqueName))
  1065. {
  1066. flag2 = false;
  1067. }
  1068. componentInChildren2.defaultColor = ((!flag2) ? new Color(0f, 0f, 0f, 0.5f) : new Color(0f, 0f, 0f, 0f));
  1069. componentInChildren2.gameObject.SetActive(flag2);
  1070. }
  1071. }
  1072. private SceneCharacterSelect scene_chara_select_;
  1073. private Maid select_maid_;
  1074. private CharacterMgr chara_mgr_;
  1075. private CharacterSelectManager chara_select_mgr_;
  1076. private Dictionary<string, UIButton> button_dic_ = new Dictionary<string, UIButton>();
  1077. private List<Maid> loaded_check_maid_ = new List<Maid>();
  1078. private UILabel explanatory_label_;
  1079. private string cancel_call_label_ = string.Empty;
  1080. private int wait_count_;
  1081. private bool auto_select_;
  1082. private FFNameDialog ovr_dance_cam_dlg_;
  1083. private GameObject m_SelectedMaidPanelParent;
  1084. private UIGrid m_SelectedMaidPanelGrid;
  1085. private uGUIListViewer m_SelectedMaidPanelListViewer;
  1086. private UIButton m_SelectedMaidPanelButtonAutoSelect;
  1087. private UIButton m_SelectedMaidPanelButtonAllRelease;
  1088. [CompilerGenerated]
  1089. private static CharacterSelectManager.CallBackMaidList <>f__mg$cache0;
  1090. [CompilerGenerated]
  1091. private static CharacterSelectManager.CallBackMaidList <>f__mg$cache1;
  1092. }