DressUpFightView.cs 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509
  1. using UI.DressUp;
  2. using FairyGUI;
  3. using UnityEngine;
  4. using System.Collections.Generic;
  5. using System;
  6. using ET;
  7. using System.Collections;
  8. namespace GFGGame
  9. {
  10. public class DressUpFightType
  11. {
  12. public int levelID;
  13. public int teaPartID;
  14. }
  15. public class DressUpFightView : BaseView
  16. {
  17. private UI_DressUpFightUI _ui;
  18. private int _fightID;
  19. private int _levelID;
  20. private int _TeaPartyID;
  21. private float listType1X = 0;
  22. private float partsListX = 0;
  23. private float partsListScrollingPosY = 0;
  24. private DressUpListType currentListType;
  25. private int[] _currentList2;
  26. private GameObject _sceneObject;
  27. private List<int> _currentList3 = new List<int>();
  28. private List<int> _currentList4 = new List<int>();
  29. private int _currentMenuType;
  30. private int _currentSuitId;
  31. private StoryLevelCfg _levelCfg;
  32. private StoryFightCfg _fightCfg;
  33. private int scoreType = 0; //目标分数类型保存
  34. private bool _IsTeaPart = false;
  35. private const int SORT_BY_HIGH_SCORE = 0;
  36. private const int SORT_BY_LOW_SCORE = 1;
  37. private int _scoreIndex = SORT_BY_HIGH_SCORE;
  38. private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
  39. public override void Dispose()
  40. {
  41. if (_sceneObject != null)
  42. {
  43. PrefabManager.Instance.Restore(_sceneObject);
  44. _sceneObject = null;
  45. }
  46. for (int i = 0; i < _listLongPress.Count; i++)
  47. {
  48. _listLongPress[i].Dispose();
  49. }
  50. if (_ui != null)
  51. {
  52. _ui.Dispose();
  53. _ui = null;
  54. }
  55. base.Dispose();
  56. }
  57. protected override void OnInit()
  58. {
  59. base.OnInit();
  60. packageName = UI_DressUpFightUI.PACKAGE_NAME;
  61. _ui = UI_DressUpFightUI.Create();
  62. viewCom = _ui.target;
  63. isfullScreen = true;
  64. //isReturnView = true;
  65. _ui.m_btnClose.width = GRoot.inst.width;
  66. _ui.m_btnClose.height = GRoot.inst.height;
  67. _ui.m_btnClose.AddRelation(GRoot.inst, RelationType.Size);
  68. _ui.m_btnLastStep.visible = true;
  69. _ui.m_btnNextStep.visible = true;
  70. _ui.m_btnClose.visible = false;
  71. _ui.m_grpTips.visible = false;
  72. _ui.m_btnRepeal.visible = false;
  73. _ui.m_btnRenewal.visible = false;
  74. _ui.m_btnSearch.visible = true;
  75. // _ui.m_comboBox.items = new string[] { "我的套装一", "我的套装二", "我的套装三", "我的套装四", "我的套装五", "我的套装六" };
  76. _ui.m_partsList.m_comboBoxRarity.items = new string[] { "高分优先", "低分优先" };
  77. _ui.m_partsListSearch.m_comboBoxRarity.items = new string[] { "高分优先", "低分优先" };
  78. InitLists();
  79. _ui.m_partsList.m_comboBoxRarity.onChanged.Add(OnComboBoxRarityChanged);
  80. _ui.m_partsListSearch.m_comboBoxRarity.onChanged.Add(OnSearchComboBoxRarityChanged);
  81. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  82. _ui.m_btnHome.onClick.Add(OnClickBtnHome);
  83. // _ui.m_btnClothingShop.onClick.Add(OnClickBtnClothingShop);
  84. // _ui.m_comboBox.onChanged.Add(OnComboBoxChanged);
  85. _ui.m_comListType1.m_listType.onClickItem.Add(OnClickListType1Item);
  86. _ui.m_comListType2.m_listType.onClickItem.Add(OnClickListType2Item);
  87. _ui.m_partsList.m_list.onClickItem.Add(OnClickPartsListItem);
  88. _ui.m_partsList2.m_list.onClickItem.Add(OnClickSuitPartsListItem);
  89. _ui.m_partsListSearch.m_list.onClickItem.Add(OnClickSearchPartsListItem);
  90. _ui.m_touchPad.onClick.Add(OnTouchPad);
  91. _ui.m_btnHint.onClick.Add(OnClickBtnHint);
  92. // _ui.m_btnGuide.onClick.Add(OnTouchPad);
  93. _ui.m_btnClose.onClick.Add(OnClickBtnClose);
  94. _ui.m_btnDelete.onClick.Add(OnClickBtnDelete);
  95. _ui.m_btnNext.onClick.Add(OnClickBtnNext);
  96. _ui.m_btnRecommend.onClick.Add(OnClickBtnRecommend);
  97. _ui.m_btnSearch.onClick.Add(OnClickBtnSearch);
  98. _ui.m_btnAutoPlay.onClick.Add(OnClickBtnAutoPlay);
  99. _ui.m_btnLastStep.onClick.Add(OnClickBtnLastStep);
  100. _ui.m_btnNextStep.onClick.Add(OnClickBtnNextStep);
  101. _ui.m_btnSubmission.onClick.Add(OnClickBtnSubmission);
  102. _ui.m_compNeed.target.onClick.Add(OnClickComNeed);
  103. _ui.m_compNeed.m_listTag.itemRenderer = RenderListTagItem;
  104. // _ui.m_btnShow.onClick.Add(OnClickBtnShow);
  105. // _ui.m_btnHide.onClick.Add(OnClickBtnHide);
  106. // _ui.m_loaShow.onClick.Add(OnClickLoaShow);
  107. // _ui.m_btnHide.visible = false;
  108. // EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdatePartsListSort);
  109. _ui.m_partsList2.m_comboBoxRarity.visible = false;
  110. _ui.m_partsList2.m_imgTop.visible = true;
  111. _ui.m_partsList.m_imgTop.visible = false;
  112. }
  113. protected override void AddEventListener()
  114. {
  115. base.AddEventListener();
  116. EventAgent.AddEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
  117. EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
  118. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
  119. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
  120. EventAgent.AddEventListener(ConstMessage.TEA_PARTY_STATU, TeaPartyStatuChange);
  121. // EventAgent.AddEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
  122. }
  123. protected override void RemoveEventListener()
  124. {
  125. base.RemoveEventListener();
  126. EventAgent.RemoveEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
  127. EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
  128. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
  129. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
  130. EventAgent.RemoveEventListener(ConstMessage.TEA_PARTY_STATU, TeaPartyStatuChange);
  131. // EventAgent.RemoveEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
  132. }
  133. protected override void OnShown()
  134. {
  135. base.OnShown();
  136. var objData = (DressUpFightType)this.viewData;
  137. if (objData.teaPartID > 0) {
  138. _IsTeaPart = true;
  139. _TeaPartyID = objData.teaPartID;
  140. }
  141. else
  142. _IsTeaPart = false;
  143. _levelID = objData.levelID;
  144. if (!_IsTeaPart)
  145. _ui.m_c1.selectedIndex = 0;
  146. else
  147. _ui.m_c1.selectedIndex = 2;
  148. _ui.m_loaGuide.visible = true;
  149. InstanceZonesDataManager.usedRecommend = false;
  150. // _ui.m_comboBox.title = "我的套装";
  151. _ui.m_txtRecommendCount.SetVar("v1", "" + GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount)).FlushVars();
  152. _ui.m_txtRecommendCount.SetVar("v2", GlobalCfgArray.globalCfg.recommendCount.ToString()).FlushVars();
  153. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  154. _ui.m_btnAutoPlay.selected = FightDataManager.Instance.autoPlay;
  155. _ui.m_btnAutoPlay.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
  156. _ui.m_btnRecommend.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
  157. if (!_IsTeaPart) {
  158. InstanceZonesDataManager.currentLevelCfgId = _levelID;
  159. _levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  160. _fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
  161. if (_levelCfg.type == ConstInstanceZonesType.Field)
  162. {
  163. scoreType = FieldDataManager.Instance.fieldInfos.theme;
  164. _ui.m_btnAutoPlay.visible = false;
  165. }
  166. else {
  167. scoreType = _fightCfg.scoreType;
  168. }
  169. InstanceZonesDataManager.FightScene = _levelCfg.type;
  170. _ui.m_compNeed.target.visible = _fightCfg.needItemId > 0 || _fightCfg.needSuitId > 0 || _fightCfg.needTagsArr.Length > 0;
  171. if (_ui.m_compNeed.target.visible)
  172. {
  173. _ui.m_compNeed.m_c1.selectedIndex = 0;
  174. if (_fightCfg.needItemId > 0)
  175. {
  176. _ui.m_compNeed.m_txtNeedName.text = ItemUtil.GetItemName(_fightCfg.needItemId);
  177. _ui.m_compNeed.target.data = _fightCfg.needItemId;
  178. _ui.m_compNeed.m_imgGot.visible = ItemDataManager.GetItemNum(_fightCfg.needItemId) > 0;
  179. }
  180. else if (_fightCfg.needSuitId > 0)
  181. {
  182. _ui.m_compNeed.m_txtNeedName.text = ItemUtil.GetSuitName(_fightCfg.needSuitId);
  183. _ui.m_compNeed.target.data = _fightCfg.needSuitId;
  184. _ui.m_compNeed.m_imgGot.visible = DressUpMenuSuitDataManager.CheckHaveSuit(_fightCfg.needSuitId);
  185. }
  186. else
  187. {
  188. _ui.m_compNeed.m_c1.selectedIndex = 1;
  189. _ui.m_compNeed.m_listTag.numItems = _fightCfg.needTagsArr.Length;
  190. _ui.m_compNeed.m_imgGot.visible = false;
  191. }
  192. }
  193. }
  194. InstanceZonesDataManager.currentScoreType = scoreType;
  195. //一级菜单
  196. _ui.m_comListType1.m_listType.RemoveChildrenToPool();
  197. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 3;
  198. //_ui.m_comListType1.m_listType1.ResizeToFit(_ui.m_listType1.numItems);
  199. float maxHeight = _ui.target.height - _ui.m_comListType1.m_listType.y - DressUpView.BOTTOM_BLANK;
  200. if (_ui.m_comListType1.m_listType.height > maxHeight)
  201. {
  202. _ui.m_comListType1.m_listType.height = maxHeight;
  203. }
  204. _ui.m_comListType1.target.x = _ui.target.width;
  205. _ui.m_comListType2.target.x = _ui.target.width;
  206. _ui.m_partsList.target.x = _ui.target.width;
  207. _ui.m_partsList2.target.x = _ui.target.width;
  208. _ui.m_partsListSearch.target.x = _ui.target.width;
  209. _ui.m_scoreType.url = "ui://CommonGame/kp_sx_" + scoreType;
  210. this.showListType1();
  211. if (_sceneObject == null)
  212. {
  213. _sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath("SceneDressUpFight"));
  214. MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject, false, false);
  215. MyDressUpHelper.dressUpObj.PutOnDefaultDressUpData(_IsTeaPart);
  216. }
  217. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  218. UpdateStepBtn(true);
  219. UpdateScore();
  220. if (!_IsTeaPart)
  221. SendLog();
  222. else
  223. {
  224. var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
  225. _ui.m_txtTeaPartyName.text = teapartyRoleCfg[objData.teaPartID - 1].name;
  226. }
  227. Timers.inst.AddUpdate(CheckGuide);
  228. TeaPartyStatuChange();
  229. }
  230. protected override void OnHide()
  231. {
  232. base.OnHide();
  233. _ui.m_btnClose.visible = false;
  234. _ui.m_grpTips.visible = false;
  235. if (_sceneObject != null)
  236. {
  237. PrefabManager.Instance.Restore(_sceneObject);
  238. _sceneObject = null;
  239. }
  240. _fightCfg = null;
  241. _levelCfg = null;
  242. DressUpMenuItemDataManager.Clear();
  243. MyDressUpHelper.ResetMemory();
  244. Timers.inst.Remove(CheckGuide);
  245. }
  246. private void OnClickBtnLastStep()
  247. {
  248. if (!MyDressUpHelper.OnClickBtnLastStep()) return;
  249. UpdateStepBtn(false);
  250. }
  251. private void OnClickBtnNextStep()
  252. {
  253. if (!MyDressUpHelper.OnClickBtnNextStep()) return;
  254. UpdateStepBtn(false);
  255. }
  256. //茶话会提交搭配
  257. private void OnClickBtnSubmission()
  258. {
  259. ChangeTeapartyDressup();
  260. }
  261. private async void ChangeTeapartyDressup()
  262. {
  263. DressUpData dressUpData = MyDressUpHelper.dressUpObj.DressUpDataClone();
  264. bool result = await LeagueSproxy.ChangeTeapartyDressup(RoleDataManager.roleId, _TeaPartyID, dressUpData.itemList);
  265. if (result)
  266. {
  267. backView();
  268. }
  269. }
  270. private void backView()
  271. {
  272. if (_IsTeaPart)
  273. {
  274. ViewManager.Show<LeagueTeaPartyView>();
  275. }
  276. else if (_levelCfg.type == ConstInstanceZonesType.Studio && _levelCfg.subType != ConstInstanceZonesSubType.Hard3)
  277. {
  278. ViewManager.Show(StudioDataManager.Instance.VIEW_NAME, StudioDataManager.Instance.PROPERTY_SELECT_INDEX, ViewManager.GetGoBackDatas(StudioDataManager.Instance.VIEW_NAME));
  279. }
  280. else if (_levelCfg.type == ConstInstanceZonesType.Studio && _levelCfg.subType == ConstInstanceZonesSubType.Hard3)
  281. {
  282. if (StudioDataManager.Instance.IsluckyBoxFilingChapter())
  283. {
  284. ViewManager.Show<StudioFilingView>(StudioDataManager.Instance.luckyBoxFilingChapterId, ViewManager.GetGoBackDatas(typeof(StudioFilingView).FullName));
  285. }
  286. else
  287. {
  288. ViewManager.Show<StudioFilingView>(null, ViewManager.GetGoBackDatas(typeof(StudioFilingView).FullName));
  289. }
  290. }
  291. else if (_levelCfg.type == ConstInstanceZonesType.Field)
  292. {
  293. ViewManager.GoBackFrom(typeof(DressUpFightView).FullName);
  294. }
  295. else
  296. {
  297. //ViewManager.GoBackFrom(typeof(StoryChapterView).FullName);
  298. ViewManager.Show<StoryChapterView>(_levelCfg.chapterId);//, new object[] { typeof(StoryChapterListView).FullName}
  299. }
  300. //MyDressUpHelper.dressUpObj.TakeOffAll();
  301. this.Hide();
  302. }
  303. private void OnClickBtnBack()
  304. {
  305. if (!_IsTeaPart) {
  306. AlertUI.Show("是否确定退出?")
  307. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  308. {
  309. backView();
  310. });
  311. }
  312. else {
  313. AlertUI.Show("当期搭配未保存,是否放弃提交搭配?")
  314. .SetLeftButton(true, "放弃搭配", (object data) =>
  315. {
  316. backView();
  317. }).SetRightButton(true, "提交搭配", (object data) =>
  318. {
  319. ChangeTeapartyDressup();
  320. });
  321. }
  322. //ViewManager.Show<StoryChapterView>(StoryDataManager.currentChapter);
  323. }
  324. private void OnClickBtnHome()
  325. {
  326. AlertUI.Show("是否返回?")
  327. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  328. {
  329. //MyDressUpHelper.dressUpObj.TakeOffAll();
  330. GameController.GoBackToMainView();
  331. });
  332. }
  333. private void OnClickBtnClothingShop()
  334. {
  335. ViewManager.Show<ClothingShopView>(new object[] { null, scoreType }, null, false, true);
  336. }
  337. private void OnClickListType1Item(EventContext context)
  338. {
  339. // GuideController.HideGuide();
  340. GObject typeItem = context.data as GObject;
  341. int order = (int)typeItem.data;
  342. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[order - 1];
  343. if (item1.subMenusArr.Length > 0)
  344. {
  345. this.showListType2(item1.subMenusArr);
  346. }
  347. else
  348. {
  349. if (this.showListParts(item1.type) == false)
  350. {
  351. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  352. return;
  353. }
  354. this.showListParts(item1.type);
  355. }
  356. this.hideListType1();
  357. UpdateListPartsSelected();
  358. }
  359. private void OnClickListType2Item(EventContext context)
  360. {
  361. GObject typeItem = context.data as GObject;
  362. int order = (int)typeItem.data;
  363. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[order - 1];
  364. if (this.showListParts(item2.type) == false)
  365. {
  366. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  367. return;
  368. }
  369. this.hideListType2();
  370. }
  371. private void OnClickSearchPartsListItem(EventContext context)
  372. {
  373. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  374. {
  375. return;
  376. }
  377. GObject listItem = context.data as GObject;
  378. int id = (int)listItem.data;
  379. bool isOrnament = DressUpMenuItemCfg1Array.Instance.CheckIsOrnamentsType(id);
  380. bool isDress = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  381. bool isHasSame = MyDressUpHelper.dressUpObj.CheckSameTypeIsOn(id);
  382. bool isMaxCount = MyDressUpHelper.GetCurrentOrnamentCount() >= GlobalCfgArray.globalCfg.dressLimitCount;
  383. if (isOrnament && !isDress && !isHasSame && isMaxCount)
  384. {
  385. PromptController.Instance.ShowFloatTextPrompt("饰品穿戴数量已达上限");
  386. return;
  387. }
  388. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  389. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  390. UpdateStepBtn(true);
  391. // UpdateSearchListPartsSelected();
  392. UpdateScore();
  393. }
  394. private void OnClickPartsListItem(EventContext context)
  395. {
  396. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  397. {
  398. return;
  399. }
  400. GObject listItem = context.data as GObject;
  401. int id = (int)listItem.data;
  402. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  403. {
  404. partsListScrollingPosY = _ui.m_partsList.m_list.scrollPane.scrollingPosY;
  405. this.showListParts2(id);
  406. this.hideListParts();
  407. MyDressUpHelper.dressUpObj.PutOnItemList(MyDressUpHelper.GetSuitFightItems(id));
  408. UpdateStepBtn(true);
  409. // MyDressUpHelper.dressUpObj.PutOnSuitCfg(id, false);
  410. }
  411. else
  412. {
  413. bool isOrnament = DressUpMenuItemCfg1Array.Instance.CheckIsOrnamentsType(id);
  414. bool isDress = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  415. bool isHasSame = MyDressUpHelper.dressUpObj.CheckSameTypeIsOn(id);
  416. bool isMaxCount = MyDressUpHelper.GetCurrentOrnamentCount() >= GlobalCfgArray.globalCfg.dressLimitCount;
  417. if (isOrnament && !isDress && !isHasSame && isMaxCount)
  418. {
  419. PromptController.Instance.ShowFloatTextPrompt("饰品穿戴数量已达上限");
  420. return;
  421. }
  422. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  423. UpdateStepBtn(true);
  424. }
  425. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  426. // UpdateListPartsSelected();
  427. // UpdateListSuitPartsSelected();
  428. UpdateScore();
  429. }
  430. private void OnClickSuitPartsListItem(EventContext context)
  431. {
  432. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  433. {
  434. return;
  435. }
  436. GObject listItem = (GObject)context.data as GObject;
  437. int id = (int)listItem.data;
  438. bool isOrnament = DressUpMenuItemCfg1Array.Instance.CheckIsOrnamentsType(id);
  439. bool isDress = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  440. bool isHasSame = MyDressUpHelper.dressUpObj.CheckSameTypeIsOn(id);
  441. bool isMaxCount = MyDressUpHelper.GetCurrentOrnamentCount() >= GlobalCfgArray.globalCfg.dressLimitCount;
  442. if (isOrnament && !isDress && !isHasSame && isMaxCount)
  443. {
  444. PromptController.Instance.ShowFloatTextPrompt("饰品穿戴数量已达上限");
  445. return;
  446. }
  447. if (!DressUpMenuItemDataManager.CheckHasItem(id))
  448. {
  449. PromptController.Instance.ShowFloatTextPrompt("还未获得这件装扮");
  450. return;
  451. }
  452. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  453. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  454. UpdateStepBtn(true);
  455. // UpdateListSuitPartsSelected();
  456. UpdateScore();
  457. }
  458. private void UpdateStepBtn(bool isAdd, int suitId = 0)
  459. {
  460. if (isAdd)
  461. {
  462. MyDressUpHelper.AddMemoryDressup();
  463. }
  464. _ui.m_btnLastStep.enabled = MyDressUpHelper.stepIndex > 0;
  465. _ui.m_btnNextStep.enabled = MyDressUpHelper.stepIndex < MyDressUpHelper.dressMemory.Count - 1;
  466. UpdateListPartsSelected();
  467. UpdateListSuitPartsSelected();
  468. }
  469. private void OnLongPress(EventContext context)
  470. {
  471. LongPressGesture gesture = (LongPressGesture)context.sender;
  472. int itemId = (int)gesture.host.data;
  473. GoodsItemTipsController.ShowItemTips(itemId);
  474. }
  475. private void OnTouchPad()
  476. {
  477. if (this.currentListType == DressUpListType.List4)
  478. {
  479. this.hideListParts2();
  480. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  481. }
  482. else if (this.currentListType == DressUpListType.List3)
  483. {
  484. if (_currentList2 != null)
  485. {
  486. this.showListType2(_currentList2);
  487. }
  488. else
  489. {
  490. this.showListType1();
  491. }
  492. this.hideListParts();
  493. }
  494. else if (this.currentListType == DressUpListType.List2)
  495. {
  496. this.showListType1();
  497. this.hideListType2();
  498. }
  499. else if (this.currentListType == DressUpListType.List5)
  500. {
  501. this.showListType1();
  502. this.hideSearchListType();
  503. }
  504. }
  505. private void OnClickBtnHint()
  506. {
  507. this.ShowTaskHint();
  508. }
  509. private void OnClickBtnDelete()
  510. {
  511. MyDressUpHelper.dressUpObj.TakeOffAll();
  512. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  513. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  514. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  515. UpdateStepBtn(true);
  516. // UpdateListPartsSelected();
  517. // UpdateListSuitPartsSelected();
  518. }
  519. private void OnClickBtnClose()
  520. {
  521. _ui.m_btnClose.visible = false;
  522. _ui.m_grpTips.visible = false;
  523. }
  524. private void OnClickBtnNext()
  525. {
  526. // if (!MyDressUpHelper.CheckPutOnFinish())
  527. // {
  528. // AlertUI.Show("只有换好衣服才能出门哦!")
  529. // .SetRightButton(true, "好的");
  530. // return;
  531. // }
  532. if (!CheckHasNeed())
  533. {
  534. AlertUI.Show("未穿戴必需品。").SetRightButton(true, "好的");
  535. return;
  536. }
  537. var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  538. if (RoleDataManager.power < levelCfg.power)
  539. {
  540. ItemUtil.AddPower(OnClickBtnPhotograph);
  541. return;
  542. }
  543. OnClickBtnPhotograph();
  544. }
  545. private bool CheckHasNeed()
  546. {
  547. int _suitId = MyDressUpHelper.dressUpObj.suitId;
  548. bool isNoSuit = _fightCfg.needSuitId > 0 && _suitId != _fightCfg.needSuitId;//需要套装但未穿套装
  549. bool isDressUpItem = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(_fightCfg.needItemId);
  550. bool isIncludeItem = _suitId > 0 && Array.IndexOf(SuitCfgArray.Instance.GetCfg(_suitId).partsArr, _fightCfg.needItemId) >= 0;
  551. bool isNoItem = _fightCfg.needItemId > 0 && !isDressUpItem && !isIncludeItem;
  552. if (isNoSuit || isNoItem)
  553. {
  554. return false;
  555. }
  556. return true;
  557. }
  558. private void OnClickBtnPhotograph()
  559. {
  560. Timers.inst.StartCoroutine(ScreenShotTex());
  561. }
  562. private IEnumerator ScreenShotTex()
  563. {
  564. GameObject Role = _sceneObject.transform.Find("Role").gameObject;
  565. GameObject CopyRoleParent = _sceneObject.transform.Find("CopyRole").gameObject;
  566. Transform CopyRole = CopyRoleParent.transform.Find("Role");
  567. if (CopyRole != null)
  568. {
  569. GameObject.DestroyImmediate(CopyRole.gameObject);
  570. }
  571. Transform transform = GameObject.Instantiate(Role, CopyRoleParent.transform.position, Quaternion.identity).transform;//实例化物体
  572. transform.parent = CopyRoleParent.transform;
  573. transform.name = "Role";
  574. GameObject gameObject = _sceneObject.transform.Find("FightCamera").gameObject;
  575. Camera camera = gameObject.GetComponent<Camera>();
  576. FightDataManager.Instance.RoleTextuex = FightDataManager.Instance.GetPrintscreenNTexture(camera);
  577. yield return new WaitForEndOfFrame();
  578. if (CardDataManager.GetCardListByRoleType(0).Count > 0)
  579. {
  580. ViewManager.Show<StoryCardChoose>(scoreType);
  581. }
  582. else
  583. {
  584. StartCalculateScore();
  585. }
  586. }
  587. private void StartCalculateScore()
  588. {
  589. //不可移动代码位置
  590. bool hasFightTarget = _fightCfg.targetName != null && _fightCfg.targetName.Length > 0;
  591. if (_levelCfg.type == ConstInstanceZonesType.Field)
  592. {
  593. FieldFightDataManager.Instance.CurrentCardId = InstanceZonesDataManager.currentCardId;
  594. FieldFightDataManager.Instance.CurrentScoreType = InstanceZonesDataManager.currentScoreType;
  595. FieldFightDataManager.Instance.currentLevelCfgId = InstanceZonesDataManager.currentLevelCfgId;
  596. }
  597. if (hasFightTarget)
  598. {
  599. ViewManager.Show<StoryFightTargetView>();
  600. }
  601. else
  602. {
  603. ViewManager.Show<StoryFightSingleView>();
  604. }
  605. this.Hide();
  606. }
  607. private void OnClickBtnRecommend()
  608. {
  609. if (this.currentListType == DressUpListType.List4)
  610. {
  611. this.hideListParts2();
  612. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  613. }
  614. InstanceZonesDataManager.usedRecommend = true;
  615. // MyDressUpHelper.PutOnRecommendItems();
  616. MyDressUpHelper.PutOnRecommendItems2();
  617. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  618. UpdateStepBtn(true);
  619. // UpdateListPartsSelected();
  620. // UpdateListSuitPartsSelected();
  621. UpdateScore();
  622. if (!CheckHasNeed())
  623. {
  624. PromptController.Instance.ShowFloatTextPrompt("未拥有必需品");
  625. }
  626. }
  627. private void InitLists()
  628. {
  629. _ui.m_comListType2.m_listType.itemRenderer = ListType2Item;
  630. _ui.m_partsList.m_list.itemRenderer = ListPartsItem;
  631. _ui.m_partsList2.m_list.itemRenderer = ListParts2Item;
  632. _ui.m_partsListSearch.m_list.itemRenderer = ListPartsItem;
  633. listType1X = _ui.m_comListType1.target.x;
  634. partsListX = _ui.m_partsList.target.x - _ui.m_partsList.target.width;
  635. //一级菜单
  636. _ui.m_comListType1.m_listType.itemRenderer = ListType1Item;
  637. }
  638. private void showListType1()
  639. {
  640. _currentList2 = null;
  641. currentListType = DressUpListType.List1;
  642. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 3;
  643. GTween.To(_ui.target.width, listType1X, 0.5f)
  644. .SetTarget(_ui.m_comListType1.target)
  645. .OnUpdate((GTweener t) =>
  646. {
  647. _ui.m_comListType1.target.x = t.value.x;
  648. });
  649. }
  650. private void hideListType1()
  651. {
  652. GTween.To(listType1X, _ui.target.width, 0.5f)
  653. .SetTarget(_ui.m_comListType1.target)
  654. .OnUpdate((GTweener t) =>
  655. {
  656. _ui.m_comListType1.target.x = t.value.x;
  657. });
  658. }
  659. private void showListType2(int[] menuStrArr = null)
  660. {
  661. currentListType = DressUpListType.List2;
  662. if (menuStrArr != null && menuStrArr.Length > 0)
  663. {
  664. int len = menuStrArr.Length;
  665. _currentList2 = menuStrArr.Clone() as int[];
  666. _ui.m_comListType2.m_listType.RemoveChildrenToPool();
  667. _ui.m_comListType2.m_listType.numItems = len;
  668. //_ui.m_listType2.ResizeToFit(_ui.m_listType2.numItems);
  669. float maxHeight = _ui.target.height - _ui.m_comListType2.m_listType.y - DressUpView.BOTTOM_BLANK;
  670. if (_ui.m_comListType2.m_listType.height > maxHeight)
  671. {
  672. _ui.m_comListType2.m_listType.height = maxHeight;
  673. }
  674. }
  675. GTween.To(_ui.target.width, listType1X, 0.5f)
  676. .SetTarget(_ui.m_comListType2.target)
  677. .OnUpdate((GTweener t) =>
  678. {
  679. _ui.m_comListType2.target.x = t.value.x;
  680. });
  681. }
  682. private void hideListType2()
  683. {
  684. GTween.To(listType1X, _ui.target.width, 0.5f)
  685. .SetTarget(_ui.m_comListType2.target)
  686. .OnUpdate((GTweener t) =>
  687. {
  688. _ui.m_comListType2.target.x = t.value.x;
  689. });
  690. }
  691. private bool showListParts(int type, bool selectItem = false)
  692. {
  693. _currentMenuType = type;
  694. UpdatePartsListSort();
  695. if (_ui.m_partsList.m_list.numItems <= 0) return false;
  696. _ui.m_partsList.m_list.ResizeToFit(_ui.m_partsList.m_list.numItems);
  697. float maxHeight = _ui.m_partsList.target.height - _ui.m_partsList.m_list.y;
  698. if (_ui.m_partsList.m_list.height > maxHeight)
  699. {
  700. _ui.m_partsList.m_list.height = maxHeight;
  701. }
  702. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  703. {
  704. _ui.m_partsList.m_list.scrollPane.SetPosY(partsListScrollingPosY, false);
  705. partsListScrollingPosY = 0;
  706. }
  707. currentListType = DressUpListType.List3;
  708. GTween.To(_ui.target.width, partsListX, 0.5f)
  709. .SetTarget(_ui.m_partsList)
  710. .OnUpdate((GTweener t) =>
  711. {
  712. _ui.m_partsList.target.x = t.value.x;
  713. });
  714. UpdateListPartsSelected();
  715. return true;
  716. }
  717. private void OnComboBoxRarityChanged()
  718. {
  719. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  720. this.UpdatePartsListSort();
  721. }
  722. private void OnSearchComboBoxRarityChanged()
  723. {
  724. _scoreIndex = _ui.m_partsListSearch.m_comboBoxRarity.selectedIndex;
  725. this.UpdateSearchList();
  726. }
  727. private void UpdatePartsListSort()
  728. {
  729. if (_currentMenuType == 0) return;
  730. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  731. {
  732. _currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();
  733. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  734. {
  735. if (!_IsTeaPart)
  736. _currentList3 = SuitUtil.SortSuitListByHighScore(_currentList3);
  737. else
  738. _currentList3 = SuitUtil.SortTeaPartySuitByHighScore(_currentList3);
  739. }
  740. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  741. {
  742. if (!_IsTeaPart)
  743. _currentList3 = SuitUtil.SortSuitListByLowScore(_currentList3);
  744. else
  745. _currentList3 = SuitUtil.SortTeaPartySuitByLowScore(_currentList3);
  746. }
  747. else
  748. {
  749. _currentList3.Reverse();
  750. }
  751. }
  752. else
  753. {
  754. _currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
  755. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  756. {
  757. if (!_IsTeaPart)
  758. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
  759. else
  760. _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByHighScore(_currentList3);
  761. }
  762. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  763. {
  764. if (!_IsTeaPart)
  765. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
  766. else
  767. _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByLowsore(_currentList3);
  768. }
  769. else
  770. {
  771. _currentList3.Reverse();
  772. }
  773. }
  774. // if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  775. // {
  776. // _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3);
  777. // }
  778. // else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  779. // {
  780. // _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3);
  781. // }
  782. //必穿品放在列表最前面
  783. if (_fightCfg!= null && _fightCfg.needItemId > 0)
  784. {
  785. int index = _currentList3.IndexOf(_fightCfg.needItemId);
  786. if (index >= 0)
  787. {
  788. int item = _currentList3[index];
  789. _currentList3.Remove(_currentList3[index]);
  790. _currentList3.Insert(0, item);
  791. }
  792. }
  793. else if (_fightCfg != null && _fightCfg.needSuitId > 0)
  794. {
  795. int index = _currentList3.IndexOf(_fightCfg.needSuitId);
  796. if (index >= 0)
  797. {
  798. int item = _currentList3[index];
  799. _currentList3.Remove(_currentList3[index]);
  800. _currentList3.Insert(0, item);
  801. }
  802. }
  803. _ui.m_partsList.m_list.RemoveChildrenToPool();
  804. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  805. }
  806. private void UpdateSuitPartsListSort()
  807. {
  808. if (_currentMenuType == 0) return;
  809. _currentList4 = new List<int>(SuitCfgArray.Instance.GetSuitItems(_currentSuitId, true));
  810. // if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  811. // {
  812. // _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4);
  813. // }
  814. // else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  815. // {
  816. // _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4);
  817. // }
  818. _ui.m_partsList2.m_list.RemoveChildrenToPool();
  819. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  820. }
  821. private void hideListParts()
  822. {
  823. GTween.To(partsListX, _ui.target.width, 0.5f)
  824. .SetTarget(_ui.m_partsList)
  825. .OnUpdate((GTweener t) =>
  826. {
  827. _ui.m_partsList.target.x = t.value.x;
  828. });
  829. }
  830. private void showListParts2(int suitId)
  831. {
  832. _currentSuitId = suitId;
  833. _ui.m_partsList2.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  834. this.UpdateSuitPartsListSort();
  835. _ui.m_partsList2.m_list.ResizeToFit(_ui.m_partsList2.m_list.numItems);
  836. float maxHeight = _ui.m_partsList2.target.height - _ui.m_partsList2.m_list.y;// - DressUpView.BOTTOM_BLANK;
  837. if (_ui.m_partsList2.m_list.height > maxHeight)
  838. {
  839. _ui.m_partsList2.m_list.height = maxHeight;
  840. }
  841. currentListType = DressUpListType.List4;
  842. GTween.To(_ui.target.width, partsListX, 0.5f)
  843. .SetTarget(_ui.m_partsList2)
  844. .OnUpdate((GTweener t) =>
  845. {
  846. _ui.m_partsList2.target.x = t.value.x;
  847. });
  848. }
  849. private void hideListParts2()
  850. {
  851. _currentMenuType = ConstDressUpItemType.TAO_ZHUANG;
  852. GTween.To(partsListX, _ui.target.width, 0.5f)
  853. .SetTarget(_ui.m_partsList2)
  854. .OnUpdate((GTweener t) =>
  855. {
  856. _ui.m_partsList2.target.x = t.value.x;
  857. });
  858. }
  859. private void showSearchListType()
  860. {
  861. // _currentList2 = null;
  862. currentListType = DressUpListType.List5;
  863. GTween.To(_ui.target.width, partsListX, 0.5f)
  864. .SetTarget(_ui.m_partsListSearch.target)
  865. .OnUpdate((GTweener t) =>
  866. {
  867. _ui.m_partsListSearch.target.x = t.value.x;
  868. });
  869. }
  870. private void hideSearchListType()
  871. {
  872. GTween.To(partsListX, _ui.target.width, 0.5f)
  873. .SetTarget(_ui.m_partsListSearch.target)
  874. .OnUpdate((GTweener t) =>
  875. {
  876. _ui.m_partsListSearch.target.x = t.value.x;
  877. });
  878. }
  879. /*****************************************************************************************************/
  880. private void DressResetSerch()
  881. {
  882. if (currentListType == DressUpListType.List5)
  883. {
  884. OnTouchPad();
  885. }
  886. }
  887. private void UpdateSerch(EventContext context)
  888. {
  889. if (context.data.ToString() == ConstMessage.DRESS_SEARCH)
  890. {
  891. _currentList3 = DressUpMenuItemDataManager.DressSearch(false);
  892. }
  893. else if (context.data.ToString() == ConstMessage.DRESS_FILTER)
  894. {
  895. _currentList3 = DressUpMenuItemDataManager.DressFilter(false);
  896. }
  897. ViewManager.Hide<ModalStatusView>();
  898. UpdateSearchList();
  899. if (currentListType != DressUpListType.List5)
  900. {
  901. hideListParts();
  902. hideListParts2();
  903. hideListType1();
  904. hideListType2();
  905. showSearchListType();
  906. }
  907. _currentMenuType = 0;
  908. }
  909. private void UpdateSearchList()
  910. {
  911. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  912. {
  913. if (!_IsTeaPart)
  914. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
  915. else
  916. _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByHighScore(_currentList3);
  917. }
  918. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  919. {
  920. if (!_IsTeaPart)
  921. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
  922. else
  923. _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByLowsore(_currentList3);
  924. }
  925. _currentMenuType = 0;
  926. _ui.m_partsListSearch.m_list.numItems = _currentList3.Count; ;
  927. }
  928. private void ListType1Item(int index, GObject item)
  929. {
  930. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  931. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[index];
  932. typeItem.m_icon.url = "ui://DressUp/hz_fenleitu_" + item1.id;
  933. typeItem.m_txtname.text = item1.name;
  934. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconzi_" + item1.id;
  935. typeItem.target.data = item1.id;
  936. if (!_IsTeaPart)
  937. {
  938. typeItem.m_imgNeed.visible = ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, item1.id);
  939. typeItem.m_itemType.selectedIndex = 0;
  940. }
  941. else
  942. typeItem.m_itemType.selectedIndex = 1;
  943. typeItem.m_imgNew.visible = DressUpMenuItemDataManager.CheckIsFirstMenuNew(item1.id);
  944. UI_TypeItem.ProxyEnd();
  945. }
  946. private void ListType2Item(int index, GObject item)
  947. {
  948. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  949. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[_currentList2[index] - 1];
  950. typeItem.m_icon.url = "ui://DressUp/hz_fenleituej_" + item2.id;
  951. typeItem.m_txtname.text = item2.name;
  952. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconziej_" + item2.id;
  953. typeItem.target.data = item2.id;
  954. if (!_IsTeaPart) {
  955. typeItem.m_itemType.selectedIndex = 0;
  956. var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
  957. typeItem.m_imgNeed.visible = subType == item2.type;
  958. typeItem.m_imgNew.visible = DressUpMenuItemDataManager.CheckIsSecondMenuNew(item2.id);
  959. }
  960. else
  961. typeItem.m_itemType.selectedIndex = 1;
  962. UI_TypeItem.ProxyEnd();
  963. }
  964. private void ListTagItem(int index, GObject item)
  965. {
  966. string[][] tagsArr = (string[][])item.parent.data;
  967. UI_ComTagItem listItem = UI_ComTagItem.Proxy(item);
  968. int tagType = TagCfgArray.Instance.GetCfg(tagsArr[index][0]).type;
  969. UI.CommonGame.UI_ComTag itemTag = UI.CommonGame.UI_ComTag.Proxy(listItem.m_loaTag);
  970. itemTag.m_txtTag.text = tagsArr[index][0];
  971. itemTag.m_loaTag.url = ResPathUtil.GetCommonGameResPath("fzd_bqbq_" + tagType);
  972. itemTag.m_loaTag.scale = new Vector2(0.8f, 0.8f);
  973. UI.CommonGame.UI_ComTag.ProxyEnd();
  974. listItem.m_txtScore.text = tagsArr[index][1];
  975. UI_ComTagItem.ProxyEnd();
  976. }
  977. private void ListPartsItem(int index, GObject item)
  978. {
  979. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  980. int id = (int)_currentList3[index];
  981. string iconRes = "";
  982. string partName = "";
  983. string ext = "png";
  984. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  985. {
  986. SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
  987. iconRes = suitCfg.res;
  988. partName = suitCfg.name;
  989. listItem.m_iconSelected.visible = false;
  990. if (!_IsTeaPart)
  991. {
  992. listItem.m_txtScore.text = "" + SuitUtil.GetSuitScore(id);
  993. listItem.m_itemType.selectedIndex = 0;
  994. }
  995. else
  996. {
  997. if (listItem.m_ListTag.data == null)
  998. listItem.m_ListTag.itemRenderer = ListTagItem;
  999. listItem.m_ListTag.data = suitCfg.tagsArr;
  1000. listItem.m_ListTag.numItems = suitCfg.tagsArr.Length;
  1001. listItem.m_itemType.selectedIndex = 1;
  1002. }
  1003. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, true);
  1004. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + suitCfg.rarity;
  1005. listItem.m_imgNew.visible = false;
  1006. }
  1007. else
  1008. {
  1009. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  1010. iconRes = itemCfg.res;
  1011. partName = itemCfg.name;
  1012. listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  1013. if (!_IsTeaPart) {
  1014. listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
  1015. listItem.m_itemType.selectedIndex = 0;
  1016. }
  1017. else {
  1018. if (listItem.m_ListTag.data == null)
  1019. listItem.m_ListTag.itemRenderer = ListTagItem;
  1020. listItem.m_ListTag.data = itemCfg.tagsArr;
  1021. listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
  1022. listItem.m_itemType.selectedIndex = 1;
  1023. }
  1024. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  1025. bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
  1026. listItem.m_imgNew.visible = isNew;
  1027. if (isNew)
  1028. {
  1029. ItemProxy.ReqSetItemRead(id).Coroutine();
  1030. }
  1031. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  1032. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
  1033. }
  1034. if (listItem.target.data == null)
  1035. {
  1036. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  1037. longPressGesture.once = true;
  1038. longPressGesture.onAction.Add(OnLongPress);
  1039. _listLongPress.Add(longPressGesture);
  1040. }
  1041. listItem.m_btnAni.visible = false;
  1042. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  1043. listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + scoreType;
  1044. listItem.m_txtTitle.text = partName;
  1045. listItem.target.data = id;
  1046. listItem.m_imgNeed.visible = _fightCfg != null && (_fightCfg.needItemId == id || _fightCfg.needSuitId == id);
  1047. UI_PartsListItem.ProxyEnd();
  1048. }
  1049. private void ListParts2Item(int index, GObject item)
  1050. {
  1051. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  1052. int id = (int)_currentList4[index];
  1053. string iconRes = "";
  1054. string partName = "";
  1055. string ext = "png";
  1056. if (listItem.target.data == null)
  1057. {
  1058. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  1059. longPressGesture.once = true;
  1060. longPressGesture.onAction.Add(OnLongPress);
  1061. _listLongPress.Add(longPressGesture);
  1062. }
  1063. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  1064. iconRes = itemCfg.res;
  1065. partName = itemCfg.name;
  1066. listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  1067. if (!_IsTeaPart) {
  1068. listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
  1069. listItem.m_itemType.selectedIndex = 0;
  1070. }
  1071. else
  1072. {
  1073. if (listItem.m_ListTag.data == null)
  1074. listItem.m_ListTag.itemRenderer = ListTagItem;
  1075. listItem.m_ListTag.data = itemCfg.tagsArr;
  1076. listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
  1077. listItem.m_itemType.selectedIndex = 1;
  1078. }
  1079. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  1080. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  1081. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
  1082. listItem.m_ScoreType.visible = true;
  1083. // int mainScore;
  1084. // int mainValuel;
  1085. // ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
  1086. listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + scoreType);
  1087. if (!_IsTeaPart) {
  1088. listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
  1089. listItem.m_itemType.selectedIndex = 0;
  1090. }
  1091. else
  1092. {
  1093. if (listItem.m_ListTag.data == null)
  1094. {
  1095. listItem.m_ListTag.itemRenderer = ListTagItem;
  1096. }
  1097. listItem.m_ListTag.data = itemCfg.tagsArr;
  1098. listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
  1099. listItem.m_itemType.selectedIndex = 1;
  1100. }
  1101. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  1102. listItem.m_txtTitle.text = partName;
  1103. listItem.target.data = id;
  1104. // listItem.m_txtScore.visible = false;
  1105. //listItem.m_ScoreType.visible = true;
  1106. listItem.m_imgNeed.visible = false;
  1107. listItem.m_btnAni.visible = false;
  1108. bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
  1109. listItem.m_imgNew.visible = isNew;
  1110. if (isNew)
  1111. {
  1112. ItemProxy.ReqSetItemRead(id).Coroutine();
  1113. }
  1114. UI_PartsListItem.ProxyEnd();
  1115. }
  1116. private void UpdateListPartsSelected()
  1117. {
  1118. GList list;
  1119. if (_ui.m_partsList.target.x == partsListX)
  1120. {
  1121. list = _ui.m_partsList.m_list;
  1122. }
  1123. else if (_ui.m_partsListSearch.target.x == partsListX)
  1124. {
  1125. list = _ui.m_partsListSearch.m_list;
  1126. }
  1127. else
  1128. {
  1129. return;
  1130. }
  1131. int count = list.numChildren;
  1132. int suitId = MyDressUpHelper.dressUpObj.suitId;
  1133. for (int i = 0; i < count; i++)
  1134. {
  1135. UI_PartsListItem listItem = UI_PartsListItem.Proxy(list.GetChildAt(i));
  1136. int id = (int)listItem.target.data;
  1137. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  1138. {
  1139. listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
  1140. }
  1141. else
  1142. {
  1143. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  1144. var isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
  1145. bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  1146. bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  1147. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  1148. }
  1149. UI_PartsListItem.ProxyEnd();
  1150. }
  1151. }
  1152. private void UpdateSearchListPartsSelected()
  1153. {
  1154. int count = _ui.m_partsListSearch.m_list.numChildren;
  1155. int suitId = MyDressUpHelper.dressUpObj.suitId;
  1156. for (int i = 0; i < count; i++)
  1157. {
  1158. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsListSearch.m_list.GetChildAt(i));
  1159. int id = (int)listItem.target.data;
  1160. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  1161. {
  1162. listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
  1163. }
  1164. else
  1165. {
  1166. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  1167. var isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
  1168. bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  1169. bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  1170. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  1171. }
  1172. UI_PartsListItem.ProxyEnd();
  1173. }
  1174. }
  1175. private void UpdateListSuitPartsSelected()
  1176. {
  1177. int count = _ui.m_partsList2.m_list.numChildren;
  1178. int suitId = MyDressUpHelper.dressUpObj.suitId;
  1179. for (int i = 0; i < count; i++)
  1180. {
  1181. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList2.m_list.GetChildAt(i));
  1182. int id = (int)listItem.target.data;
  1183. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  1184. var isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
  1185. bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  1186. bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  1187. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  1188. UI_PartsListItem.ProxyEnd();
  1189. }
  1190. }
  1191. private void ShowTaskHint()
  1192. {
  1193. _ui.m_btnClose.visible = true;
  1194. _ui.m_grpTips.visible = true;
  1195. string str = "";
  1196. if (!_IsTeaPart)
  1197. str = _levelCfg.hint;
  1198. else {
  1199. var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
  1200. str = teapartyRoleCfg[_TeaPartyID - 1].hint;
  1201. }
  1202. _ui.m_txtHint.text = str;
  1203. if (this._ui.m_txtHint.textHeight > this._ui.m_txtHint.textFormat.size * 2)
  1204. {
  1205. this._ui.m_txtHint.align = AlignType.Left;
  1206. }
  1207. else
  1208. {
  1209. this._ui.m_txtHint.align = AlignType.Center;
  1210. }
  1211. }
  1212. private void UpdateScore()
  1213. {
  1214. if (!_IsTeaPart)
  1215. _ui.m_txtScore.text = "" + FightDataManager.Instance.GetScore(InstanceZonesDataManager.roleData).ToString();
  1216. // GuideController.TryGuideDressUpFightViewBtnNext(_ui.m_btnNext);
  1217. else
  1218. _ui.m_txtMatch.text = "" + LeagueDataManager.Instance.GetTeaPartyMatchedValue(InstanceZonesDataManager.roleData);
  1219. }
  1220. private void OnClickBtnSearch()
  1221. {
  1222. int type = 0;
  1223. if (_IsTeaPart)
  1224. type = 1;
  1225. ViewManager.Show<DressFilterView>(new object[] { 0, 0, type}, new object[] { typeof(DressUpView).FullName});
  1226. }
  1227. private void OnClickBtnAutoPlay()
  1228. {
  1229. FightDataManager.Instance.autoPlay = _ui.m_btnAutoPlay.selected;
  1230. }
  1231. private void OnClickComNeed()
  1232. {
  1233. if (_fightCfg.needItemId <= 0 && _fightCfg.needSuitId <= 0)
  1234. {
  1235. return;
  1236. }
  1237. if (_fightCfg.needSuitId > 0)
  1238. {
  1239. ViewManager.Show<SuitPartsDetailView>(_fightCfg.needSuitId, new object[] { typeof(DressUpFightView).FullName, this.viewData });
  1240. }
  1241. else
  1242. {
  1243. int itemId = (int)_ui.m_compNeed.target.data;
  1244. object[] sourceDatas = new object[] { itemId, new object[] { typeof(DressUpFightView).FullName, this.viewData }, 1 };
  1245. GoodsItemTipsController.ShowItemTips(itemId, sourceDatas);
  1246. }
  1247. }
  1248. private void RenderListTagItem(int index, GObject obj)
  1249. {
  1250. UI.CommonGame.UI_ComTag item = UI.CommonGame.UI_ComTag.Proxy(obj);
  1251. string tag = _fightCfg.needTagsArr[index];
  1252. int tagType = TagCfgArray.Instance.GetCfg(tag).type;
  1253. item.m_txtTag.text = tag;
  1254. item.m_loaTag.url = ResPathUtil.GetCommonGameResPath("fzd_bqbq_" + tagType);
  1255. UI.CommonGame.UI_ComTag.ProxyEnd();
  1256. }
  1257. private bool CheckListCount(int type)
  1258. {
  1259. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  1260. {
  1261. return DressUpMenuSuitDataManager.GetSuitIDList().Count > 0;
  1262. }
  1263. else
  1264. {
  1265. return DressUpMenuItemDataManager.getItemDatasByType(type).Count > 0;
  1266. }
  1267. }
  1268. private void SendLog()
  1269. {
  1270. var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  1271. switch (levelCfg.type)
  1272. {
  1273. case ConstInstanceZonesType.Story:
  1274. LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.CHUN_ZHONG_LOU, 2);
  1275. break;
  1276. case ConstInstanceZonesType.Studio:
  1277. StudioCfg studioCfg = StudioCfgArray.Instance.GetCfg(levelCfg.chapterId);
  1278. if (studioCfg.funId == typeof(StudioMetalView).Name)
  1279. {
  1280. LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.JIN_SHU_XIU_FU, 2);
  1281. }
  1282. else if (studioCfg.funId == typeof(StudioFabricView).Name)
  1283. {
  1284. LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.ZHI_WU_XIU_FU, 2);
  1285. }
  1286. else if (studioCfg.funId == typeof(StudioPropertyView).Name)
  1287. {
  1288. LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHU_HUA_XIU_FU, 2);
  1289. }
  1290. break;
  1291. }
  1292. }
  1293. private void CheckGuide(object param)
  1294. {
  1295. if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0
  1296. || GuideDataManager.IsGuideFinish(ConstGuideId.START_FIGHT) <= 0
  1297. || GuideDataManager.IsGuideFinish(ConstGuideId.AUTOPLAY_FIGHT) <= 0)
  1298. {
  1299. UpdateToCheckGuide(null);
  1300. }
  1301. else
  1302. {
  1303. Timers.inst.Remove(CheckGuide);
  1304. }
  1305. _ui.m_loaGuide.visible = false;
  1306. }
  1307. protected override void UpdateToCheckGuide(object param)
  1308. {
  1309. if (!ViewManager.CheckIsTopView(this.viewCom) || _IsTeaPart) return;
  1310. int buyClothingIndex = 0;
  1311. int buyClothingSubIndex = 0;
  1312. int taozhuangIndex = 0;
  1313. int len = _ui.m_comListType1.m_listType.numChildren;
  1314. for (int i = 0; i < len; i++)
  1315. {
  1316. UI_TypeItem item = UI_TypeItem.Proxy(_ui.m_comListType1.m_listType.GetChildAt(i));
  1317. if (item != null)
  1318. {
  1319. int menuID = (int)item.target.data;
  1320. DressUpMenuItemCfg1 dressUpMenuItemCfg1 = DressUpMenuItemCfg1Array.Instance.GetCfg(menuID);
  1321. if (GuideDataManager.IsGuideFinish(ConstGuideId.START_FIGHT) <= 0 && dressUpMenuItemCfg1.type == ConstDressUpItemType.TAO_ZHUANG)
  1322. {
  1323. taozhuangIndex = i;
  1324. break;
  1325. }
  1326. if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0 && _fightCfg.needItemId > 0 && ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, dressUpMenuItemCfg1.id))
  1327. {
  1328. buyClothingIndex = i;
  1329. break;
  1330. }
  1331. }
  1332. UI_TypeItem.ProxyEnd();
  1333. }
  1334. buyClothingSubIndex = _currentList3.IndexOf(_fightCfg.needItemId);
  1335. GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.START_FIGHT, 3, "点击相应的分类,可以快速找到服饰。", taozhuangIndex);
  1336. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.START_FIGHT, 4, "", 0);
  1337. GuideController.TryGuide(_ui.m_btnNext, ConstGuideId.START_FIGHT, 5, "穿着完毕,来验证一下,换上的服饰是否符合需求。");
  1338. // GuideController.TryCompleteGuide(ConstGuideId.START_FIGHT, 5);
  1339. GuideController.TryGuide(_ui.m_compNeed.target, ConstGuideId.BUY_CLOTHING, 3, "当提示有“必需品”时,需要穿上对应物品才能通关。");
  1340. GuideController.TryGuide(_ui.m_btnRecommend, ConstGuideId.BUY_CLOTHING, 7, "点击推荐搭配,可以快速穿上必须品。");
  1341. GuideController.TryGuide(_ui.m_btnAutoPlay, ConstGuideId.BUY_CLOTHING, 8, "勾选后,会自动进行比拼哦~~");
  1342. GuideController.TryCompleteGuide(ConstGuideId.BUY_CLOTHING, 8);
  1343. GuideController.TryGuide(_ui.m_btnHint, ConstGuideId.FIGHT_TIPS, 1, "这次换装需要获得别人的认可呢。");
  1344. GuideController.TryCompleteGuide(ConstGuideId.FIGHT_TIPS, 1);
  1345. GuideController.TryGuide(_ui.m_btnRecommend, ConstGuideId.AUTOPLAY_FIGHT, 1, "", -1, true, 0, true, true);//这个引导自动完成,测试中策划要求件推荐搭配引导提前,为避免意外,没有改引导表,而是直接吧推荐搭配加到买必须品的引导力,这个引导自动完成
  1346. if (GuideDataManager.currentGuideId == GuideCfgArray.Instance.GetCfg(ConstGuideId.AUTOPLAY_FIGHT).id) GuideController.TryCompleteGuideIndex(ConstGuideId.AUTOPLAY_FIGHT, 1);
  1347. GuideController.TryCompleteGuide(ConstGuideId.AUTOPLAY_FIGHT, 1);
  1348. }
  1349. protected override void TryCompleteGuide()
  1350. {
  1351. base.TryCompleteGuide();
  1352. // GuideController.TryCompleteGuide(ConstGuideId.START_FIGHT, 5);
  1353. }
  1354. private void TeaPartyStatuChange()
  1355. {
  1356. if (_IsTeaPart && LeagueDataManager.Instance.TeaPartyStatus == LeagueTeaPartyStatus.YesGo)
  1357. {
  1358. AlertUI.Show("管理员已开启茶会,请前往挑战!")
  1359. .SetLeftButton(false).SetRightButton(true, "确定", (object data) =>
  1360. {
  1361. ViewManager.Show<LeagueTeaPartyView>();
  1362. });
  1363. }
  1364. }
  1365. }
  1366. }