FieldWorkDressFIghtView.cs 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098
  1. using UI.DressUp;
  2. using FairyGUI;
  3. using UnityEngine;
  4. using System.Collections.Generic;
  5. namespace GFGGame
  6. {
  7. public class FieldWorkDressFightView : BaseWindow
  8. {
  9. private UI_ArenaDressUpFightUI _ui;
  10. // private DressUpObj _dressUpData = new DressUpObj();
  11. private FieldWorkDataManager _dataManager;
  12. private FightData _roleData;
  13. public List<int> _itemList;//记录打开界面时的穿戴数据(保存后会更新)
  14. private float listType1X = 0;
  15. private float partsListX = 0;
  16. private float partsListScrollingPosY = 0;
  17. private DressUpListType currentListType;
  18. private int[] _currentList2;
  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. //暂存cardid
  25. private int cardId;
  26. // private StoryLevelCfg _levelCfg;
  27. // private StoryFightCfg _fightCfg;
  28. private const int SORT_BY_HIGH_SCORE = 0;
  29. private const int SORT_BY_LOW_SCORE = 1;
  30. private int _scoreIndex = SORT_BY_HIGH_SCORE;
  31. private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
  32. public override void Dispose()
  33. {
  34. if (_sceneObject != null)
  35. {
  36. PrefabManager.Instance.Restore(_sceneObject);
  37. _sceneObject = null;
  38. }
  39. for (int i = 0; i < _listLongPress.Count; i++)
  40. {
  41. _listLongPress[i].Dispose();
  42. }
  43. // _dressUpData.Dispose();
  44. if (_ui != null)
  45. {
  46. _ui.Dispose();
  47. _ui = null;
  48. }
  49. base.Dispose();
  50. }
  51. protected override void Init()
  52. {
  53. base.Init();
  54. packageName = UI_ArenaDressUpFightUI.PACKAGE_NAME;
  55. _ui = UI_ArenaDressUpFightUI.Create();
  56. viewCom = _ui.target;
  57. isfullScreen = true;
  58. isReturnView = true;
  59. }
  60. protected override void OnInit()
  61. {
  62. base.OnInit();
  63. _ui.m_btnLastStep.visible = true;
  64. _ui.m_btnNextStep.visible = true;
  65. _ui.m_btnSearch.visible = true;
  66. _ui.m_partsList.m_comboBoxRarity.items = new string[] { "高分优先", "低分优先" };
  67. _ui.m_partsListSearch.m_comboBoxRarity.items = new string[] { "高分优先", "低分优先" };
  68. InitLists();
  69. _ui.m_partsList.m_comboBoxRarity.onChanged.Add(OnComboBoxRarityChanged);
  70. _ui.m_partsListSearch.m_comboBoxRarity.onChanged.Add(OnSearchComboBoxRarityChanged);
  71. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  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_partsListSearch.m_list.onClickItem.Add(OnClickSearchPartsListItem);
  77. _ui.m_touchPad.onClick.Add(OnTouchPad);
  78. _ui.m_btnDelete.onClick.Add(OnClickBtnDelete);
  79. _ui.m_btnNext.onClick.Add(OnClickBtnNext);
  80. _ui.m_btnSearch.onClick.Add(OnClickBtnSearch);
  81. _ui.m_btnLastStep.onClick.Add(OnClickBtnLastStep);
  82. _ui.m_btnNextStep.onClick.Add(OnClickBtnNextStep);
  83. // _ui.m_comValueInfo.m_btnFightScoreRule.onClick.Add(OnBtnFightScoreRule);
  84. _ui.m_comValueInfo.GetChild("btnFightScoreRule").onClick.Add(OnBtnFightScoreRule);
  85. _ui.m_grhCloseComFightScore.onClick.Add(OnCloseComFightScore);
  86. _ui.m_partsList2.m_comboBoxRarity.visible = false;
  87. _ui.m_partsList2.m_imgTop.visible = true;
  88. _ui.m_partsList.m_imgTop.visible = false;
  89. }
  90. protected override void AddEventListener()
  91. {
  92. base.AddEventListener();
  93. EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
  94. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
  95. EventAgent.AddEventListener(ConstMessage.CARD_SELECTED, UpdateValueInfo);
  96. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
  97. }
  98. protected override void RemoveEventListener()
  99. {
  100. base.RemoveEventListener();
  101. EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
  102. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
  103. EventAgent.RemoveEventListener(ConstMessage.CARD_SELECTED, UpdateValueInfo);
  104. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
  105. }
  106. protected override void OnShown()
  107. {
  108. base.OnShown();
  109. _dataManager = FieldWorkDataManager.Instance;
  110. _roleData = _dataManager.DressupList[_dataManager.SelectThemeIndex];
  111. _itemList = new List<int>(_roleData.itemList);
  112. InstanceZonesDataManager.currentScoreType = _dataManager.ThemeList[_dataManager.SelectThemeIndex];
  113. InstanceZonesDataManager.currentFightTags = _dataManager.DressupList[_dataManager.SelectThemeIndex].tags;
  114. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  115. _ui.m_grhCloseComFightScore.visible = false;
  116. //一级菜单
  117. _ui.m_comListType1.m_listType.RemoveChildrenToPool();
  118. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 3;
  119. float maxHeight = _ui.target.height - _ui.m_comListType1.m_listType.y - DressUpView.BOTTOM_BLANK;
  120. if (_ui.m_comListType1.m_listType.height > maxHeight)
  121. {
  122. _ui.m_comListType1.m_listType.height = maxHeight;
  123. }
  124. _ui.m_comListType1.target.x = _ui.target.width;
  125. _ui.m_comListType2.target.x = _ui.target.width;
  126. _ui.m_partsList.target.x = _ui.target.width;
  127. _ui.m_partsList2.target.x = _ui.target.width;
  128. _ui.m_partsListSearch.target.x = _ui.target.width;
  129. this.showListType1();
  130. if (_sceneObject == null)
  131. {
  132. _sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath("SceneArenaDressUpFight"));
  133. MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject, false, false, null, true);
  134. MyDressUpHelper.dressUpObj.AddOrRemove(180001, false);
  135. // GameObject copyObj = _sceneObject.transform.Find("CopyRole").gameObject;
  136. // _dressUpData.setSceneObj(copyObj);
  137. }
  138. MyDressUpHelper.dressUpObj.PutOnItemList(_roleData.itemList);
  139. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  140. _ui.m_c1.selectedIndex = 1;
  141. UpdateStepBtn(true);
  142. UpdateValueInfo();
  143. SendLog();
  144. cardId = _roleData.cardId;
  145. Timers.inst.AddUpdate(CheckGuide);
  146. }
  147. protected override void OnHide()
  148. {
  149. base.OnHide();
  150. if (_sceneObject != null)
  151. {
  152. PrefabManager.Instance.Restore(_sceneObject);
  153. _sceneObject = null;
  154. }
  155. DressUpMenuItemDataManager.Clear();
  156. MyDressUpHelper.ResetMemory();
  157. _ui.m_grhCloseComFightScore.visible = false;
  158. _ui.m_comValueInfo.GetController("c2").selectedIndex = 0;
  159. }
  160. private void OnClickBtnBack()
  161. {
  162. bool isSave = _itemList.Count == MyDressUpHelper.dressUpObj.itemList.Count;
  163. if (isSave)
  164. {
  165. for (int i = 0; i < _itemList.Count; i++)
  166. {
  167. int itemId = MyDressUpHelper.dressUpObj.itemList[i];
  168. if (_itemList.IndexOf(itemId) < 0)
  169. {
  170. isSave = false;
  171. break;
  172. }
  173. }
  174. }
  175. if (!isSave)
  176. {
  177. AlertUI.Show("当前穿搭尚未保存,是否确定退出?")
  178. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  179. {
  180. _roleData.cardId = cardId;
  181. GoBackToView();
  182. });
  183. }
  184. else
  185. {
  186. GoBackToView();
  187. }
  188. }
  189. private void GoBackToView()
  190. {
  191. _roleData.itemList = _itemList;
  192. FightDataManager.Instance.SetItemScoreList(_roleData);
  193. ScoreSystemData.Instance.SetEquipScoresWithPartId(_roleData);
  194. //ViewManager.GoBackFrom(typeof(ArenaDressUpFightView).FullName);
  195. //ViewManager.Show<ArenaDressInfoView>(new object[] { FightRoleType.MINE, 0, ArenaDataManager.Instance.DressupList, "" });
  196. this.Hide();
  197. }
  198. private void OnBtnFightScoreRule()
  199. {
  200. _ui.m_grhCloseComFightScore.visible = true;
  201. }
  202. private void OnCloseComFightScore()
  203. {
  204. _ui.m_comValueInfo.GetController("c2").selectedIndex = 0;
  205. _ui.m_grhCloseComFightScore.visible = false;
  206. }
  207. private void OnClickBtnHome()
  208. {
  209. AlertUI.Show("是否返回?")
  210. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  211. {
  212. GameController.GoBackToMainView();
  213. });
  214. }
  215. private void UpdateValueInfo()
  216. {
  217. _roleData.itemList = MyDressUpHelper.dressUpObj.itemList;
  218. FightDataManager.Instance.SetItemScoreList(_roleData);
  219. ScoreSystemData.Instance.SetEquipScoresWithPartId(_roleData);
  220. FieldWorkDataManager.Instance.UpdateValue(_ui.m_comFieldValueInfo, _dataManager.SelectThemeIndex, _dataManager.DressupList);
  221. }
  222. private void OnClickListType1Item(EventContext context)
  223. {
  224. // GuideController.HideGuide();
  225. GObject typeItem = context.data as GObject;
  226. int order = (int)typeItem.data;
  227. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[order - 1];
  228. if (item1.subMenusArr.Length > 0)
  229. {
  230. this.showListType2(item1.subMenusArr);
  231. }
  232. else
  233. {
  234. if (this.showListParts(item1.type) == false)
  235. {
  236. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  237. return;
  238. }
  239. this.showListParts(item1.type);
  240. }
  241. this.hideListType1();
  242. UpdateListPartsSelected();
  243. }
  244. private void OnClickListType2Item(EventContext context)
  245. {
  246. GObject typeItem = context.data as GObject;
  247. int order = (int)typeItem.data;
  248. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[order - 1];
  249. if (this.showListParts(item2.type) == false)
  250. {
  251. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  252. return;
  253. }
  254. this.hideListType2();
  255. }
  256. private void OnClickSearchPartsListItem(EventContext context)
  257. {
  258. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  259. {
  260. return;
  261. }
  262. GObject listItem = context.data as GObject;
  263. int id = (int)listItem.data;
  264. if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.FieldWork)
  265. {
  266. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  267. {
  268. int[] suitParts = SuitCfgArray.Instance.GetCfg(id).partsArr;
  269. foreach (var suitpart in suitParts)
  270. {
  271. foreach (var itemDressID in FieldWorkDataManager.Instance.HistoryDressupList)
  272. {
  273. if (suitpart == itemDressID)
  274. {
  275. PromptController.Instance.ShowFloatTextPrompt("该套装包含已使用服装,无法使用!");
  276. return;
  277. }
  278. }
  279. }
  280. }
  281. else
  282. {
  283. foreach (var itemDressID in FieldWorkDataManager.Instance.HistoryDressupList)
  284. {
  285. if (itemDressID == id)
  286. {
  287. PromptController.Instance.ShowFloatTextPrompt("该服装本周使用次数已达上限!");
  288. return;
  289. }
  290. }
  291. }
  292. }
  293. bool isOrnament = DressUpMenuItemCfg1Array.Instance.CheckIsOrnamentsType(id);
  294. bool isDress = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  295. bool isHasSame = MyDressUpHelper.dressUpObj.CheckSameTypeIsOn(id);
  296. bool isMaxCount = MyDressUpHelper.GetCurrentOrnamentCount() >= GlobalCfgArray.globalCfg.dressLimitCount;
  297. if (isOrnament && !isDress && !isHasSame && isMaxCount)
  298. {
  299. PromptController.Instance.ShowFloatTextPrompt("饰品穿戴数量已达上限");
  300. return;
  301. }
  302. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  303. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  304. UpdateStepBtn(true);
  305. // UpdateSearchListPartsSelected();
  306. UpdateValueInfo();
  307. }
  308. private void OnClickPartsListItem(EventContext context)
  309. {
  310. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  311. {
  312. return;
  313. }
  314. GObject listItem = context.data as GObject;
  315. int id = (int)listItem.data;
  316. if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.FieldWork)
  317. {
  318. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  319. {
  320. int[] suitParts = SuitCfgArray.Instance.GetCfg(id).partsArr;
  321. foreach(var suitpart in suitParts)
  322. {
  323. foreach (var itemDressID in FieldWorkDataManager.Instance.HistoryDressupList)
  324. {
  325. if (suitpart == itemDressID)
  326. {
  327. PromptController.Instance.ShowFloatTextPrompt("该套装包含已使用服装,无法使用!");
  328. return;
  329. }
  330. }
  331. }
  332. }
  333. else
  334. {
  335. foreach (var itemDressID in FieldWorkDataManager.Instance.HistoryDressupList)
  336. {
  337. if (itemDressID == id)
  338. {
  339. PromptController.Instance.ShowFloatTextPrompt("该服装本周使用次数已达上限");
  340. return;
  341. }
  342. }
  343. }
  344. }
  345. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  346. {
  347. partsListScrollingPosY = _ui.m_partsList.m_list.scrollPane.scrollingPosY;
  348. this.showListParts2(id);
  349. this.hideListParts();
  350. MyDressUpHelper.dressUpObj.PutOnItemList(MyDressUpHelper.GetSuitFightItems(id));
  351. }
  352. else
  353. {
  354. bool isOrnament = DressUpMenuItemCfg1Array.Instance.CheckIsOrnamentsType(id);
  355. bool isDress = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  356. bool isHasSame = MyDressUpHelper.dressUpObj.CheckSameTypeIsOn(id);
  357. bool isMaxCount = MyDressUpHelper.GetCurrentOrnamentCount() >= GlobalCfgArray.globalCfg.dressLimitCount;
  358. if (isOrnament && !isDress && !isHasSame && isMaxCount)
  359. {
  360. PromptController.Instance.ShowFloatTextPrompt("饰品穿戴数量已达上限");
  361. return;
  362. }
  363. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  364. }
  365. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  366. UpdateStepBtn(true);
  367. // UpdateListPartsSelected();
  368. // UpdateListSuitPartsSelected();
  369. UpdateValueInfo();
  370. }
  371. private void OnClickSuitPartsListItem(EventContext context)
  372. {
  373. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  374. {
  375. return;
  376. }
  377. GObject listItem = (GObject)context.data as GObject;
  378. int id = (int)listItem.data;
  379. bool isOrnament = DressUpMenuItemCfg1Array.Instance.CheckIsOrnamentsType(id);
  380. bool isDress = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  381. bool isHasSame = MyDressUpHelper.dressUpObj.CheckSameTypeIsOn(id);
  382. bool isMaxCount = MyDressUpHelper.GetCurrentOrnamentCount() >= GlobalCfgArray.globalCfg.dressLimitCount;
  383. if (isOrnament && !isDress && !isHasSame && isMaxCount)
  384. {
  385. PromptController.Instance.ShowFloatTextPrompt("饰品穿戴数量已达上限");
  386. return;
  387. }
  388. if (!DressUpMenuItemDataManager.CheckHasItem(id))
  389. {
  390. PromptController.Instance.ShowFloatTextPrompt("还未获得这件装扮");
  391. return;
  392. }
  393. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  394. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  395. UpdateStepBtn(true);
  396. // UpdateListSuitPartsSelected();
  397. UpdateValueInfo();
  398. }
  399. private void UpdateStepBtn(bool isAdd, int suitId = 0)
  400. {
  401. if (isAdd)
  402. {
  403. MyDressUpHelper.AddMemoryDressup();
  404. }
  405. _ui.m_btnLastStep.enabled = MyDressUpHelper.stepIndex > 0;
  406. _ui.m_btnNextStep.enabled = MyDressUpHelper.stepIndex < MyDressUpHelper.dressMemory.Count - 1;
  407. UpdateListPartsSelected();
  408. UpdateListSuitPartsSelected();
  409. UpdateSearchListPartsSelected();
  410. }
  411. private void OnLongPress(EventContext context)
  412. {
  413. LongPressGesture gesture = (LongPressGesture)context.sender;
  414. int itemId = (int)gesture.host.data;
  415. GoodsItemTipsController.ShowItemTips(itemId);
  416. }
  417. private void OnTouchPad()
  418. {
  419. if (this.currentListType == DressUpListType.List4)
  420. {
  421. this.hideListParts2();
  422. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  423. }
  424. else if (this.currentListType == DressUpListType.List3)
  425. {
  426. if (_currentList2 != null)
  427. {
  428. this.showListType2(_currentList2);
  429. }
  430. else
  431. {
  432. this.showListType1();
  433. }
  434. this.hideListParts();
  435. }
  436. else if (this.currentListType == DressUpListType.List2)
  437. {
  438. this.showListType1();
  439. this.hideListType2();
  440. }
  441. else if (this.currentListType == DressUpListType.List5)
  442. {
  443. this.showListType1();
  444. this.hideSearchListType();
  445. }
  446. }
  447. private void OnClickBtnDelete()
  448. {
  449. MyDressUpHelper.dressUpObj.TakeOffAll();
  450. _roleData.cardId = 0;
  451. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  452. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  453. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  454. UpdateStepBtn(true);
  455. // UpdateListPartsSelected();
  456. // UpdateListSuitPartsSelected();
  457. UpdateValueInfo();
  458. }
  459. private void OnClickBtnNext()
  460. {
  461. // if (!MyDressUpHelper.CheckPutOnFinish())
  462. // {
  463. // AlertUI.Show("换好衣服才能进行下一步哦~").SetRightButton(true, "好的");
  464. // }
  465. // else
  466. // {
  467. DressUpFinish();
  468. // }
  469. }
  470. private async void DressUpFinish()
  471. {
  472. if (CardDataManager.GetCardListByRoleType(0).Count > 0)
  473. {
  474. ViewManager.Show<FieldWorkChooseCardView>(InstanceZonesDataManager.currentScoreType);
  475. }
  476. else
  477. {
  478. bool result = await FieldWorkSproxy.ReqChangeFieldWorkDressupOne(_dataManager.SelectThemeIndex, 0, MyDressUpHelper.dressUpObj.itemList);
  479. if (result)
  480. {
  481. _itemList = new List<int>(MyDressUpHelper.dressUpObj.itemList);
  482. PromptController.Instance.ShowFloatTextPrompt("保存成功");
  483. OnClickBtnBack();
  484. }
  485. }
  486. }
  487. // private void OnClickBtnRecommend()
  488. // {
  489. // if (this.currentListType == DressUpListType.List4)
  490. // {
  491. // this.hideListParts2();
  492. // this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  493. // }
  494. // MyDressUpHelper.dressUpObj.CheckCancelActionWhenPutOn(_currentSuitId);
  495. // MyDressUpHelper.PutOnRecommendItems2();
  496. // _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  497. // UpdateListPartsSelected();
  498. // UpdateListSuitPartsSelected();
  499. // }
  500. private void InitLists()
  501. {
  502. _ui.m_comListType2.m_listType.itemRenderer = ListType2Item;
  503. _ui.m_partsList.m_list.itemRenderer = ListPartsItem;
  504. _ui.m_partsList2.m_list.itemRenderer = ListParts2Item;
  505. _ui.m_partsListSearch.m_list.itemRenderer = ListPartsItem;
  506. listType1X = _ui.m_comListType1.target.x;
  507. partsListX = _ui.m_partsList.target.x - _ui.m_partsList.target.width;
  508. //一级菜单
  509. _ui.m_comListType1.m_listType.itemRenderer = ListType1Item;
  510. }
  511. private void showListType1()
  512. {
  513. _currentList2 = null;
  514. currentListType = DressUpListType.List1;
  515. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 3;
  516. GTween.To(_ui.target.width, listType1X, 0.5f)
  517. .SetTarget(_ui.m_comListType1.target)
  518. .OnUpdate((GTweener t) =>
  519. {
  520. _ui.m_comListType1.target.x = t.value.x;
  521. });
  522. }
  523. private void hideListType1()
  524. {
  525. GTween.To(listType1X, _ui.target.width, 0.5f)
  526. .SetTarget(_ui.m_comListType1.target)
  527. .OnUpdate((GTweener t) =>
  528. {
  529. _ui.m_comListType1.target.x = t.value.x;
  530. });
  531. }
  532. private void showListType2(int[] menuStrArr = null)
  533. {
  534. currentListType = DressUpListType.List2;
  535. if (menuStrArr != null && menuStrArr.Length > 0)
  536. {
  537. int len = menuStrArr.Length;
  538. _currentList2 = menuStrArr.Clone() as int[];
  539. _ui.m_comListType2.m_listType.RemoveChildrenToPool();
  540. _ui.m_comListType2.m_listType.numItems = len;
  541. //_ui.m_listType2.ResizeToFit(_ui.m_listType2.numItems);
  542. float maxHeight = _ui.target.height - _ui.m_comListType2.m_listType.y - DressUpView.BOTTOM_BLANK;
  543. if (_ui.m_comListType2.m_listType.height > maxHeight)
  544. {
  545. _ui.m_comListType2.m_listType.height = maxHeight;
  546. }
  547. }
  548. GTween.To(_ui.target.width, listType1X, 0.5f)
  549. .SetTarget(_ui.m_comListType2.target)
  550. .OnUpdate((GTweener t) =>
  551. {
  552. _ui.m_comListType2.target.x = t.value.x;
  553. });
  554. }
  555. private void hideListType2()
  556. {
  557. GTween.To(listType1X, _ui.target.width, 0.5f)
  558. .SetTarget(_ui.m_comListType2.target)
  559. .OnUpdate((GTweener t) =>
  560. {
  561. _ui.m_comListType2.target.x = t.value.x;
  562. });
  563. }
  564. private bool showListParts(int type, bool selectItem = false)
  565. {
  566. _currentMenuType = type;
  567. UpdatePartsListSort();
  568. if (_ui.m_partsList.m_list.numItems <= 0) return false;
  569. _ui.m_partsList.m_list.ResizeToFit(_ui.m_partsList.m_list.numItems);
  570. float maxHeight = _ui.m_partsList.target.height - _ui.m_partsList.m_list.y;
  571. if (_ui.m_partsList.m_list.height > maxHeight)
  572. {
  573. _ui.m_partsList.m_list.height = maxHeight;
  574. }
  575. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  576. {
  577. _ui.m_partsList.m_list.scrollPane.SetPosY(partsListScrollingPosY, false);
  578. partsListScrollingPosY = 0;
  579. }
  580. currentListType = DressUpListType.List3;
  581. GTween.To(_ui.target.width, partsListX, 0.5f)
  582. .SetTarget(_ui.m_partsList)
  583. .OnUpdate((GTweener t) =>
  584. {
  585. _ui.m_partsList.target.x = t.value.x;
  586. });
  587. UpdateListPartsSelected();
  588. return true;
  589. }
  590. private void OnComboBoxRarityChanged()
  591. {
  592. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  593. this.UpdatePartsListSort();
  594. }
  595. private void OnSearchComboBoxRarityChanged()
  596. {
  597. _scoreIndex = _ui.m_partsListSearch.m_comboBoxRarity.selectedIndex;
  598. this.UpdateSearchList();
  599. }
  600. private void UpdatePartsListSort()
  601. {
  602. if (_currentMenuType == 0) return;
  603. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  604. {
  605. _currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();
  606. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  607. {
  608. _currentList3 = SuitUtil.SortSuitListByHighScore(_currentList3);
  609. }
  610. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  611. {
  612. _currentList3 = SuitUtil.SortSuitListByLowScore(_currentList3);
  613. }
  614. else
  615. {
  616. _currentList3.Reverse();
  617. }
  618. }
  619. else
  620. {
  621. _currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
  622. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  623. {
  624. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3);
  625. }
  626. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  627. {
  628. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3);
  629. }
  630. else
  631. {
  632. _currentList3.Reverse();
  633. }
  634. }
  635. if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  636. {
  637. _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3);
  638. }
  639. else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  640. {
  641. _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3);
  642. }
  643. _ui.m_partsList.m_list.RemoveChildrenToPool();
  644. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  645. }
  646. private void UpdateSuitPartsListSort()
  647. {
  648. if (_currentMenuType == 0) return;
  649. _currentList4 = new List<int>(SuitCfgArray.Instance.GetSuitItems(_currentSuitId, true));
  650. if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  651. {
  652. _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4);
  653. }
  654. else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  655. {
  656. _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4);
  657. }
  658. _ui.m_partsList2.m_list.RemoveChildrenToPool();
  659. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  660. }
  661. private void hideListParts()
  662. {
  663. GTween.To(partsListX, _ui.target.width, 0.5f)
  664. .SetTarget(_ui.m_partsList)
  665. .OnUpdate((GTweener t) =>
  666. {
  667. _ui.m_partsList.target.x = t.value.x;
  668. });
  669. }
  670. private void showListParts2(int suitId)
  671. {
  672. _currentSuitId = suitId;
  673. _ui.m_partsList2.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  674. this.UpdateSuitPartsListSort();
  675. _ui.m_partsList2.m_list.ResizeToFit(_ui.m_partsList2.m_list.numItems);
  676. float maxHeight = _ui.m_partsList2.target.height - _ui.m_partsList2.m_list.y;// - DressUpView.BOTTOM_BLANK;
  677. if (_ui.m_partsList2.m_list.height > maxHeight)
  678. {
  679. _ui.m_partsList2.m_list.height = maxHeight;
  680. }
  681. currentListType = DressUpListType.List4;
  682. GTween.To(_ui.target.width, partsListX, 0.5f)
  683. .SetTarget(_ui.m_partsList2)
  684. .OnUpdate((GTweener t) =>
  685. {
  686. _ui.m_partsList2.target.x = t.value.x;
  687. });
  688. }
  689. private void hideListParts2()
  690. {
  691. _currentMenuType = ConstDressUpItemType.TAO_ZHUANG;
  692. GTween.To(partsListX, _ui.target.width, 0.5f)
  693. .SetTarget(_ui.m_partsList2)
  694. .OnUpdate((GTweener t) =>
  695. {
  696. _ui.m_partsList2.target.x = t.value.x;
  697. });
  698. }
  699. private void showSearchListType()
  700. {
  701. // _currentList2 = null;
  702. currentListType = DressUpListType.List5;
  703. GTween.To(_ui.target.width, partsListX, 0.5f)
  704. .SetTarget(_ui.m_partsListSearch.target)
  705. .OnUpdate((GTweener t) =>
  706. {
  707. _ui.m_partsListSearch.target.x = t.value.x;
  708. });
  709. }
  710. private void hideSearchListType()
  711. {
  712. GTween.To(partsListX, _ui.target.width, 0.5f)
  713. .SetTarget(_ui.m_partsListSearch.target)
  714. .OnUpdate((GTweener t) =>
  715. {
  716. _ui.m_partsListSearch.target.x = t.value.x;
  717. });
  718. }
  719. /*****************************************************************************************************/
  720. private void DressResetSerch()
  721. {
  722. if (currentListType == DressUpListType.List5)
  723. {
  724. OnTouchPad();
  725. }
  726. }
  727. private void UpdateSerch(EventContext context)
  728. {
  729. if (context.data.ToString() == ConstMessage.DRESS_SEARCH)
  730. {
  731. _currentList3 = DressUpMenuItemDataManager.DressSearch(false);
  732. }
  733. else if (context.data.ToString() == ConstMessage.DRESS_FILTER)
  734. {
  735. _currentList3 = DressUpMenuItemDataManager.DressFilter(false);
  736. }
  737. ViewManager.Hide<ModalStatusView>();
  738. UpdateSearchList();
  739. if (currentListType != DressUpListType.List5)
  740. {
  741. hideListParts();
  742. hideListParts2();
  743. hideListType1();
  744. hideListType2();
  745. showSearchListType();
  746. }
  747. _currentMenuType = 0;
  748. }
  749. private void UpdateSearchList()
  750. {
  751. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  752. {
  753. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
  754. }
  755. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  756. {
  757. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
  758. }
  759. _currentMenuType = 0;
  760. _ui.m_partsListSearch.m_list.numItems = _currentList3.Count; ;
  761. }
  762. private void ListType1Item(int index, GObject item)
  763. {
  764. UI.DressUp.UI_TypeItem typeItem = UI.DressUp.UI_TypeItem.Proxy(item);
  765. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[index];
  766. typeItem.m_icon.url = "ui://DressUp/hz_fenleitu_" + item1.id;
  767. typeItem.m_txtname.text = item1.name;
  768. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconzi_" + item1.id;
  769. typeItem.target.data = item1.id;
  770. typeItem.m_imgNeed.visible = false;
  771. typeItem.m_imgNew.visible = DressUpMenuItemDataManager.CheckIsFirstMenuNew(item1.id);
  772. UI.DressUp.UI_TypeItem.ProxyEnd();
  773. }
  774. private void ListType2Item(int index, GObject item)
  775. {
  776. UI.DressUp.UI_TypeItem typeItem = UI.DressUp.UI_TypeItem.Proxy(item);
  777. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[_currentList2[index] - 1];
  778. typeItem.m_icon.url = "ui://DressUp/hz_fenleituej_" + item2.id;
  779. typeItem.m_txtname.text = item2.name;
  780. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconziej_" + item2.id;
  781. typeItem.target.data = item2.id;
  782. // var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
  783. typeItem.m_imgNeed.visible = false;
  784. typeItem.m_imgNew.visible = DressUpMenuItemDataManager.CheckIsSecondMenuNew(item2.id);
  785. UI.DressUp.UI_TypeItem.ProxyEnd();
  786. }
  787. private void ListPartsItem(int index, GObject item)
  788. {
  789. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  790. int id = (int)_currentList3[index];
  791. string iconRes = "";
  792. string partName = "";
  793. string ext = "png";
  794. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  795. {
  796. SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
  797. iconRes = suitCfg.res;
  798. partName = suitCfg.name;
  799. listItem.m_iconSelected.visible = false;
  800. listItem.m_txtScore.text = "" + SuitUtil.GetSuitScore(id);
  801. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, true);
  802. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + suitCfg.rarity;
  803. listItem.m_imgNew.visible = false;
  804. }
  805. else
  806. {
  807. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  808. iconRes = itemCfg.res;
  809. partName = itemCfg.name;
  810. listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  811. listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _roleData.tags);
  812. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  813. bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
  814. listItem.m_imgNew.visible = isNew;
  815. if (isNew)
  816. {
  817. ItemProxy.ReqSetItemRead(id).Coroutine();
  818. }
  819. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  820. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
  821. }
  822. if (listItem.target.data == null)
  823. {
  824. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  825. longPressGesture.trigger = GameConfig.LongPressGestureTrigger;
  826. longPressGesture.once = true;
  827. longPressGesture.onAction.Add(OnLongPress);
  828. _listLongPress.Add(longPressGesture);
  829. }
  830. listItem.m_btnAni.visible = false;
  831. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  832. listItem.m_lock.visible = false;
  833. if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.FieldWork)
  834. {
  835. foreach (var itemDressID in FieldWorkDataManager.Instance.HistoryDressupList)
  836. {
  837. if (itemDressID == id)
  838. {
  839. listItem.m_lock.visible = true;
  840. break;
  841. }
  842. }
  843. }
  844. listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + InstanceZonesDataManager.currentScoreType;
  845. listItem.m_txtTitle.text = partName;
  846. listItem.target.data = id;
  847. listItem.m_imgNeed.visible = false;
  848. UI_PartsListItem.ProxyEnd();
  849. }
  850. private void ListParts2Item(int index, GObject item)
  851. {
  852. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  853. int id = (int)_currentList4[index];
  854. string iconRes = "";
  855. string partName = "";
  856. string ext = "png";
  857. if (listItem.target.data == null)
  858. {
  859. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  860. longPressGesture.trigger = GameConfig.LongPressGestureTrigger;
  861. longPressGesture.once = true;
  862. longPressGesture.onAction.Add(OnLongPress);
  863. _listLongPress.Add(longPressGesture);
  864. }
  865. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  866. iconRes = itemCfg.res;
  867. partName = itemCfg.name;
  868. listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  869. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  870. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  871. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
  872. listItem.m_ScoreType.visible = true;
  873. // int mainScore;
  874. // int mainValuel;
  875. // ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
  876. listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + InstanceZonesDataManager.currentScoreType);
  877. listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _dataManager.DressupList[_dataManager.SelectThemeIndex].tags);
  878. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  879. listItem.m_txtTitle.text = partName;
  880. listItem.target.data = id;
  881. // listItem.m_txtScore.visible = false;
  882. //listItem.m_ScoreType.visible = true;
  883. listItem.m_imgNeed.visible = false;
  884. listItem.m_btnAni.visible = false;
  885. bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
  886. listItem.m_imgNew.visible = isNew;
  887. if (isNew)
  888. {
  889. ItemProxy.ReqSetItemRead(id).Coroutine();
  890. }
  891. UI_PartsListItem.ProxyEnd();
  892. }
  893. private void UpdateSearchListPartsSelected()
  894. {
  895. int count = _ui.m_partsListSearch.m_list.numChildren;
  896. int suitId = MyDressUpHelper.dressUpObj.suitId;
  897. for (int i = 0; i < count; i++)
  898. {
  899. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsListSearch.m_list.GetChildAt(i));
  900. int id = (int)listItem.target.data;
  901. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  902. {
  903. listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
  904. }
  905. else
  906. {
  907. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  908. var isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
  909. bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  910. bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  911. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  912. }
  913. UI_PartsListItem.ProxyEnd();
  914. }
  915. }
  916. private void UpdateListPartsSelected()
  917. {
  918. GList list;
  919. if (_ui.m_partsList.target.x == partsListX)
  920. {
  921. list = _ui.m_partsList.m_list;
  922. }
  923. else if (_ui.m_partsListSearch.target.x == partsListX)
  924. {
  925. list = _ui.m_partsListSearch.m_list;
  926. }
  927. else
  928. {
  929. return;
  930. }
  931. int count = list.numChildren;
  932. int suitId = MyDressUpHelper.dressUpObj.suitId;
  933. for (int i = 0; i < count; i++)
  934. {
  935. UI_PartsListItem listItem = UI_PartsListItem.Proxy(list.GetChildAt(i));
  936. int id = (int)listItem.target.data;
  937. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  938. {
  939. listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
  940. }
  941. else
  942. {
  943. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  944. var isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
  945. bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  946. bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  947. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  948. }
  949. UI_PartsListItem.ProxyEnd();
  950. }
  951. }
  952. private void UpdateListSuitPartsSelected()
  953. {
  954. int count = _ui.m_partsList2.m_list.numChildren;
  955. int suitId = MyDressUpHelper.dressUpObj.suitId;
  956. for (int i = 0; i < count; i++)
  957. {
  958. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList2.m_list.GetChildAt(i));
  959. int id = (int)listItem.target.data;
  960. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  961. var isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
  962. bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  963. bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  964. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  965. UI_PartsListItem.ProxyEnd();
  966. }
  967. }
  968. private void OnClickBtnSearch()
  969. {
  970. ViewManager.Show<DressFilterView>(false);
  971. }
  972. private void OnClickBtnLastStep()
  973. {
  974. if (!MyDressUpHelper.OnClickBtnLastStep()) return;
  975. UpdateStepBtn(false);
  976. }
  977. private void OnClickBtnNextStep()
  978. {
  979. if (!MyDressUpHelper.OnClickBtnNextStep()) return;
  980. UpdateStepBtn(false);
  981. }
  982. private void SendLog()
  983. {
  984. }
  985. private void CheckGuide(object param)
  986. {
  987. if ((GuideDataManager.IsGuideFinish(ConstGuideId.FIELD) <= 0
  988. && InstanceZonesDataManager.FightScene == ConstInstanceZonesType.FieldWork
  989. && InstanceZonesDataManager.CheckLevelPass(FieldWorkDataManager.Instance.guideLevelID)))
  990. {
  991. UpdateCheckGuide(null);
  992. }
  993. else
  994. {
  995. Timers.inst.Remove(CheckGuide);
  996. }
  997. }
  998. protected void UpdateCheckGuide(object param)
  999. {
  1000. if (!ViewManager.CheckIsTopView(this.viewCom)) return;
  1001. if ((GuideDataManager.IsGuideFinish(ConstGuideId.FIELD) <= 0 && InstanceZonesDataManager.FightScene == ConstInstanceZonesType.FieldWork))
  1002. {
  1003. GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.FIELD, 7, "选择服装进行战斗吧!", 1);
  1004. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.FIELD, 8, "选择服装进行战斗吧!", 0);
  1005. GuideController.TryGuide(_ui.m_btnNext, ConstGuideId.FIELD, 9, "下一步!");
  1006. }
  1007. }
  1008. }
  1009. }