CharacterSelectMain.cs 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134
  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.VBA ? "メイドを選択してください。" : "夜伽を行うメイドを選択してください。");
  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. GameMain.Instance.SysDlg.ShowFromLanguageTerm(messageTerm, null, SystemDialog.TYPE.OK_CANCEL, delegate
  665. {
  666. GameMain.Instance.SysDlg.Close();
  667. this.select_maid_ = null;
  668. this.scene_chara_select_.move_screen.SetNextLabel(this.cancel_call_label_);
  669. this.Finish();
  670. }, null);
  671. }
  672. else
  673. {
  674. this.select_maid_ = null;
  675. this.scene_chara_select_.move_screen.SetNextLabel(this.cancel_call_label_);
  676. this.Finish();
  677. }
  678. }
  679. }
  680. private void OnOvrCamFree()
  681. {
  682. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 0);
  683. this.Finish();
  684. }
  685. private void OnOvrCamMove()
  686. {
  687. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 1);
  688. this.Finish();
  689. }
  690. public override bool Finish()
  691. {
  692. bool flag = base.Finish();
  693. if (flag && 0 < this.loaded_check_maid_.Count)
  694. {
  695. GameMain.Instance.SoundMgr.StopBGM(1.5f);
  696. }
  697. return flag;
  698. }
  699. protected override void OnFinish()
  700. {
  701. this.button_dic_["Cancel"].gameObject.SetActive(false);
  702. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Communication && this.select_maid_ != null)
  703. {
  704. int noonWorkId = this.select_maid_.status.noonWorkId;
  705. this.loaded_check_maid_.Add(this.select_maid_);
  706. ScheduleData[] scheduleSlot = GameMain.Instance.CharacterMgr.status.scheduleSlot;
  707. for (int i = 0; i < scheduleSlot.Length; i++)
  708. {
  709. if (scheduleSlot[i].maid_guid == this.select_maid_.status.guid)
  710. {
  711. scheduleSlot[i].noon_communication = true;
  712. break;
  713. }
  714. }
  715. if (noonWorkId == ScheduleAPI.GetNoonTrainerWorkId())
  716. {
  717. Maid noonTraineeMaid = ScheduleAPI.GetNoonTraineeMaid();
  718. NDebug.Assert(noonTraineeMaid != null, "研修生を特定できませんでした");
  719. this.loaded_check_maid_.Add(noonTraineeMaid);
  720. }
  721. else if (noonWorkId == ScheduleAPI.GetTraineeWorkId())
  722. {
  723. Maid noonTrainerMaid = ScheduleAPI.GetNoonTrainerMaid();
  724. NDebug.Assert(noonTrainerMaid != null, "研修官を特定できませんでした");
  725. this.loaded_check_maid_.Add(noonTrainerMaid);
  726. }
  727. }
  728. 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)
  729. {
  730. if (this.select_maid_ != null)
  731. {
  732. this.loaded_check_maid_.Add(this.select_maid_);
  733. SceneCharacterSelect.chara_guid_stock_list.Remove(this.select_maid_.status.guid);
  734. }
  735. else
  736. {
  737. SceneCharacterSelect.chara_guid_stock_list.Clear();
  738. }
  739. }
  740. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.CompetitiveShow)
  741. {
  742. CompetitiveShowMgr.check_maid_list.Clear();
  743. SceneCharacterSelect.select_maid_list.Clear();
  744. for (int j = 0; j < this.loaded_check_maid_.Count; j++)
  745. {
  746. SceneCharacterSelect.select_maid_list.Add(this.loaded_check_maid_[j]);
  747. }
  748. this.loaded_check_maid_.Clear();
  749. }
  750. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.TouchCharaSelect && this.select_maid_ != null)
  751. {
  752. this.loaded_check_maid_.Add(this.select_maid_);
  753. }
  754. if ((this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRComSelect || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRKaraokeSelect) && 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.Additional)
  759. {
  760. this.chara_mgr_.SetActiveMaid(this.select_maid_, this.scene_chara_select_.select_maid_slot);
  761. }
  762. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.LifeMode)
  763. {
  764. NDebug.Assert(this.loaded_check_maid_.Count > 0);
  765. GameMain.Instance.LifeModeMgr.SetAllMaidList(this.loaded_check_maid_);
  766. this.loaded_check_maid_.Clear();
  767. }
  768. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.LifeModeRecollection)
  769. {
  770. GameMain.Instance.LifeModeMgr.SetAllMaidList(this.loaded_check_maid_);
  771. this.loaded_check_maid_.Clear();
  772. }
  773. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.NewYotogiAdditional)
  774. {
  775. this.loaded_check_maid_.Clear();
  776. this.loaded_check_maid_.Add(this.select_maid_);
  777. this.chara_mgr_.SetActiveMaid(this.loaded_check_maid_[0], 1);
  778. this.loaded_check_maid_[0].Visible = true;
  779. this.loaded_check_maid_[0].AllProcPropSeqStart();
  780. }
  781. else
  782. {
  783. for (int k = 0; k < this.loaded_check_maid_.Count; k++)
  784. {
  785. this.chara_mgr_.SetActiveMaid(this.loaded_check_maid_[k], k);
  786. this.loaded_check_maid_[k].Visible = true;
  787. this.loaded_check_maid_[k].AllProcPropSeqStart();
  788. }
  789. }
  790. GameMain.Instance.LoadIcon.NextLoadIcontImmediatelyDisplay();
  791. if (this.loaded_check_maid_.Count == 0)
  792. {
  793. base.parent_mgr.CallScreen("Move");
  794. }
  795. }
  796. protected override void OnFadeEnd()
  797. {
  798. if (this.loaded_check_maid_.Count == 0)
  799. {
  800. return;
  801. }
  802. bool flag = true;
  803. for (int i = 0; i < this.loaded_check_maid_.Count; i++)
  804. {
  805. if (this.loaded_check_maid_[i].IsBusy)
  806. {
  807. flag = false;
  808. break;
  809. }
  810. }
  811. if (flag)
  812. {
  813. base.parent_mgr.CallScreen("Move");
  814. this.loaded_check_maid_.Clear();
  815. }
  816. }
  817. private void InitSelectedMaidPanelUI()
  818. {
  819. this.m_SelectedMaidPanelParent = UTY.GetChildObject(base.root_obj, "SelectedMaidParent", false);
  820. this.m_SelectedMaidPanelGrid = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/Grid", false).GetComponent<UIGrid>();
  821. this.m_SelectedMaidPanelListViewer = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/Grid", false).GetComponent<uGUIListViewer>();
  822. this.m_SelectedMaidPanelButtonAutoSelect = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/parent buttons/auto select", false).GetComponent<UIButton>();
  823. this.m_SelectedMaidPanelButtonAllRelease = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/parent buttons/all release", false).GetComponent<UIButton>();
  824. NDebug.AssertNull(this.m_SelectedMaidPanelGrid);
  825. NDebug.AssertNull(this.m_SelectedMaidPanelListViewer);
  826. NDebug.AssertNull(this.m_SelectedMaidPanelButtonAutoSelect);
  827. NDebug.AssertNull(this.m_SelectedMaidPanelButtonAllRelease);
  828. this.m_SelectedMaidPanelParent.SetActive(false);
  829. }
  830. private void CreateSelectedMaidPanelOfLifeMode()
  831. {
  832. this.m_SelectedMaidPanelParent.SetActive(true);
  833. GameObject gameObject = Utility.CreatePrefab(this.m_SelectedMaidPanelGrid.gameObject, "CharacterSelect/Prefab/MaidPlateSimple", true);
  834. gameObject.SetActive(false);
  835. this.m_SelectedMaidPanelListViewer.tempItem = gameObject;
  836. this.m_SelectedMaidPanelListViewer.Show<MaidPlate>(21, delegate(int index, MaidPlate maidPlate)
  837. {
  838. if (EmpireLifeModeAPI.GetMaxMaidCount() <= index)
  839. {
  840. maidPlate.gameObject.SetActive(false);
  841. }
  842. else
  843. {
  844. maidPlate.gameObject.SetActive(true);
  845. }
  846. maidPlate.SetEmpty();
  847. UIButton uibutton = UTY.GetChildObject(maidPlate.gameObject, "Button", false).AddComponent<UIButton>();
  848. EventDelegate.Add(uibutton.onClick, delegate()
  849. {
  850. if (maidPlate.maid != null)
  851. {
  852. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  853. this.chara_select_mgr_.SetSelectStateMaid(maidPlate.maid, false);
  854. }
  855. });
  856. maidPlate.GetComponentInChildren<Collider>().enabled = false;
  857. maidPlate.GetComponentInChildren<UIButton>().defaultColor = new Color(0f, 0f, 0f, 0.5f);
  858. maidPlate.GetComponentInChildren<UIPlayAnimation>().enabled = false;
  859. });
  860. EventDelegate.Add(this.m_SelectedMaidPanelButtonAutoSelect.onClick, new EventDelegate.Callback(this.OnClickButtonMaidAutoSelect));
  861. EventDelegate.Add(this.m_SelectedMaidPanelButtonAllRelease.onClick, new EventDelegate.Callback(this.OnClickButtonMaidAllRelease));
  862. }
  863. private void UpdateSelectedMaidPanelOfLifeMode(Maid[] nowMaidSelectState)
  864. {
  865. bool flag = false;
  866. int num = 0;
  867. while (num < nowMaidSelectState.Length && num < this.m_SelectedMaidPanelListViewer.ItemArray.Length)
  868. {
  869. GameObject gameObject = this.m_SelectedMaidPanelListViewer.ItemArray[num];
  870. MaidPlate component = gameObject.GetComponent<MaidPlate>();
  871. UIButton componentInChildren = gameObject.GetComponentInChildren<UIButton>();
  872. Maid maid = nowMaidSelectState[num];
  873. component.GetComponentInChildren<Collider>().enabled = (maid != null);
  874. componentInChildren.defaultColor = ((!(maid != null)) ? new Color(0f, 0f, 0f, 0.5f) : new Color(0f, 0f, 0f, 0f));
  875. if (maid == null)
  876. {
  877. component.SetEmpty();
  878. component.transform.SetAsLastSibling();
  879. flag = true;
  880. }
  881. if (!gameObject.activeSelf)
  882. {
  883. gameObject.SetActive(true);
  884. component.transform.SetAsLastSibling();
  885. flag = true;
  886. }
  887. if (maid != component.maid)
  888. {
  889. component.SetMaidData(maid);
  890. component.transform.SetAsLastSibling();
  891. flag = true;
  892. }
  893. num++;
  894. }
  895. if (flag)
  896. {
  897. this.m_SelectedMaidPanelGrid.Reposition();
  898. }
  899. foreach (Transform transform in this.chara_select_mgr_.MaidPlateParentGrid.GetChildList())
  900. {
  901. MaidPlate component2 = transform.GetComponent<MaidPlate>();
  902. if (component2.maid != null && this.loaded_check_maid_.Contains(component2.maid))
  903. {
  904. this.chara_select_mgr_.MoveNoDrawArea(component2.maid);
  905. }
  906. }
  907. foreach (MaidPlate maidPlate in this.chara_select_mgr_.NoDrawArea.GetComponentsInChildren<MaidPlate>())
  908. {
  909. if (maidPlate.maid != null && !this.loaded_check_maid_.Contains(maidPlate.maid))
  910. {
  911. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  912. }
  913. }
  914. }
  915. private void OnClickButtonMaidAutoSelect()
  916. {
  917. int num = 0;
  918. List<Maid> list = new List<Maid>();
  919. List<MaidPlate> list2 = new List<MaidPlate>();
  920. int num2 = 0;
  921. while (num2 < this.m_SelectedMaidPanelListViewer.ItemArray.Length && num2 < this.chara_select_mgr_.select_max)
  922. {
  923. GameObject gameObject = this.m_SelectedMaidPanelListViewer.ItemArray[num2];
  924. MaidPlate component = gameObject.GetComponent<MaidPlate>();
  925. if (component.maid == null)
  926. {
  927. num++;
  928. }
  929. else
  930. {
  931. list.Add(component.maid);
  932. }
  933. num2++;
  934. }
  935. List<Transform> childList = this.chara_select_mgr_.MaidPlateParentGrid.GetChildList();
  936. for (int i = 0; i < childList.Count; i++)
  937. {
  938. MaidPlate component2 = childList[i].GetComponent<MaidPlate>();
  939. if (!list.Contains(component2.maid))
  940. {
  941. list2.Add(component2);
  942. }
  943. }
  944. foreach (MaidPlate maidPlate in from maid in list2
  945. orderby UnityEngine.Random.Range(0, 10)
  946. select maid)
  947. {
  948. if (num-- <= 0)
  949. {
  950. break;
  951. }
  952. this.chara_select_mgr_.SetSelectStateMaid(maidPlate.maid, true);
  953. }
  954. }
  955. private void OnClickButtonMaidAllRelease()
  956. {
  957. foreach (MaidPlate maidPlate in this.chara_select_mgr_.NoDrawArea.GetComponentsInChildren<MaidPlate>())
  958. {
  959. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  960. }
  961. this.chara_select_mgr_.SelectAllReleaseMaid();
  962. }
  963. private void CreateSelectedMaidPanelOfLifeModeRecollection()
  964. {
  965. this.m_SelectedMaidPanelParent.SetActive(true);
  966. GameObject gameObject = Utility.CreatePrefab(this.m_SelectedMaidPanelGrid.gameObject, "CharacterSelect/Prefab/MaidPlateSimple", true);
  967. gameObject.SetActive(false);
  968. this.m_SelectedMaidPanelListViewer.tempItem = gameObject;
  969. this.m_SelectedMaidPanelListViewer.Show<MaidPlate>(EmpireLifeModeAPI.GetEnabledPersonalListOfRecollection().Count, delegate(int index, MaidPlate maidPlate)
  970. {
  971. if (EmpireLifeModeAPI.GetEnabledPersonalListOfRecollection().Count <= index)
  972. {
  973. maidPlate.gameObject.SetActive(false);
  974. }
  975. else
  976. {
  977. maidPlate.gameObject.SetActive(true);
  978. }
  979. maidPlate.SetEmpty();
  980. UIButton uibutton = UTY.GetChildObject(maidPlate.gameObject, "Button", false).AddComponent<UIButton>();
  981. EventDelegate.Add(uibutton.onClick, delegate()
  982. {
  983. if (maidPlate.maid != null)
  984. {
  985. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  986. this.chara_select_mgr_.SetSelectStateMaid(maidPlate.maid, false);
  987. }
  988. });
  989. maidPlate.GetComponentInChildren<Collider>().enabled = false;
  990. maidPlate.GetComponentInChildren<UIButton>().defaultColor = new Color(0f, 0f, 0f, 0.5f);
  991. maidPlate.GetComponentInChildren<UIPlayAnimation>().enabled = false;
  992. });
  993. this.m_SelectedMaidPanelButtonAutoSelect.gameObject.SetActive(false);
  994. EventDelegate.Add(this.m_SelectedMaidPanelButtonAllRelease.onClick, new EventDelegate.Callback(this.OnClickButtonMaidAllRelease));
  995. }
  996. private void UpdateSelectedMaidPanelOfLifeModeRecollection(Maid[] nowMaidSelectState)
  997. {
  998. bool flag = false;
  999. int num = 0;
  1000. while (num < nowMaidSelectState.Length && num < this.m_SelectedMaidPanelListViewer.ItemArray.Length)
  1001. {
  1002. GameObject gameObject = this.m_SelectedMaidPanelListViewer.ItemArray[num];
  1003. MaidPlate component = gameObject.GetComponent<MaidPlate>();
  1004. UIButton componentInChildren = gameObject.GetComponentInChildren<UIButton>();
  1005. Maid maid = nowMaidSelectState[num];
  1006. component.GetComponentInChildren<Collider>().enabled = (maid != null);
  1007. componentInChildren.defaultColor = ((!(maid != null)) ? new Color(0f, 0f, 0f, 0.5f) : new Color(0f, 0f, 0f, 0f));
  1008. if (maid == null)
  1009. {
  1010. component.SetEmpty();
  1011. component.transform.SetAsLastSibling();
  1012. flag = true;
  1013. }
  1014. if (!gameObject.activeSelf)
  1015. {
  1016. gameObject.SetActive(true);
  1017. component.transform.SetAsLastSibling();
  1018. flag = true;
  1019. }
  1020. if (maid != component.maid)
  1021. {
  1022. component.SetMaidData(maid);
  1023. component.transform.SetAsLastSibling();
  1024. flag = true;
  1025. }
  1026. num++;
  1027. }
  1028. if (flag)
  1029. {
  1030. this.m_SelectedMaidPanelGrid.Reposition();
  1031. }
  1032. foreach (Transform transform in this.chara_select_mgr_.MaidPlateParentGrid.GetChildList())
  1033. {
  1034. MaidPlate component2 = transform.GetComponent<MaidPlate>();
  1035. if (component2.maid != null && this.loaded_check_maid_.Contains(component2.maid))
  1036. {
  1037. this.chara_select_mgr_.MoveNoDrawArea(component2.maid);
  1038. }
  1039. }
  1040. foreach (MaidPlate maidPlate in this.chara_select_mgr_.NoDrawArea.GetComponentsInChildren<MaidPlate>())
  1041. {
  1042. if (maidPlate.maid != null && !this.loaded_check_maid_.Contains(maidPlate.maid))
  1043. {
  1044. this.chara_select_mgr_.MoveGridArea(maidPlate.maid);
  1045. }
  1046. }
  1047. List<string> list = new List<string>();
  1048. foreach (Maid maid2 in nowMaidSelectState)
  1049. {
  1050. if (maid2 != null && !list.Contains(maid2.status.personal.uniqueName))
  1051. {
  1052. list.Add(maid2.status.personal.uniqueName);
  1053. }
  1054. }
  1055. foreach (Transform transform2 in this.chara_select_mgr_.MaidPlateParentGrid.GetChildList())
  1056. {
  1057. MaidPlate component3 = transform2.GetComponent<MaidPlate>();
  1058. UIButton componentInChildren2 = component3.GetComponentInChildren<UIButton>(true);
  1059. bool flag2 = true;
  1060. if (component3.maid == null || list.Contains(component3.maid.status.personal.uniqueName))
  1061. {
  1062. flag2 = false;
  1063. }
  1064. componentInChildren2.defaultColor = ((!flag2) ? new Color(0f, 0f, 0f, 0.5f) : new Color(0f, 0f, 0f, 0f));
  1065. componentInChildren2.gameObject.SetActive(flag2);
  1066. }
  1067. }
  1068. private SceneCharacterSelect scene_chara_select_;
  1069. private Maid select_maid_;
  1070. private CharacterMgr chara_mgr_;
  1071. private CharacterSelectManager chara_select_mgr_;
  1072. private Dictionary<string, UIButton> button_dic_ = new Dictionary<string, UIButton>();
  1073. private List<Maid> loaded_check_maid_ = new List<Maid>();
  1074. private UILabel explanatory_label_;
  1075. private string cancel_call_label_ = string.Empty;
  1076. private int wait_count_;
  1077. private bool auto_select_;
  1078. private FFNameDialog ovr_dance_cam_dlg_;
  1079. private GameObject m_SelectedMaidPanelParent;
  1080. private UIGrid m_SelectedMaidPanelGrid;
  1081. private uGUIListViewer m_SelectedMaidPanelListViewer;
  1082. private UIButton m_SelectedMaidPanelButtonAutoSelect;
  1083. private UIButton m_SelectedMaidPanelButtonAllRelease;
  1084. [CompilerGenerated]
  1085. private static CharacterSelectManager.CallBackMaidList <>f__mg$cache0;
  1086. [CompilerGenerated]
  1087. private static CharacterSelectManager.CallBackMaidList <>f__mg$cache1;
  1088. }