DressUpFightView.cs 64 KB

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