DressUpFightView.cs 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032
  1. using UI.DressUp;
  2. using FairyGUI;
  3. using UnityEngine;
  4. using System.Collections.Generic;
  5. using System;
  6. using ET;
  7. namespace GFGGame
  8. {
  9. public class DressUpFightView : BaseView
  10. {
  11. private UI_DressUpFightUI _ui;
  12. private int _fightID;
  13. private int _levelID;
  14. private float listType1X = 0;
  15. private float partsListX = 0;
  16. private DressUpListType currentListType;
  17. private int[] _currentList2;
  18. private GameObject _scenePrefab;
  19. private GameObject _sceneObject;
  20. private List<int> _currentList3 = new List<int>();
  21. private List<int> _currentList4 = new List<int>();
  22. private int _currentMenuType;
  23. private int _currentSuitId;
  24. private StoryLevelCfg _levelCfg;
  25. private StoryFightCfg _fightCfg;
  26. private const int SORT_BY_HIGH_SCORE = 0;
  27. private const int SORT_BY_LOW_SCORE = 1;
  28. private int _scoreIndex = SORT_BY_HIGH_SCORE;
  29. public override void Dispose()
  30. {
  31. if (_sceneObject != null)
  32. {
  33. GameObject.Destroy(_sceneObject);
  34. _sceneObject = null;
  35. }
  36. if (_scenePrefab != null)
  37. {
  38. GFGAsset.Release(ResPathUtil.GetPrefabPath("SceneDressUp"));
  39. _scenePrefab = null;
  40. }
  41. // UI_TypeItem.ClearProxy();
  42. // UI_PartsListItem.ClearProxy();
  43. base.Dispose();
  44. }
  45. protected override void Init()
  46. {
  47. base.Init();
  48. packageName = UI_DressUpFightUI.PACKAGE_NAME;
  49. _ui = UI_DressUpFightUI.Create();
  50. viewCom = _ui.target;
  51. isfullScreen = true;
  52. _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneDressUp"));
  53. _ui.m_btnClose.width = GRoot.inst.width;
  54. _ui.m_btnClose.height = GRoot.inst.height;
  55. _ui.m_btnClose.AddRelation(GRoot.inst, RelationType.Size);
  56. }
  57. protected override void OnInit()
  58. {
  59. base.OnInit();
  60. _ui.m_groupTaskHint.visible = false;
  61. _ui.m_btnRepeal.visible = false;
  62. _ui.m_btnRenewal.visible = false;
  63. _ui.m_btnSearch.visible = true;
  64. // _ui.m_comboBox.items = new string[] { "我的套装一", "我的套装二", "我的套装三", "我的套装四", "我的套装五", "我的套装六" };
  65. _ui.m_partsList.m_comboBoxRarity.items = new string[] { "高分优先", "低分优先" };
  66. InitLists();
  67. _ui.m_partsList.m_comboBoxRarity.onChanged.Add(OnComboBoxRarityChanged);
  68. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  69. _ui.m_btnHome.onClick.Add(OnClickBtnHome);
  70. // _ui.m_btnClothingShop.onClick.Add(OnClickBtnClothingShop);
  71. // _ui.m_comboBox.onChanged.Add(OnComboBoxChanged);
  72. _ui.m_comListType1.m_listType.onClickItem.Add(OnClickListType1Item);
  73. _ui.m_comListType2.m_listType.onClickItem.Add(OnClickListType2Item);
  74. _ui.m_partsList.m_list.onClickItem.Add(OnClickPartsListItem);
  75. _ui.m_partsList2.m_list.onClickItem.Add(OnClickSuitPartsListItem);
  76. _ui.m_touchPad.onClick.Add(OnTouchPad);
  77. _ui.m_btnHint.onClick.Add(OnClickBtnHint);
  78. _ui.m_btnGuide.onClick.Add(OnTouchPad);
  79. _ui.m_btnClose.onClick.Add(OnClickBtnClose);
  80. _ui.m_btnDelete.onClick.Add(OnClickBtnDelete);
  81. _ui.m_btnNext.onClick.Add(OnClickBtnNext);
  82. _ui.m_btnRecommend.onClick.Add(OnClickBtnRecommend);
  83. _ui.m_btnSearch.onClick.Add(OnClickBtnSearch);
  84. _ui.m_btnAutoPlay.onClick.Add(OnClickBtnAutoPlay);
  85. _ui.m_compNeed.target.onClick.Add(OnClickComNeed);
  86. _ui.m_compNeed.m_listTag.itemRenderer = RenderListTagItem;
  87. // _ui.m_btnShow.onClick.Add(OnClickBtnShow);
  88. // _ui.m_btnHide.onClick.Add(OnClickBtnHide);
  89. // _ui.m_loaShow.onClick.Add(OnClickLoaShow);
  90. // _ui.m_btnHide.visible = false;
  91. // EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdatePartsListSort);
  92. _ui.m_partsList2.m_comboBoxRarity.visible = false;
  93. }
  94. protected override void AddEventListener()
  95. {
  96. base.AddEventListener();
  97. EventAgent.AddEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
  98. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
  99. EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdatePartsListSort);
  100. EventAgent.AddEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
  101. }
  102. protected override void OnShown()
  103. {
  104. base.OnShown();
  105. InstanceZonesDataManager.usedRecommend = false;
  106. // _ui.m_comboBox.title = "我的套装";
  107. _ui.m_txtRecommendCount.SetVar("v1", "" + GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount)).FlushVars();
  108. _ui.m_txtRecommendCount.SetVar("v2", GlobalCfgArray.globalCfg.recommendCount.ToString()).FlushVars();
  109. _ui.m_btnRecommend.enabled = true;// GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount) > 0;
  110. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  111. _ui.m_btnAutoPlay.selected = EquipDataCache.cacher.autoPlay;
  112. _ui.m_btnAutoPlay.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
  113. _levelID = (int)viewData;
  114. InstanceZonesDataManager.currentLevelCfgId = _levelID;
  115. _levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  116. _fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
  117. if (_levelCfg.type == ConstInstanceZonesType.Field)
  118. {
  119. _fightCfg.scoreType = FieldDataManager.Instance.fieldInfos.theme;
  120. _ui.m_btnAutoPlay.visible = false;
  121. }
  122. _ui.m_compNeed.target.visible = _fightCfg.needItemId > 0 || _fightCfg.needSuitId > 0 || _fightCfg.needTagsArr.Length > 0;
  123. if (_ui.m_compNeed.target.visible)
  124. {
  125. _ui.m_compNeed.m_c1.selectedIndex = 0;
  126. if (_fightCfg.needItemId > 0)
  127. {
  128. _ui.m_compNeed.m_txtNeedName.text = ItemUtil.GetItemName(_fightCfg.needItemId);
  129. _ui.m_compNeed.target.data = _fightCfg.needItemId;
  130. }
  131. else if (_fightCfg.needSuitId > 0)
  132. {
  133. _ui.m_compNeed.m_txtNeedName.text = ItemUtil.GetSuitName(_fightCfg.needSuitId);
  134. _ui.m_compNeed.target.data = _fightCfg.needSuitId;
  135. }
  136. else
  137. {
  138. _ui.m_compNeed.m_c1.selectedIndex = 1;
  139. _ui.m_compNeed.m_listTag.numItems = _fightCfg.needTagsArr.Length;
  140. }
  141. }
  142. InstanceZonesDataManager.currentScoreType = _fightCfg.scoreType;
  143. //一级菜单
  144. _ui.m_comListType1.m_listType.RemoveChildrenToPool();
  145. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 1;
  146. //_ui.m_comListType1.m_listType1.ResizeToFit(_ui.m_listType1.numItems);
  147. float maxHeight = _ui.target.height - _ui.m_comListType1.m_listType.y - DressUpView.BOTTOM_BLANK;
  148. if (_ui.m_comListType1.m_listType.height > maxHeight)
  149. {
  150. _ui.m_comListType1.m_listType.height = maxHeight;
  151. }
  152. _ui.m_comListType1.target.x = _ui.target.width;
  153. _ui.m_comListType2.target.x = _ui.target.width;
  154. _ui.m_partsList.target.x = _ui.target.width;
  155. _ui.m_partsList2.target.x = _ui.target.width;
  156. _ui.m_scoreType.url = "ui://CommonGame/kp_sx_" + _fightCfg.scoreType;
  157. this.showListType1();
  158. if (_sceneObject == null)
  159. {
  160. _sceneObject = GameObject.Instantiate(_scenePrefab);
  161. EquipDataCache.cacher.setSceneObj(_sceneObject);
  162. EquipDataCache.cacher.PutOnDefaultSuitSaved();
  163. }
  164. UpdateScore();
  165. SendLog();
  166. Timers.inst.AddUpdate(CheckGuide);
  167. }
  168. protected override void OnHide()
  169. {
  170. base.OnHide();
  171. _ui.m_groupTaskHint.visible = false;
  172. if (_sceneObject != null)
  173. {
  174. GameObject.Destroy(_sceneObject);
  175. _sceneObject = null;
  176. }
  177. _fightCfg = null;
  178. _levelCfg = null;
  179. DressUpMenuItemDataManager.Clear();
  180. Timers.inst.Remove(CheckGuide);
  181. }
  182. protected override void RemoveEventListener()
  183. {
  184. base.RemoveEventListener();
  185. EventAgent.RemoveEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
  186. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
  187. EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdatePartsListSort);
  188. EventAgent.RemoveEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
  189. }
  190. private void OnClickBtnBack()
  191. {
  192. Alert.Show("是否确定退出?")
  193. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  194. {
  195. if (_levelCfg.type == ConstInstanceZonesType.Studio)
  196. {
  197. ViewManager.Show(StudioDataManager.Instance.VIEW_NAME, new object[] { StudioDataManager.Instance.TYPE_SELECT_INDEX, StudioDataManager.Instance.PROPERTY_SELECT_INDEX }, ViewManager.GetGoBackDatas(StudioDataManager.Instance.VIEW_NAME));
  198. }
  199. else if (_levelCfg.type == ConstInstanceZonesType.Field)
  200. {
  201. ViewManager.GoBackFrom(ViewName.DRESS_UP_FIGHT_VIEW);
  202. }
  203. else
  204. {
  205. // ViewManager.GoBackFrom(ViewName.STORY_CHAPTER_VIEW);
  206. ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, _levelCfg.chapterId, new object[] { ViewName.STORY_CHAPTER_LIST_VIEW });
  207. }
  208. EquipDataCache.cacher.TakeOffAll();
  209. this.Hide();
  210. });
  211. // ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapter);
  212. }
  213. private void OnClickBtnHome()
  214. {
  215. Alert.Show("是否返回?")
  216. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  217. {
  218. EquipDataCache.cacher.TakeOffAll();
  219. GameController.GoBackToMainView();
  220. });
  221. }
  222. private void OnClickBtnClothingShop()
  223. {
  224. ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, new object[] { null, _fightCfg.scoreType }, null, false, true);
  225. }
  226. private void OnClickListType1Item(EventContext context)
  227. {
  228. // GuideController.HideGuide();
  229. GObject typeItem = context.data as GObject;
  230. int order = (int)typeItem.data;
  231. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[order - 1];
  232. if (item1.subMenusArr.Length > 0)
  233. {
  234. this.showListType2(item1.subMenusArr);
  235. }
  236. else
  237. {
  238. if (this.showListParts(item1.type) == false)
  239. {
  240. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  241. return;
  242. }
  243. this.showListParts(item1.type);
  244. }
  245. this.hideListType1();
  246. UpdateListPartsSelected();
  247. }
  248. private void OnClickListType2Item(EventContext context)
  249. {
  250. GObject typeItem = context.data as GObject;
  251. int order = (int)typeItem.data;
  252. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[order - 1];
  253. if (this.showListParts(item2.type) == false)
  254. {
  255. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  256. return;
  257. }
  258. this.hideListType2();
  259. }
  260. private void OnClickPartsListItem(EventContext context)
  261. {
  262. GObject listItem = context.data as GObject;
  263. int id = (int)listItem.data;
  264. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  265. {
  266. this.showListParts2(id);
  267. this.hideListParts();
  268. EquipDataCache.cacher.PutOnSuitCfg(id, false, true);
  269. }
  270. else
  271. {
  272. EquipDataCache.cacher.TryCancelSuit(id);
  273. EquipDataCache.cacher.AddOrRemove(id, true);
  274. }
  275. UpdateListPartsSelected();
  276. UpdateListSuitPartsSelected();
  277. }
  278. private void OnClickSuitPartsListItem(EventContext context)
  279. {
  280. GObject listItem = (GObject)context.data as GObject;
  281. int id = (int)listItem.data;
  282. EquipDataCache.cacher.TryCancelSuit(id);
  283. EquipDataCache.cacher.AddOrRemove(id, true);
  284. UpdateListSuitPartsSelected();
  285. }
  286. private void OnTouchPad()
  287. {
  288. if (this.currentListType == DressUpListType.List4)
  289. {
  290. this.hideListParts2();
  291. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  292. }
  293. else if (this.currentListType == DressUpListType.List3)
  294. {
  295. if (_currentList2 != null)
  296. {
  297. this.showListType2();
  298. }
  299. else
  300. {
  301. this.showListType1();
  302. }
  303. this.hideListParts();
  304. }
  305. else if (this.currentListType == DressUpListType.List2)
  306. {
  307. this.showListType1();
  308. this.hideListType2();
  309. }
  310. }
  311. private void OnClickBtnHint()
  312. {
  313. this.ShowTaskHint();
  314. }
  315. private void OnClickBtnDelete()
  316. {
  317. EquipDataCache.cacher.TakeOffAll();
  318. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  319. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  320. }
  321. private void OnClickBtnClose()
  322. {
  323. _ui.m_groupTaskHint.visible = false;
  324. }
  325. private void OnClickBtnNext()
  326. {
  327. if (!EquipDataCache.cacher.CheckPutOnFinish())
  328. {
  329. Alert.Show("只有换好衣服才能出门哦~")
  330. .SetRightButton(true, "好的");
  331. return;
  332. }
  333. int _suitId = DressUpMenuSuitDataManager.CheckCurDressIsSuit(); ;
  334. if (_fightCfg.needItemId > 0 && (_suitId <= 0 && EquipDataCache.cacher.equipDatas.IndexOf(_fightCfg.needItemId) < 0 || _suitId > 0 && Array.IndexOf(SuitCfgArray.Instance.GetCfg(_suitId).partsArr, _fightCfg.needItemId) < 0) || _fightCfg.needSuitId > 0 && _suitId != _fightCfg.needSuitId)
  335. {
  336. Alert.Show("未穿戴必须品~").SetRightButton(true, "好的");
  337. return;
  338. }
  339. if (CardDataManager.GetCardListByRarity(0).Count > 0)
  340. {
  341. ViewManager.Show<StoryCardChoose>(_fightCfg.scoreType);
  342. }
  343. else
  344. {
  345. StartCalculateScore();
  346. }
  347. }
  348. private void StartCalculateScore()
  349. {
  350. //不可移动代码位置
  351. bool hasFightTarget = _fightCfg.targetName != null && _fightCfg.targetName.Length > 0;
  352. if (_levelCfg.type == ConstInstanceZonesType.Field)
  353. {
  354. FieldFightDataManager.Instance.CurrentCardId = InstanceZonesDataManager.currentCardId;
  355. FieldFightDataManager.Instance.CurrentScoreType = InstanceZonesDataManager.currentScoreType;
  356. FieldFightDataManager.Instance.currentLevelCfgId = InstanceZonesDataManager.currentLevelCfgId;
  357. FieldFightDataManager.Instance.equipDatas = EquipDataCache.cacher.equipDatas;
  358. }
  359. if (hasFightTarget)
  360. {
  361. ViewManager.Show(ViewName.STORY_FIGHT_TARGET_VIEW);
  362. }
  363. else
  364. {
  365. ViewManager.Show(ViewName.STORY_FIGHT_SINGLE_VIEW);
  366. }
  367. this.Hide();
  368. }
  369. private void OnClickBtnRecommend()
  370. {
  371. if (this.currentListType == DressUpListType.List4)
  372. {
  373. this.hideListParts2();
  374. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  375. }
  376. EquipDataCache.cacher.TryCancelSuit(_currentSuitId);
  377. InstanceZonesDataManager.usedRecommend = true;
  378. EquipDataCache.cacher.PutOnRecommendItems();
  379. UpdateListPartsSelected();
  380. UpdateListSuitPartsSelected();
  381. }
  382. private void InitLists()
  383. {
  384. _ui.m_comListType2.m_listType.itemRenderer = ListType2Item;
  385. _ui.m_partsList.m_list.itemRenderer = ListPartsItem;
  386. _ui.m_partsList2.m_list.itemRenderer = ListParts2Item;
  387. listType1X = _ui.m_comListType1.target.x;
  388. partsListX = _ui.m_partsList.target.x - _ui.m_partsList.target.width;
  389. //一级菜单
  390. _ui.m_comListType1.m_listType.itemRenderer = ListType1Item;
  391. }
  392. private void showListType1()
  393. {
  394. _currentList2 = null;
  395. currentListType = DressUpListType.List1;
  396. GTween.To(_ui.target.width, listType1X, 0.5f)
  397. .SetTarget(_ui.m_comListType1.target)
  398. .OnUpdate((GTweener t) =>
  399. {
  400. _ui.m_comListType1.target.x = t.value.x;
  401. });
  402. }
  403. private void hideListType1()
  404. {
  405. GTween.To(listType1X, _ui.target.width, 0.5f)
  406. .SetTarget(_ui.m_comListType1.target)
  407. .OnUpdate((GTweener t) =>
  408. {
  409. _ui.m_comListType1.target.x = t.value.x;
  410. });
  411. }
  412. private void showListType2(int[] menuStrArr = null)
  413. {
  414. currentListType = DressUpListType.List2;
  415. if (menuStrArr != null && menuStrArr.Length > 0)
  416. {
  417. int len = menuStrArr.Length;
  418. _currentList2 = menuStrArr.Clone() as int[];
  419. _ui.m_comListType2.m_listType.RemoveChildrenToPool();
  420. _ui.m_comListType2.m_listType.numItems = len;
  421. //_ui.m_listType2.ResizeToFit(_ui.m_listType2.numItems);
  422. float maxHeight = _ui.target.height - _ui.m_comListType2.m_listType.y - DressUpView.BOTTOM_BLANK;
  423. if (_ui.m_comListType2.m_listType.height > maxHeight)
  424. {
  425. _ui.m_comListType2.m_listType.height = maxHeight;
  426. }
  427. }
  428. GTween.To(_ui.target.width, listType1X, 0.5f)
  429. .SetTarget(_ui.m_comListType2.target)
  430. .OnUpdate((GTweener t) =>
  431. {
  432. _ui.m_comListType2.target.x = t.value.x;
  433. });
  434. }
  435. private void hideListType2()
  436. {
  437. GTween.To(listType1X, _ui.target.width, 0.5f)
  438. .SetTarget(_ui.m_comListType2.target)
  439. .OnUpdate((GTweener t) =>
  440. {
  441. _ui.m_comListType2.target.x = t.value.x;
  442. });
  443. }
  444. private bool showListParts(int type, bool selectItem = false)
  445. {
  446. _currentMenuType = type;
  447. UpdatePartsListSort();
  448. if (_ui.m_partsList.m_list.numItems <= 0) return false;
  449. _ui.m_partsList.m_list.ResizeToFit(_ui.m_partsList.m_list.numItems);
  450. float maxHeight = _ui.m_partsList.target.height - _ui.m_partsList.m_list.y;
  451. if (_ui.m_partsList.m_list.height > maxHeight)
  452. {
  453. _ui.m_partsList.m_list.height = maxHeight;
  454. }
  455. if (selectItem)
  456. {
  457. int itemId = EquipDataCache.cacher.GetItemIdBuyType(_currentMenuType);
  458. if (itemId > 0)
  459. {
  460. int index = _currentList3.IndexOf(itemId);
  461. _ui.m_partsList.m_list.ScrollToView(index);
  462. }
  463. }
  464. currentListType = DressUpListType.List3;
  465. GTween.To(_ui.target.width, partsListX, 0.5f)
  466. .SetTarget(_ui.m_partsList)
  467. .OnUpdate((GTweener t) =>
  468. {
  469. _ui.m_partsList.target.x = t.value.x;
  470. });
  471. UpdateListPartsSelected();
  472. return true;
  473. }
  474. private void OnComboBoxRarityChanged()
  475. {
  476. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  477. this.UpdatePartsListSort();
  478. }
  479. private void UpdatePartsListSort()
  480. {
  481. if (_currentMenuType == 0) return;
  482. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  483. {
  484. _currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();
  485. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  486. {
  487. _currentList3 = SuitUtil.SortSuitListByHighScore(_currentList3);
  488. }
  489. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  490. {
  491. _currentList3 = SuitUtil.SortSuitListByLowScore(_currentList3);
  492. }
  493. else
  494. {
  495. _currentList3.Reverse();
  496. }
  497. }
  498. else
  499. {
  500. _currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
  501. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  502. {
  503. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3);
  504. }
  505. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  506. {
  507. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3);
  508. }
  509. else
  510. {
  511. _currentList3.Reverse();
  512. }
  513. }
  514. if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  515. {
  516. _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3, _currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG);
  517. }
  518. else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  519. {
  520. _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3, _currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG);
  521. }
  522. //必穿品放在列表最前面
  523. if (_fightCfg.needItemId > 0)
  524. {
  525. int index = _currentList3.IndexOf(_fightCfg.needItemId);
  526. if (index >= 0)
  527. {
  528. int item = _currentList3[index];
  529. _currentList3.Remove(_currentList3[index]);
  530. _currentList3.Insert(0, item);
  531. }
  532. }
  533. else if (_fightCfg.needSuitId > 0)
  534. {
  535. int index = _currentList3.IndexOf(_fightCfg.needSuitId);
  536. if (index >= 0)
  537. {
  538. int item = _currentList3[index];
  539. _currentList3.Remove(_currentList3[index]);
  540. _currentList3.Insert(0, item);
  541. }
  542. }
  543. _ui.m_partsList.m_list.RemoveChildrenToPool();
  544. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  545. }
  546. private void UpdateSuitPartsListSort()
  547. {
  548. if (_currentMenuType == 0) return;
  549. _currentList4 = new List<int>(SuitCfgManager.Instance.GetSuitItems(_currentSuitId, true));
  550. if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  551. {
  552. _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4, false);
  553. }
  554. else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  555. {
  556. _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4, false);
  557. }
  558. _ui.m_partsList2.m_list.RemoveChildrenToPool();
  559. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  560. }
  561. private void hideListParts()
  562. {
  563. GTween.To(partsListX, _ui.target.width, 0.5f)
  564. .SetTarget(_ui.m_partsList)
  565. .OnUpdate((GTweener t) =>
  566. {
  567. _ui.m_partsList.target.x = t.value.x;
  568. });
  569. }
  570. private void showListParts2(int suitId)
  571. {
  572. _currentSuitId = suitId;
  573. _ui.m_partsList2.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  574. this.UpdateSuitPartsListSort();
  575. _ui.m_partsList2.m_list.ResizeToFit(_ui.m_partsList2.m_list.numItems);
  576. float maxHeight = _ui.m_partsList2.target.height - _ui.m_partsList2.m_list.y;// - DressUpView.BOTTOM_BLANK;
  577. if (_ui.m_partsList2.m_list.height > maxHeight)
  578. {
  579. _ui.m_partsList2.m_list.height = maxHeight;
  580. }
  581. currentListType = DressUpListType.List4;
  582. GTween.To(_ui.target.width, partsListX, 0.5f)
  583. .SetTarget(_ui.m_partsList2)
  584. .OnUpdate((GTweener t) =>
  585. {
  586. _ui.m_partsList2.target.x = t.value.x;
  587. });
  588. }
  589. private void hideListParts2()
  590. {
  591. _currentMenuType = ConstDressUpItemType.TAO_ZHUANG;
  592. GTween.To(partsListX, _ui.target.width, 0.5f)
  593. .SetTarget(_ui.m_partsList2)
  594. .OnUpdate((GTweener t) =>
  595. {
  596. _ui.m_partsList2.target.x = t.value.x;
  597. });
  598. }
  599. private void ListType1Item(int index, GObject item)
  600. {
  601. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  602. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[index];
  603. typeItem.m_icon.url = "ui://DressUp/hz_fenleitu_" + item1.id;
  604. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconzi_" + item1.id;
  605. typeItem.target.data = item1.id;
  606. typeItem.m_imgNeed.visible = ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, item1.id);
  607. UI_TypeItem.ProxyEnd();
  608. }
  609. private void ListType2Item(int index, GObject item)
  610. {
  611. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  612. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[_currentList2[index] - 1];
  613. typeItem.m_icon.url = "ui://DressUp/hz_fenleituej_" + item2.id;
  614. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconziej_" + item2.id;
  615. typeItem.target.data = item2.id;
  616. var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
  617. typeItem.m_imgNeed.visible = subType == item2.type;
  618. UI_TypeItem.ProxyEnd();
  619. }
  620. private void ListPartsItem(int index, GObject item)
  621. {
  622. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  623. int id = (int)_currentList3[index];
  624. string iconRes = "";
  625. string partName = "";
  626. string ext = "png";
  627. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  628. {
  629. SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
  630. iconRes = suitCfg.res;
  631. partName = suitCfg.name;
  632. listItem.m_iconSelected.visible = false;
  633. listItem.m_txtScore.text = "" + SuitUtil.GetSuitScore(id);
  634. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, true);
  635. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + suitCfg.rarity;
  636. }
  637. else
  638. {
  639. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  640. iconRes = itemCfg.res;
  641. partName = itemCfg.name;
  642. listItem.m_iconSelected.visible = EquipDataCache.cacher.CheckDressUpItemIsOn(id);
  643. listItem.m_txtScore.text = "" + DressUpMenuItemDataManager.GetItemScore(id);
  644. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  645. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  646. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
  647. }
  648. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  649. listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + _fightCfg.scoreType;
  650. listItem.m_txtTitle.text = partName;
  651. listItem.target.data = id;
  652. listItem.m_imgNeed.visible = _fightCfg.needItemId == id || _fightCfg.needSuitId == id;
  653. UI_PartsListItem.ProxyEnd();
  654. }
  655. private void ListParts2Item(int index, GObject item)
  656. {
  657. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  658. int id = (int)_currentList4[index];
  659. string iconRes = "";
  660. string partName = "";
  661. string ext = "png";
  662. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  663. iconRes = itemCfg.res;
  664. partName = itemCfg.name;
  665. listItem.m_iconSelected.visible = EquipDataCache.cacher.CheckDressUpItemIsOn(id);
  666. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  667. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  668. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
  669. listItem.m_ScoreType.visible = true;
  670. // int mainScore;
  671. // int mainValuel;
  672. // ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
  673. listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + _fightCfg.scoreType);
  674. listItem.m_txtScore.text = "" + DressUpMenuItemDataManager.GetItemScore(id, _fightCfg.scoreType);
  675. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  676. listItem.m_txtTitle.text = partName;
  677. listItem.target.data = id;
  678. // listItem.m_txtScore.visible = false;
  679. //listItem.m_ScoreType.visible = true;
  680. listItem.m_imgNeed.visible = false;
  681. UI_PartsListItem.ProxyEnd();
  682. }
  683. private void UpdateListPartsSelected()
  684. {
  685. int count = _ui.m_partsList.m_list.numChildren;
  686. int suitId = DressUpMenuSuitDataManager.CheckCurDressIsSuit();
  687. for (int i = 0; i < count; i++)
  688. {
  689. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList.m_list.GetChildAt(i));
  690. int id = (int)listItem.target.data;
  691. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  692. {
  693. listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
  694. }
  695. else
  696. {
  697. bool isPutOn = EquipDataCache.cacher.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  698. bool isSuit = !DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && SuitCfgManager.Instance.GetItemSuitId(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  699. bool isSceneSuit = DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  700. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  701. }
  702. UI_PartsListItem.ProxyEnd();
  703. }
  704. }
  705. private void UpdateListSuitPartsSelected()
  706. {
  707. int count = _ui.m_partsList2.m_list.numChildren;
  708. int suitId = DressUpMenuSuitDataManager.CheckCurDressIsSuit();
  709. for (int i = 0; i < count; i++)
  710. {
  711. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList2.m_list.GetChildAt(i));
  712. int id = (int)listItem.target.data;
  713. bool isPutOn = EquipDataCache.cacher.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  714. bool isSuit = !DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && SuitCfgManager.Instance.GetItemSuitId(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  715. bool isSceneSuit = DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  716. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  717. UI_PartsListItem.ProxyEnd();
  718. }
  719. }
  720. private void ShowTaskHint()
  721. {
  722. _ui.m_groupTaskHint.visible = true;
  723. _ui.m_txtHint.text = _levelCfg.hint;
  724. if (this._ui.m_txtHint.textHeight > this._ui.m_txtHint.textFormat.size * 2)
  725. {
  726. this._ui.m_txtHint.align = AlignType.Left;
  727. }
  728. else
  729. {
  730. this._ui.m_txtHint.align = AlignType.Center;
  731. }
  732. }
  733. private void UpdateScore()
  734. {
  735. _ui.m_txtScore.text = "" + EquipDataCache.cacher.score;
  736. // GuideController.TryGuideDressUpFightViewBtnNext(_ui.m_btnNext);
  737. }
  738. private void OnClickBtnSearch()
  739. {
  740. ViewManager.Show<DressFilterView>(false, new object[] { ViewName.DRESS_UP_VIEW });
  741. }
  742. private void OnClickBtnAutoPlay()
  743. {
  744. EquipDataCache.cacher.autoPlay = _ui.m_btnAutoPlay.selected;
  745. }
  746. // private void OnClickBtnShow()
  747. // {
  748. // Timers.inst.Remove(SetBtnShowVisable);
  749. // _ui.m_c1.selectedIndex = 0;
  750. // _ui.m_btnHide.visible = true;
  751. // _ui.m_loaShow.visible = false;
  752. // _ui.m_btnShow.visible = false;
  753. // }
  754. // private void OnClickBtnHide()
  755. // {
  756. // _ui.m_c1.selectedIndex = 1;
  757. // _ui.m_btnHide.visible = false;
  758. // _ui.m_btnShow.visible = true;
  759. // _ui.m_loaShow.visible = true;
  760. // Timers.inst.Add(2f, 1, SetBtnShowVisable);
  761. // }
  762. // private void OnClickLoaShow()
  763. // {
  764. // Timers.inst.Remove(SetBtnShowVisable);
  765. // _ui.m_btnShow.alpha = 1;
  766. // Timers.inst.Add(2f, 1, SetBtnShowVisable);
  767. // _ui.m_btnShow.enabled = true;
  768. // }
  769. // private void SetBtnShowVisable(object param)
  770. // {
  771. // _ui.m_btnShow.enabled = false;
  772. // GTween.To(1, 0, 0.3f).SetTarget(_ui.m_btnShow, TweenPropType.Alpha);
  773. // }
  774. private void OnClickComNeed()
  775. {
  776. if (_fightCfg.needItemId <= 0 && _fightCfg.needSuitId <= 0)
  777. {
  778. return;
  779. }
  780. if (_fightCfg.needSuitId > 0)
  781. {
  782. ViewManager.Show(ViewName.SUIT_GUIDE_VIEW, new object[] { _ui.m_compNeed.target.data, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData } }, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData });
  783. }
  784. else
  785. {
  786. ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { _ui.m_compNeed.target.data, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData }, 1 });
  787. }
  788. }
  789. private void RenderListTagItem(int index, GObject obj)
  790. {
  791. UI.CommonGame.UI_ListTagItem item = UI.CommonGame.UI_ListTagItem.Proxy(obj);
  792. string[] tag = _fightCfg.needTagsArr[index].Split('_');
  793. item.m_loaTag.url = ResPathUtil.GetCommonGameResPath("fzd_bqbq_" + tag[0]);
  794. item.m_txtTag.text = tag[1];
  795. UI.CommonGame.UI_ListTagItem.ProxyEnd();
  796. }
  797. private bool CheckListCount(int type)
  798. {
  799. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  800. {
  801. return DressUpMenuSuitDataManager.GetSuitIDList().Count > 0;
  802. }
  803. else
  804. {
  805. return DressUpMenuItemDataManager.getItemDatasByType(type).Count > 0;
  806. }
  807. }
  808. private void SendLog()
  809. {
  810. var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  811. switch (levelCfg.type)
  812. {
  813. case ConstInstanceZonesType.Story:
  814. LogServerHelper.SendNodeLog((int)PlayParticipationEnum.CHUN_ZHONG_LOU, 2);
  815. break;
  816. case ConstInstanceZonesType.Studio:
  817. StudioCfg studioCfg = StudioCfgArray.Instance.GetCfg(levelCfg.chapterId);
  818. if (studioCfg.funId == typeof(StudioMetalView).Name)
  819. {
  820. LogServerHelper.SendNodeLog((int)PlayParticipationEnum.JIN_SHU_XIU_FU, 2);
  821. }
  822. else if (studioCfg.funId == typeof(StudioFabricView).Name)
  823. {
  824. LogServerHelper.SendNodeLog((int)PlayParticipationEnum.ZHI_WU_XIU_FU, 2);
  825. }
  826. else if (studioCfg.funId == typeof(StudioPropertyView).Name)
  827. {
  828. LogServerHelper.SendNodeLog((int)PlayParticipationEnum.SHU_HUA_XIU_FU, 2);
  829. }
  830. break;
  831. }
  832. }
  833. private void CheckGuide(object param)
  834. {
  835. if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0
  836. || GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0
  837. || GuideDataManager.IsGuideFinish(ConstGuideId.FIGHT_TIPS) <= 0)
  838. {
  839. UpdateToCheckGuide(null);
  840. }
  841. else
  842. {
  843. Timers.inst.Remove(CheckGuide);
  844. }
  845. }
  846. protected override void UpdateToCheckGuide(object param)
  847. {
  848. if (!ViewManager.CheckIsTopView(this.viewCom)) return;
  849. int syIndex = 0;
  850. int xzIndex = 0;
  851. int buyClothingIndex = 0;
  852. int buyClothingSubIndex = 0;
  853. int len = _ui.m_comListType1.m_listType.numChildren;
  854. for (int i = 0; i < len; i++)
  855. {
  856. UI_TypeItem item = UI_TypeItem.Proxy(_ui.m_comListType1.m_listType.GetChildAt(i));
  857. if (item != null)
  858. {
  859. int menuID = (int)item.target.data;
  860. DressUpMenuItemCfg1 dressUpMenuItemCfg1 = DressUpMenuItemCfg1Array.Instance.GetCfg(menuID);
  861. if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0 && dressUpMenuItemCfg1.type == ConstDressUpItemType.SHANG_YI)
  862. {
  863. syIndex = i;
  864. }
  865. if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0 && dressUpMenuItemCfg1.type == ConstDressUpItemType.XIA_ZHUANG)
  866. {
  867. xzIndex = i;
  868. }
  869. if (_fightCfg.needItemId > 0)
  870. {
  871. int type = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
  872. if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0 && ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, dressUpMenuItemCfg1.id))
  873. {
  874. buyClothingIndex = i;
  875. }
  876. }
  877. }
  878. UI_TypeItem.ProxyEnd();
  879. }
  880. int len1 = _ui.m_comListType2.m_listType.numChildren;
  881. for (int i = 0; i < len1; i++)
  882. {
  883. UI_TypeItem item = UI_TypeItem.Proxy(_ui.m_comListType2.m_listType.GetChildAt(i));
  884. if (item != null)
  885. {
  886. int menuID = (int)item.target.data;
  887. DressUpMenuItemCfg2 dressUpMenuItemCfg2 = DressUpMenuItemCfg2Array.Instance.GetCfg(menuID);
  888. var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
  889. if (subType == dressUpMenuItemCfg2.type)
  890. {
  891. buyClothingSubIndex = i;
  892. }
  893. }
  894. UI_TypeItem.ProxyEnd();
  895. }
  896. int djcId = 10476;//点绛唇Id
  897. int djcIndex = 0;
  898. int buyClothingIdIndex = 0;
  899. for (int i = 0; i < _currentList3.Count; i++)
  900. {
  901. if (_currentList3[i] == djcId)
  902. {
  903. djcIndex = i;
  904. }
  905. if (_fightCfg.needItemId > 0 && _currentList3[i] == _fightCfg.needItemId)
  906. {
  907. buyClothingIdIndex = i;
  908. }
  909. }
  910. GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.SINGLE_FIGHT, 3, "点击相应的分类,可以快速找到服饰", syIndex);
  911. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.SINGLE_FIGHT, 4, "", 0, true, (int)_ui.m_partsList.m_list.y);
  912. GuideController.TryGuide(_ui.m_btnGuide, ConstGuideId.SINGLE_FIGHT, 5, "", -1, true, 0, 0, 0, false);
  913. GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.SINGLE_FIGHT, 6, "接下来把裙子也换上", xzIndex);
  914. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.SINGLE_FIGHT, 7, "", 0, true, (int)_ui.m_partsList.m_list.y);
  915. GuideController.TryGuide(_ui.m_btnNext, ConstGuideId.SINGLE_FIGHT, 8, "穿着完毕,来验证一下,换上的服饰是否符合需求");
  916. GuideController.TryGuide(_ui.m_compNeed.target, ConstGuideId.BUY_CLOTHING, 3, "当提示有“必需品”时,需要穿上对应物品才能通关", -1, true, 170);
  917. GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.BUY_CLOTHING, 7, "按照指示就可以找到必需品啦", buyClothingIndex);
  918. GuideController.TryGuide(_ui.m_comListType2.m_listType, ConstGuideId.BUY_CLOTHING, 8, "", buyClothingSubIndex);
  919. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.BUY_CLOTHING, 9, "点击换上吧", buyClothingIdIndex, true, 170);
  920. GuideController.TryCompleteGuide(ConstGuideId.BUY_CLOTHING, 9);
  921. GuideController.TryGuide(_ui.m_btnHint, ConstGuideId.FIGHT_TIPS, 1, "这次换装需要获得别人的认可呢");
  922. GuideController.TryCompleteGuide(ConstGuideId.FIGHT_TIPS, 1);
  923. }
  924. }
  925. }