DressUpFightView.cs 63 KB

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