DressUpFightView.cs 63 KB

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