MaidManagementMain.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  1. using System;
  2. using System.Collections.Generic;
  3. using com.workman.cm3d2.scene.dailyEtc;
  4. using MaidStatus;
  5. using PlayerStatus;
  6. using UnityEngine;
  7. using wf;
  8. public class MaidManagementMain : WfScreenChildren
  9. {
  10. public override void Awake()
  11. {
  12. base.Awake();
  13. this.mainUIFade = base.root_obj.GetComponent<WfFadeBehaviour>();
  14. NDebug.AssertNull(this.mainUIFade);
  15. this.status_mgr_ = base.root_obj.GetComponent<CharaSelectStatusMgr>();
  16. this.status_mgr_.Init();
  17. this.status_mgr_.BaseInit();
  18. this.yotogi_info_object_ = UTY.GetChildObject(base.root_obj, "YotogiInfo", false);
  19. this.yotogi_info_object_.SetActive(true);
  20. UIWFTabPanel componentInChildren = this.yotogi_info_object_.GetComponentInChildren<UIWFTabPanel>();
  21. UIWFTabButton[] componentsInChildren = componentInChildren.GetComponentsInChildren<UIWFTabButton>();
  22. foreach (UIWFTabButton uiwftabButton in componentsInChildren)
  23. {
  24. EventDelegate.Add(uiwftabButton.onSelect, new EventDelegate.Callback(this.OnClickYotogiInfoTab));
  25. }
  26. this.yotogi_skill_list_mgr_ = UTY.GetChildObject(this.yotogi_info_object_, "YotogiSkillList", false).GetComponent<YotogiSkillListManager>();
  27. this.yotogi_class_list_mgr_ = UTY.GetChildObject(this.yotogi_info_object_, "YotogiClassList", false).GetComponent<YotogiClassListManager>();
  28. this.status_panel_ = UTY.GetChildObject(base.root_obj, "StatusPanel", false);
  29. this.class_change_panel_ = UTY.GetChildObject(base.root_obj, "ClassChangePanel", false).GetComponent<ClassChangePanel>();
  30. if (!this.class_change_panel_.gameObject.activeSelf)
  31. {
  32. this.class_change_panel_.gameObject.SetActive(true);
  33. }
  34. this.parent_grid_ = UTY.GetChildObject(base.root_obj, "ButtonParent/Tower/Grid", false).GetComponent<UIGrid>();
  35. this.button_dic_.Add("雇用", UTY.GetChildObject(this.parent_grid_.gameObject, "雇用", false).GetComponent<UIButton>());
  36. this.button_dic_.Add("移籍", UTY.GetChildObject(this.parent_grid_.gameObject, "移籍", false).GetComponent<UIButton>());
  37. this.button_dic_.Add("解雇", UTY.GetChildObject(this.parent_grid_.gameObject, "解雇", false).GetComponent<UIButton>());
  38. this.button_dic_.Add("メイド長", UTY.GetChildObject(this.parent_grid_.gameObject, "メイド長", false).GetComponent<UIButton>());
  39. this.button_dic_.Add("エディット", UTY.GetChildObject(this.parent_grid_.gameObject, "エディット", false).GetComponent<UIButton>());
  40. this.button_dic_.Add("ランキング", UTY.GetChildObject(this.parent_grid_.gameObject, "ランキング", false).GetComponent<UIButton>());
  41. this.button_dic_.Add("クラス変更", UTY.GetChildObject(this.parent_grid_.gameObject, "クラス変更", false).GetComponent<UIButton>());
  42. this.button_dic_.Add("夜伽スキル", UTY.GetChildObject(this.parent_grid_.gameObject, "夜伽スキル", false).GetComponent<UIButton>());
  43. this.button_dic_.Add("ステータス", UTY.GetChildObject(base.root_obj, "ButtonParent/Tower/ステータス", false).GetComponent<UIButton>());
  44. this.button_dic_.Add("View", UTY.GetChildObject(base.root_obj, "ButtonParent/View", false).GetComponent<UIButton>());
  45. this.button_dic_.Add("Cancel", UTY.GetChildObject(base.root_obj, "ButtonParent/Cancel", false).GetComponent<UIButton>());
  46. foreach (KeyValuePair<string, UIButton> keyValuePair in this.button_dic_)
  47. {
  48. EventDelegate.Add(keyValuePair.Value.onClick, new EventDelegate.Callback(this.OnClickButton));
  49. }
  50. this.chara_select_mgr_ = UTY.GetChildObject(base.root_obj, "CharacterSelectPanel", false).GetComponent<CharacterSelectManager>();
  51. this.employmentSelectUIFade.GetComponent<UIPanel>().alpha = 0f;
  52. if (MaidManagement.compatibilityMode)
  53. {
  54. base.root_obj.transform.localPosition = new Vector3(-340f, 404f, 0f);
  55. this.button_dic_["Cancel"].transform.localPosition = new Vector3(1231f, -877f, 0f);
  56. }
  57. }
  58. protected override void OnCall()
  59. {
  60. GameMain.Instance.SysShortcut.strSceneHelpName = "SceneMaidManagement";
  61. uGUITutorialPanel.OpenTutorial("SceneMaidManagement", null, false);
  62. this.chara_mgr_ = GameMain.Instance.CharacterMgr;
  63. base.SetCallInFadeWaitFrame(2);
  64. this.is_night_ = !this.chara_mgr_.status.isDaytime;
  65. this.status_mgr_.SetDurationToFadeIn(0.2f);
  66. this.status_mgr_.SetDurationToFadeOut(0.2f);
  67. PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
  68. GameMain.Instance.MainLight.Reset();
  69. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  70. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  71. GameMain.Instance.SoundMgr.VoiceStopAll();
  72. if (!this.is_night_)
  73. {
  74. GameMain.Instance.SoundMgr.PlayBGM(DailyAPI.dayBgm, 0.5f, true);
  75. GameMain.Instance.BgMgr.ChangeBg(DailyAPI.dayBg);
  76. }
  77. else
  78. {
  79. GameMain.Instance.SoundMgr.PlayBGM(DailyAPI.nightBgm, 0.5f, true);
  80. GameMain.Instance.BgMgr.ChangeBg(DailyAPI.nightBg);
  81. }
  82. this.button_dic_["雇用"].gameObject.SetActive(status.isAvailableEmploymentAndBanishment);
  83. this.button_dic_["移籍"].gameObject.SetActive(this.isLegacy);
  84. this.button_dic_["解雇"].gameObject.SetActive(status.isAvailableEmploymentAndBanishment);
  85. this.button_dic_["クラス変更"].gameObject.SetActive(status.isAvailableClassChange);
  86. this.button_dic_["ランキング"].gameObject.SetActive(status.isAvailableRanking);
  87. UIWFTabPanel componentInChildren = this.yotogi_info_object_.GetComponentInChildren<UIWFTabPanel>();
  88. componentInChildren.Select(componentInChildren.GetComponentsInChildren<UIWFTabButton>(true)[0]);
  89. this.yotogi_info_object_.SetActive(false);
  90. this.VisibleClassChangePanel(false);
  91. this.parent_grid_.repositionNow = true;
  92. this.select_maid_ = null;
  93. for (int i = 0; i < this.chara_mgr_.GetStockMaidCount(); i++)
  94. {
  95. if (this.chara_mgr_.GetStockMaid(i).status.leader)
  96. {
  97. this.cur_maid_leader_ = this.chara_mgr_.GetStockMaid(i);
  98. break;
  99. }
  100. }
  101. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  102. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  103. {
  104. if (!MaidManagement.compatibilityMode)
  105. {
  106. CharacterSelectManager.DefaultMaidList(draw_maid_list);
  107. return;
  108. }
  109. List<Maid> list = new List<Maid>();
  110. CharacterSelectManager.DefaultMaidList(list);
  111. for (int k = 0; k < list.Count; k++)
  112. {
  113. if (list[k].status.isCompatiblePersonality)
  114. {
  115. draw_maid_list.Add(list[k]);
  116. }
  117. }
  118. });
  119. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  120. if (!string.IsNullOrEmpty(MaidManagementMain.BackUpSelectMaidGUID))
  121. {
  122. this.chara_select_mgr_.SelectMaid(this.chara_mgr_.GetStockMaid(MaidManagementMain.BackUpSelectMaidGUID));
  123. MaidManagementMain.BackUpSelectMaidGUID = string.Empty;
  124. if (1f <= MaidManagementMain.BackUpBarValue && this.chara_mgr_.GetStockMaidCount() <= 7)
  125. {
  126. this.chara_select_mgr_.scroll_bar.value = 0f;
  127. }
  128. else
  129. {
  130. this.chara_select_mgr_.scroll_bar.value = MaidManagementMain.BackUpBarValue;
  131. }
  132. MaidManagementMain.BackUpBarValue = 0f;
  133. if (MaidManagementMain.BackUpRightPanelVisible)
  134. {
  135. this.ChangeRankingMode();
  136. MaidManagementMain.BackUpRightPanelVisible = false;
  137. }
  138. }
  139. if (this.is_night_)
  140. {
  141. this.button_dic_["雇用"].gameObject.SetActive(false);
  142. this.button_dic_["移籍"].gameObject.SetActive(false);
  143. this.button_dic_["解雇"].gameObject.SetActive(false);
  144. this.button_dic_["メイド長"].gameObject.SetActive(false);
  145. }
  146. if (MaidManagement.compatibilityMode)
  147. {
  148. this.button_dic_["雇用"].gameObject.SetActive(false);
  149. this.button_dic_["移籍"].gameObject.SetActive(false);
  150. this.button_dic_["解雇"].gameObject.SetActive(false);
  151. this.button_dic_["メイド長"].gameObject.SetActive(false);
  152. this.button_dic_["ランキング"].gameObject.SetActive(false);
  153. }
  154. if (this.button_dic_["雇用"].isEnabled)
  155. {
  156. this.button_dic_["雇用"].isEnabled = (this.GetMaidNumber() < 200);
  157. }
  158. if (this.button_dic_["移籍"].gameObject.activeInHierarchy && this.button_dic_["移籍"].isEnabled)
  159. {
  160. this.button_dic_["移籍"].isEnabled = (GameMain.Instance.CharacterMgr.status.isAvailableTransfer && this.GetMaidNumber() < 200);
  161. }
  162. for (int j = 0; j < this.chara_mgr_.GetMaidCount(); j++)
  163. {
  164. if (this.chara_mgr_.GetMaid(j) != null)
  165. {
  166. this.chara_mgr_.GetMaid(j).Visible = false;
  167. }
  168. }
  169. }
  170. public void SetMaidManagement(MaidManagement maid_management, string edit_label, string new_edit_label, string transfer_label)
  171. {
  172. this.maid_management_ = maid_management;
  173. this.edit_label_ = edit_label;
  174. this.new_edit_label_ = new_edit_label;
  175. this.transfer_label_ = transfer_label;
  176. }
  177. private void OnSelectChara(Maid select_maid)
  178. {
  179. this.select_maid_ = select_maid;
  180. if (this.select_maid_.status.heroineType == HeroineType.Sub)
  181. {
  182. this.button_dic_["エディット"].isEnabled = this.select_maid_.status.subCharaData.isEditPossible;
  183. this.button_dic_["メイド長"].isEnabled = false;
  184. this.button_dic_["クラス変更"].isEnabled = false;
  185. this.button_dic_["解雇"].isEnabled = false;
  186. this.button_dic_["夜伽スキル"].isEnabled = false;
  187. this.VisibleClassChangePanel(false);
  188. this.VisibleYotogiSkillList(false);
  189. if (this.status_panel_.activeSelf)
  190. {
  191. this.chara_select_mgr_.big_thumbnail.Visible = false;
  192. }
  193. }
  194. else
  195. {
  196. if (this.select_maid_.status.leader || this.select_maid_.status.contract == Contract.Trainee || this.select_maid_.status.heroineType == HeroineType.Transfer)
  197. {
  198. this.button_dic_["メイド長"].isEnabled = false;
  199. }
  200. else
  201. {
  202. this.button_dic_["メイド長"].isEnabled = true;
  203. }
  204. if (this.button_dic_["クラス変更"].gameObject.activeSelf)
  205. {
  206. this.button_dic_["クラス変更"].isEnabled = true;
  207. }
  208. if (this.select_maid_.status.leader || this.select_maid_.status.mainChara)
  209. {
  210. this.button_dic_["解雇"].isEnabled = false;
  211. }
  212. else
  213. {
  214. this.button_dic_["解雇"].isEnabled = true;
  215. }
  216. this.button_dic_["夜伽スキル"].isEnabled = true;
  217. }
  218. this.class_change_panel_.SetTargetMaid(select_maid);
  219. if (this.status_panel_.activeSelf)
  220. {
  221. this.status_mgr_.UpdateMaidStatus(select_maid);
  222. }
  223. if (this.yotogi_info_object_.activeSelf)
  224. {
  225. this.yotogi_skill_list_mgr_.CreateData(this.select_maid_);
  226. this.yotogi_class_list_mgr_.CreateData(this.select_maid_);
  227. }
  228. }
  229. private void OnClickButton()
  230. {
  231. string text = string.Empty;
  232. foreach (KeyValuePair<string, UIButton> keyValuePair in this.button_dic_)
  233. {
  234. if (keyValuePair.Value == UIButton.current)
  235. {
  236. text = keyValuePair.Key;
  237. break;
  238. }
  239. }
  240. if (string.IsNullOrEmpty(text))
  241. {
  242. return;
  243. }
  244. if (text == "雇用")
  245. {
  246. this.OnClickEmploymentButton();
  247. }
  248. else if (text == "移籍")
  249. {
  250. WfFadeJob.Create(this.employmentSelectUIFade, null, 0f, iTween.EaseType.easeOutSine);
  251. this.OnClickTransferButton();
  252. }
  253. else if (text == "解雇" && this.select_maid_ != null && 2 <= this.chara_mgr_.GetStockMaidCount() && !this.select_maid_.status.leader)
  254. {
  255. int banishmentPrice = this.select_maid_.status.banishmentPrice;
  256. string f_strMsg = this.select_maid_.status.fullNameJpStyle + "\nを解雇しますか?\n資金 +" + Utility.ConvertMoneyText(banishmentPrice) + "CR";
  257. GameMain.Instance.SysDlg.Show(f_strMsg, SystemDialog.TYPE.OK_CANCEL, new SystemDialog.OnClick(this.BanishmentMaid), null);
  258. }
  259. else
  260. {
  261. if (text == "メイド長" && this.select_maid_ != null)
  262. {
  263. if (!this.select_maid_.status.leader)
  264. {
  265. if (this.cur_maid_leader_ != null)
  266. {
  267. this.cur_maid_leader_.status.leader = false;
  268. this.chara_select_mgr_.UpdateMaidPlate(this.cur_maid_leader_);
  269. }
  270. this.select_maid_.status.leader = true;
  271. this.chara_select_mgr_.UpdateMaidPlate(this.select_maid_);
  272. this.cur_maid_leader_ = this.select_maid_;
  273. this.button_dic_["メイド長"].isEnabled = !this.select_maid_.status.leader;
  274. this.button_dic_["解雇"].isEnabled = !this.select_maid_.status.leader;
  275. this.chara_select_mgr_.scroll_view.ResetPosition();
  276. this.chara_select_mgr_.Reposition();
  277. }
  278. return;
  279. }
  280. if (text == "ランキング")
  281. {
  282. this.ChangeRankingMode();
  283. }
  284. else if (text == "クラス変更")
  285. {
  286. this.VisibleClassChangePanel(!this.class_change_panel_.gameObject.activeSelf);
  287. }
  288. else if (text == "エディット" && this.select_maid_ != null)
  289. {
  290. if (string.IsNullOrEmpty(this.edit_label_))
  291. {
  292. return;
  293. }
  294. this.chara_mgr_.SetActiveMaid(this.select_maid_, 0);
  295. MaidManagementMain.BackUpSelectMaidGUID = this.select_maid_.status.guid;
  296. MaidManagementMain.BackUpBarValue = this.chara_select_mgr_.scroll_bar.value;
  297. MaidManagementMain.BackUpRightPanelVisible = this.chara_select_mgr_.IsRightVisible();
  298. this.maid_management_.move_screen.SetNextLabel(this.edit_label_);
  299. this.Finish();
  300. }
  301. else if (text == "夜伽スキル" && this.select_maid_ != null)
  302. {
  303. this.yotogi_skill_list_mgr_.CreateData(this.select_maid_);
  304. this.yotogi_class_list_mgr_.CreateData(this.select_maid_);
  305. this.VisibleYotogiSkillList(!this.yotogi_info_object_.activeSelf);
  306. }
  307. else if (text == "ステータス" && this.select_maid_ != null)
  308. {
  309. this.status_mgr_.UpdateMaidStatus(this.select_maid_);
  310. this.VisibleStatusPanel(!this.status_panel_.activeSelf);
  311. }
  312. else if (text == "Cancel")
  313. {
  314. this.Finish();
  315. }
  316. }
  317. }
  318. public void OnClickEmploymentButton()
  319. {
  320. if (string.IsNullOrEmpty(this.new_edit_label_))
  321. {
  322. return;
  323. }
  324. int num = this.employmentPrice;
  325. if (this.chara_mgr_.status.money - (long)num < 0L)
  326. {
  327. string f_strMsg = "新しいメイドを雇用するには\n" + Utility.ConvertMoneyText(num) + "CRが必要です。";
  328. GameMain.Instance.SysDlg.Show(f_strMsg, SystemDialog.TYPE.OK, null, null);
  329. }
  330. else
  331. {
  332. string f_strMsg2 = "新しいメイドを雇用しますか?\n資金 -" + Utility.ConvertMoneyText(num) + "CR";
  333. GameMain.Instance.SysDlg.Show(f_strMsg2, SystemDialog.TYPE.OK_CANCEL, new SystemDialog.OnClick(this.Employment), null);
  334. }
  335. }
  336. public void OnClickTransferButton()
  337. {
  338. if (string.IsNullOrEmpty(this.transfer_label_))
  339. {
  340. return;
  341. }
  342. int num = this.transferPrice;
  343. if (this.chara_mgr_.status.money - (long)num < 0L)
  344. {
  345. string f_strMsg = "メイドを移籍するには\n" + Utility.ConvertMoneyText(num) + "CRが必要です。";
  346. GameMain.Instance.SysDlg.Show(f_strMsg, SystemDialog.TYPE.OK, null, null);
  347. }
  348. else
  349. {
  350. string f_strMsg2 = "メイドを移籍しますか?\n資金 -" + Utility.ConvertMoneyText(num) + "CR";
  351. GameMain.Instance.SysDlg.Show(f_strMsg2, SystemDialog.TYPE.OK_CANCEL, delegate
  352. {
  353. GameMain.Instance.SysDlg.Close();
  354. this.transferMain.Call(delegate
  355. {
  356. WfFadeJob.Create(null, this.employmentSelectUIFade, 0f, iTween.EaseType.easeOutSine);
  357. });
  358. }, null);
  359. }
  360. }
  361. public void OnClickEmploymentSelectCancel()
  362. {
  363. if (UIButton.current != null)
  364. {
  365. UIButton.current.SetState(UIButtonColor.State.Normal, true);
  366. }
  367. WfFadeJob.Create(null, this.employmentSelectUIFade, 0.3f, iTween.EaseType.easeOutSine);
  368. }
  369. private void OnClickYotogiInfoTab()
  370. {
  371. if (!UIWFSelectButton.current.isSelected)
  372. {
  373. return;
  374. }
  375. if (UIWFSelectButton.current.name.ToLower() == "class")
  376. {
  377. this.yotogi_skill_list_mgr_.gameObject.SetActive(false);
  378. this.yotogi_class_list_mgr_.gameObject.SetActive(true);
  379. }
  380. else
  381. {
  382. this.yotogi_skill_list_mgr_.gameObject.SetActive(true);
  383. this.yotogi_class_list_mgr_.gameObject.SetActive(false);
  384. }
  385. }
  386. public void ChangeRankingMode()
  387. {
  388. GameObject childObject = UTY.GetChildObject(base.root_obj, "ButtonParent/Tower", false);
  389. if (!this.ranking_mode_)
  390. {
  391. this.VisibleClassChangePanel(false);
  392. this.VisibleStatusPanel(false);
  393. this.VisibleYotogiSkillList(false);
  394. this.ranking_mode_ = true;
  395. this.chara_select_mgr_.SetRightVisible(true);
  396. this.chara_select_mgr_.SetSortType(CharacterSelectManager.SortType.Ranking);
  397. childObject.transform.localPosition = new Vector3(265f, 0f, 0f);
  398. this.chara_select_mgr_.big_thumbnail.Visible = false;
  399. }
  400. else
  401. {
  402. this.ranking_mode_ = false;
  403. this.chara_select_mgr_.SetRightVisible(false);
  404. this.chara_select_mgr_.SetSortType(CharacterSelectManager.SortType.Normal);
  405. childObject.transform.localPosition = Vector3.zero;
  406. this.chara_select_mgr_.big_thumbnail.Visible = true;
  407. }
  408. if (this.chara_select_mgr_.scroll_bar.alpha <= 0f)
  409. {
  410. this.chara_select_mgr_.scroll_bar.value = 0f;
  411. }
  412. }
  413. public void VisibleClassChangePanel(bool value)
  414. {
  415. if (this.ranking_mode_)
  416. {
  417. this.ChangeRankingMode();
  418. }
  419. if (value)
  420. {
  421. this.VisibleStatusPanel(false);
  422. this.VisibleYotogiSkillList(false);
  423. }
  424. this.class_change_panel_.gameObject.SetActive(value);
  425. this.chara_select_mgr_.big_thumbnail.Visible = !value;
  426. }
  427. public void VisibleStatusPanel(bool value)
  428. {
  429. if (this.status_panel_.activeSelf && !value)
  430. {
  431. this.chara_select_mgr_.big_thumbnail.Visible = true;
  432. this.status_mgr_.CloseStatusPanel();
  433. }
  434. else if (!this.status_panel_.activeSelf && value)
  435. {
  436. this.VisibleClassChangePanel(false);
  437. this.VisibleYotogiSkillList(false);
  438. this.chara_select_mgr_.big_thumbnail.Visible = false;
  439. this.status_mgr_.OpenStatusPanel();
  440. }
  441. }
  442. public void VisibleYotogiSkillList(bool value)
  443. {
  444. if (this.ranking_mode_)
  445. {
  446. this.ChangeRankingMode();
  447. }
  448. if (value)
  449. {
  450. this.VisibleStatusPanel(false);
  451. this.VisibleClassChangePanel(false);
  452. }
  453. this.yotogi_info_object_.SetActive(value);
  454. this.chara_select_mgr_.big_thumbnail.Visible = !value;
  455. }
  456. public void Employment()
  457. {
  458. GameMain.Instance.SysDlg.Close();
  459. int num = this.employmentPrice;
  460. GameMain.Instance.CharacterMgr.status.money += (long)(num * -1);
  461. Maid maid = this.chara_mgr_.AddStockMaid();
  462. MaidManagementMain.BackUpSelectMaidGUID = maid.status.guid;
  463. MaidManagementMain.BackUpBarValue = 1f;
  464. MaidManagementMain.BackUpRightPanelVisible = this.chara_select_mgr_.IsRightVisible();
  465. this.chara_mgr_.SetActiveMaid(maid, 0);
  466. this.maid_management_.move_screen.SetNextLabel(this.new_edit_label_);
  467. this.Finish();
  468. }
  469. public void Transfer(string loadSaveFilePath, OldDataConverter.MaidData oldData)
  470. {
  471. int num = this.transferPrice;
  472. GameMain.Instance.CharacterMgr.status.money += (long)(num * -1);
  473. Maid maid = this.chara_mgr_.AddStockMaid();
  474. maid.DeserializeOldData(oldData, false);
  475. MaidManagementMain.BackUpSelectMaidGUID = maid.status.guid;
  476. MaidManagementMain.BackUpBarValue = 1f;
  477. MaidManagementMain.BackUpRightPanelVisible = this.chara_select_mgr_.IsRightVisible();
  478. this.chara_mgr_.SetActiveMaid(maid, 0);
  479. this.maid_management_.move_screen.SetNextLabel(this.transfer_label_);
  480. this.Finish();
  481. }
  482. public void BanishmentMaid()
  483. {
  484. string f_strMsg = this.select_maid_.status.fullNameJpStyle + "\nを解雇しました";
  485. int banishmentPrice = this.select_maid_.status.banishmentPrice;
  486. GameMain.Instance.CharacterMgr.status.money += (long)banishmentPrice;
  487. int i;
  488. for (i = 0; i < this.chara_mgr_.GetStockMaidCount(); i++)
  489. {
  490. if (this.chara_mgr_.GetStockMaid(i) == this.select_maid_)
  491. {
  492. break;
  493. }
  494. }
  495. this.chara_select_mgr_.RemoveMaidPlate(this.select_maid_);
  496. this.chara_mgr_.BanishmentMaid(i);
  497. this.button_dic_["雇用"].isEnabled = (this.GetMaidNumber() < 200);
  498. this.button_dic_["移籍"].isEnabled = (GameMain.Instance.CharacterMgr.status.isAvailableTransfer && this.GetMaidNumber() < 200);
  499. GameMain.Instance.SysDlg.Show(f_strMsg, SystemDialog.TYPE.OK, null, null);
  500. }
  501. private int GetMaidNumber()
  502. {
  503. int num = 0;
  504. for (int i = 0; i < this.chara_mgr_.GetStockMaidCount(); i++)
  505. {
  506. Maid stockMaid = this.chara_mgr_.GetStockMaid(i);
  507. if (stockMaid != null && (stockMaid.status.heroineType == HeroineType.Original || stockMaid.status.heroineType == HeroineType.Transfer))
  508. {
  509. num++;
  510. }
  511. }
  512. return num;
  513. }
  514. protected override void OnFinish()
  515. {
  516. if ((this.maid_management_.move_screen.next_label == this.edit_label_ || this.maid_management_.move_screen.next_label == this.new_edit_label_ || this.maid_management_.move_screen.next_label == this.transfer_label_) && this.chara_mgr_.GetMaid(0) != null)
  517. {
  518. this.chara_mgr_.GetMaid(0).Visible = true;
  519. }
  520. if (!string.IsNullOrEmpty(this.maid_management_.move_screen.next_label))
  521. {
  522. this.maid_management_.CallScreen("Move");
  523. }
  524. }
  525. private bool isLegacy
  526. {
  527. get
  528. {
  529. return !string.IsNullOrEmpty(GameMain.Instance.CMSystem.CM3D2Path) && PluginData.IsEnabled("Legacy");
  530. }
  531. }
  532. public static string BackUpSelectMaidGUID = string.Empty;
  533. public static float BackUpBarValue = 0f;
  534. public static bool BackUpRightPanelVisible = false;
  535. [SerializeField]
  536. public int employmentPrice = 3000000;
  537. [SerializeField]
  538. public int transferPrice = 3000000;
  539. [SerializeField]
  540. public WfFadeBehaviour employmentSelectUIFade;
  541. [SerializeField]
  542. public MaidTransferLoadMain transferMain;
  543. private WfFadeBehaviour mainUIFade;
  544. private MaidManagement maid_management_;
  545. private ClassChangePanel class_change_panel_;
  546. private GameObject status_panel_;
  547. private CharaSelectStatusMgr status_mgr_;
  548. private GameObject yotogi_info_object_;
  549. private YotogiSkillListManager yotogi_skill_list_mgr_;
  550. private YotogiClassListManager yotogi_class_list_mgr_;
  551. private Maid cur_maid_leader_;
  552. private Maid select_maid_;
  553. private CharacterMgr chara_mgr_;
  554. private CharacterSelectManager chara_select_mgr_;
  555. private UIGrid parent_grid_;
  556. private Dictionary<string, UIButton> button_dic_ = new Dictionary<string, UIButton>();
  557. private string edit_label_;
  558. private string new_edit_label_;
  559. private string transfer_label_;
  560. private bool ranking_mode_;
  561. private bool is_night_;
  562. }