|
@@ -14,6 +14,7 @@ namespace GFGGame
|
|
private const int SORT_BY_HIGH_RARITY = 0;
|
|
private const int SORT_BY_HIGH_RARITY = 0;
|
|
private const int SORT_BY_LOW_RARITY = 1;
|
|
private const int SORT_BY_LOW_RARITY = 1;
|
|
private const int SORT_BY_GET_TIME = 2;
|
|
private const int SORT_BY_GET_TIME = 2;
|
|
|
|
+
|
|
private UI_DressUpUI _ui;
|
|
private UI_DressUpUI _ui;
|
|
private float listType1X = 0;
|
|
private float listType1X = 0;
|
|
private float partsListX = 0;
|
|
private float partsListX = 0;
|
|
@@ -28,8 +29,8 @@ namespace GFGGame
|
|
private List<int> _currentList4 = new List<int>();
|
|
private List<int> _currentList4 = new List<int>();
|
|
private int _currentMenuType;
|
|
private int _currentMenuType;
|
|
private int _currentSuitId;
|
|
private int _currentSuitId;
|
|
|
|
+ private bool _isNormalSuitType = false;//当前套装部件列表是否为普通动作列表
|
|
private int _rarityIndex = SORT_BY_HIGH_RARITY;
|
|
private int _rarityIndex = SORT_BY_HIGH_RARITY;
|
|
-
|
|
|
|
private UI_TypeItem listTypeItem_FreedomDress;
|
|
private UI_TypeItem listTypeItem_FreedomDress;
|
|
private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
|
|
private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
|
|
|
|
|
|
@@ -249,26 +250,82 @@ namespace GFGGame
|
|
{
|
|
{
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- GObject listItem = (GObject)context.data as GObject;
|
|
|
|
- int id = (int)listItem.data;
|
|
|
|
- bool isSuit = SuitCfgArray.Instance.GetTotalCountOfOneSuit(id) > 0;
|
|
|
|
- if (isSuit)
|
|
|
|
|
|
+ UI_PartsListItem listItem = UI_PartsListItem.Proxy(context.data as GObject);// (GObject)context.data as GObject;
|
|
|
|
+ int id = (int)listItem.target.data;
|
|
|
|
+ // bool isSuit = SuitCfgArray.Instance.GetTotalCountOfOneSuit(id) > 0;
|
|
|
|
+ if (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG)
|
|
{
|
|
{
|
|
- this.showListParts2(id);
|
|
|
|
- this.hideListParts();
|
|
|
|
- MyDressUpHelper.dressUpObj.PutOnSuitCfg(id, true);
|
|
|
|
- UpdateBtnAction();
|
|
|
|
|
|
+ if (SuitCfgArray.Instance.CheckSuitHasAction(id))
|
|
|
|
+ {
|
|
|
|
+ listItem.m_comAxtionSelect.target.visible = true;
|
|
|
|
+ UI_PartsListItem.ProxyEnd();
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ShowSuitPartList(id, false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else if (_currentMenuType == ConstDressUpItemType.DONG_ZUO)
|
|
|
|
+ {
|
|
|
|
+ MyDressUpHelper.dressUpObj.PutOnOrTakeOffAction(id);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- MyDressUpHelper.dressUpObj.CheckCancelActionWhenPutOn(id);
|
|
|
|
- MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
|
|
|
|
|
|
+ if (MyDressUpHelper.dressUpObj.IsAction)
|
|
|
|
+ {
|
|
|
|
+ if (SuitCfgArray.Instance.CheckItemReaplaceableByAction(id, MyDressUpHelper.dressUpObj.actionId))
|
|
|
|
+ {
|
|
|
|
+ MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ if (!SuitCfgArray.Instance.CheckActionContainsItem(id, MyDressUpHelper.dressUpObj.actionId))
|
|
|
|
+ {
|
|
|
|
+ MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
|
|
|
|
+ }
|
|
|
|
+ MyDressUpHelper.dressUpObj.CancelAction();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- UpdateListPartsSelected();
|
|
|
|
- UpdateListSuitPartsSelected(); ;
|
|
|
|
|
|
+
|
|
|
|
+ UpdateListPartsSelected(id);
|
|
|
|
+ UpdateListSuitPartsSelected();
|
|
// AddMemoryDressup();
|
|
// AddMemoryDressup();
|
|
}
|
|
}
|
|
|
|
+ private void OnBtnNormalClick(EventContext context)
|
|
|
|
+ {
|
|
|
|
+ _isNormalSuitType = true;
|
|
|
|
+ GObject gObject = context.sender as GObject;
|
|
|
|
+ int suitId = (int)gObject.data;
|
|
|
|
+ ShowSuitPartList(suitId, false);
|
|
|
|
+ }
|
|
|
|
+ private void OnBtnActionClick(EventContext context)
|
|
|
|
+ {
|
|
|
|
+ _isNormalSuitType = false;
|
|
|
|
+ GObject gObject = context.sender as GObject;
|
|
|
|
+ int suitId = (int)gObject.data;
|
|
|
|
+ ShowSuitPartList(suitId, true);
|
|
|
|
+ }
|
|
|
|
+ private void ShowSuitPartList(int suitId, bool showAction)
|
|
|
|
+ {
|
|
|
|
+ this.showListParts2(suitId);
|
|
|
|
+ this.hideListParts();
|
|
|
|
+ if (showAction)
|
|
|
|
+ {
|
|
|
|
+ MyDressUpHelper.dressUpObj.PutOnSuitCfg(suitId, true);
|
|
|
|
+ MyDressUpHelper.dressUpObj.PutOnAction(suitId);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ MyDressUpHelper.dressUpObj.CancelAction();
|
|
|
|
+ MyDressUpHelper.dressUpObj.PutOnSuitCfg(suitId, false);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
private void OnClickSuitPartsListItem(EventContext context)
|
|
private void OnClickSuitPartsListItem(EventContext context)
|
|
{
|
|
{
|
|
@@ -279,12 +336,17 @@ namespace GFGGame
|
|
GObject listItem = (GObject)context.data as GObject;
|
|
GObject listItem = (GObject)context.data as GObject;
|
|
int id = (int)listItem.data;
|
|
int id = (int)listItem.data;
|
|
|
|
|
|
- MyDressUpHelper.dressUpObj.CheckCancelActionWhenPutOn(id);
|
|
|
|
- MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
|
|
|
|
|
|
+ ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
|
|
|
|
+ if (itemCfg != null)
|
|
|
|
+ {
|
|
|
|
+ MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ MyDressUpHelper.dressUpObj.PutOnOrTakeOffAction(id);
|
|
|
|
+ }
|
|
|
|
|
|
UpdateListSuitPartsSelected();
|
|
UpdateListSuitPartsSelected();
|
|
- UpdateBtnAction();
|
|
|
|
- // AddMemoryDressup();
|
|
|
|
}
|
|
}
|
|
private void AddMemoryDressup()
|
|
private void AddMemoryDressup()
|
|
{
|
|
{
|
|
@@ -388,11 +450,7 @@ namespace GFGGame
|
|
_ui.m_comListType1.m_listType.height = maxHeight;
|
|
_ui.m_comListType1.m_listType.height = maxHeight;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // private void ShowSubList()
|
|
|
|
- // {
|
|
|
|
- // _ui.m_comListType1.m_listType.numItems = _ui.m_comListType1.m_listType.numItems;
|
|
|
|
- // _ui.m_comListType2.m_listType.numItems = _ui.m_comListType2.m_listType.numItems;
|
|
|
|
- // }
|
|
|
|
|
|
+
|
|
private void showListType1()
|
|
private void showListType1()
|
|
{
|
|
{
|
|
_currentList2 = null;
|
|
_currentList2 = null;
|
|
@@ -476,7 +534,15 @@ namespace GFGGame
|
|
}
|
|
}
|
|
if (selectItem)
|
|
if (selectItem)
|
|
{
|
|
{
|
|
- int itemId = MyDressUpHelper.dressUpObj.GetItemIdBuyType(_currentMenuType);
|
|
|
|
|
|
+ int itemId = 0;
|
|
|
|
+ if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
|
|
|
|
+ {
|
|
|
|
+ itemId = _currentSuitId;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ itemId = MyDressUpHelper.dressUpObj.GetItemIdBuyType(_currentMenuType);
|
|
|
|
+ }
|
|
if (itemId > 0)
|
|
if (itemId > 0)
|
|
{
|
|
{
|
|
int index = _currentList3.IndexOf(itemId);
|
|
int index = _currentList3.IndexOf(itemId);
|
|
@@ -583,6 +649,7 @@ namespace GFGGame
|
|
string iconRes = "";
|
|
string iconRes = "";
|
|
string partName = "";
|
|
string partName = "";
|
|
string ext = "png";
|
|
string ext = "png";
|
|
|
|
+ listItem.m_comAxtionSelect.target.visible = false;
|
|
if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
|
|
if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
|
|
{
|
|
{
|
|
SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
|
|
SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
|
|
@@ -594,6 +661,36 @@ namespace GFGGame
|
|
|
|
|
|
listItem.m_ScoreType.visible = false;
|
|
listItem.m_ScoreType.visible = false;
|
|
listItem.m_imgNew.visible = false;
|
|
listItem.m_imgNew.visible = false;
|
|
|
|
+
|
|
|
|
+ listItem.m_comAxtionSelect.m_btnNormal.icon = ResPathUtil.GetIconPath(suitCfg.res, ext);
|
|
|
|
+ listItem.m_comAxtionSelect.m_btnAction.icon = ResPathUtil.GetIconPath(suitCfg.res, ext);
|
|
|
|
+
|
|
|
|
+ if (listItem.m_comAxtionSelect.m_btnNormal.data == null)
|
|
|
|
+ {
|
|
|
|
+ listItem.m_comAxtionSelect.m_btnNormal.onClick.Add(OnBtnNormalClick);
|
|
|
|
+ }
|
|
|
|
+ listItem.m_comAxtionSelect.m_btnNormal.data = id;
|
|
|
|
+
|
|
|
|
+ if (listItem.m_comAxtionSelect.m_btnAction.data == null)
|
|
|
|
+ {
|
|
|
|
+ listItem.m_comAxtionSelect.m_btnAction.onClick.Add(OnBtnActionClick);
|
|
|
|
+ }
|
|
|
|
+ listItem.m_comAxtionSelect.m_btnAction.data = id;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ else if (_currentMenuType == (int)ConstDressUpItemType.DONG_ZUO)
|
|
|
|
+ {
|
|
|
|
+ SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
|
|
|
|
+ iconRes = suitCfg.res;
|
|
|
|
+ partName = suitCfg.name;
|
|
|
|
+ listItem.m_iconSelected.visible = false;
|
|
|
|
+ RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, true);
|
|
|
|
+ listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + suitCfg.rarity;
|
|
|
|
+
|
|
|
|
+ listItem.m_ScoreType.visible = false;
|
|
|
|
+ listItem.m_imgNew.visible = false;
|
|
|
|
+
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -604,12 +701,9 @@ namespace GFGGame
|
|
listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
|
|
listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
|
|
|
|
|
|
RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
|
|
RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
|
|
- ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
|
|
|
|
|
|
+ // ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
|
|
|
|
|
|
listItem.m_ScoreType.visible = true;
|
|
listItem.m_ScoreType.visible = true;
|
|
- // int mainScore;
|
|
|
|
- // int mainValuel;
|
|
|
|
- // ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
|
|
|
|
listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + itemCfg.mainScore);
|
|
listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + itemCfg.mainScore);
|
|
|
|
|
|
bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
|
|
bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
|
|
@@ -618,7 +712,6 @@ namespace GFGGame
|
|
{
|
|
{
|
|
ItemProxy.ReqSetItemRead(id).Coroutine();
|
|
ItemProxy.ReqSetItemRead(id).Coroutine();
|
|
}
|
|
}
|
|
- // DressUpMenuItemDataManager.RemoveNewDressItem(_currentMenuType, id);
|
|
|
|
}
|
|
}
|
|
if (listItem.target.data == null)
|
|
if (listItem.target.data == null)
|
|
{
|
|
{
|
|
@@ -645,7 +738,7 @@ namespace GFGGame
|
|
int id = (int)_currentList4[index];
|
|
int id = (int)_currentList4[index];
|
|
string iconRes = "";
|
|
string iconRes = "";
|
|
string partName = "";
|
|
string partName = "";
|
|
- string ext = "png";
|
|
|
|
|
|
+ // string ext = "png";
|
|
|
|
|
|
if (listItem.target.data == null)
|
|
if (listItem.target.data == null)
|
|
{
|
|
{
|
|
@@ -656,20 +749,24 @@ namespace GFGGame
|
|
}
|
|
}
|
|
|
|
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
|
|
- iconRes = itemCfg.res;
|
|
|
|
- partName = itemCfg.name;
|
|
|
|
|
|
+ SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
|
|
|
|
+ iconRes = itemCfg != null ? itemCfg.res : suitCfg.res;
|
|
|
|
+ partName = itemCfg != null ? itemCfg.name : suitCfg.name;
|
|
listItem.m_iconSelected.visible = !_ui.m_btnAction.grayed || MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
|
|
listItem.m_iconSelected.visible = !_ui.m_btnAction.grayed || MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
|
|
- listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
|
|
|
|
- RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
|
|
|
|
- ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
|
|
|
|
|
|
+ // listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
|
|
|
|
+ RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, itemCfg == null);
|
|
|
|
+ // ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
|
|
|
|
|
|
- listItem.m_ScoreType.visible = true;
|
|
|
|
|
|
+ listItem.m_ScoreType.visible = false;
|
|
// int mainScore;
|
|
// int mainScore;
|
|
// int mainValuel;
|
|
// int mainValuel;
|
|
// ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
|
|
// ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
|
|
-
|
|
|
|
- listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + itemCfg.mainScore);
|
|
|
|
- listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
|
|
|
|
|
|
+ if (itemCfg != null)
|
|
|
|
+ {
|
|
|
|
+ listItem.m_ScoreType.visible = true;
|
|
|
|
+ listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + itemCfg.mainScore);
|
|
|
|
+ }
|
|
|
|
+ listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, "png");
|
|
listItem.m_txtTitle.text = partName;
|
|
listItem.m_txtTitle.text = partName;
|
|
listItem.target.data = id;
|
|
listItem.target.data = id;
|
|
listItem.m_txtScore.visible = false;
|
|
listItem.m_txtScore.visible = false;
|
|
@@ -684,7 +781,7 @@ namespace GFGGame
|
|
UI_PartsListItem.ProxyEnd();
|
|
UI_PartsListItem.ProxyEnd();
|
|
|
|
|
|
}
|
|
}
|
|
- private void UpdateListPartsSelected()
|
|
|
|
|
|
+ private void UpdateListPartsSelected(int selectSuitId = 0)
|
|
{
|
|
{
|
|
int count = _ui.m_partsList.m_list.numChildren;
|
|
int count = _ui.m_partsList.m_list.numChildren;
|
|
int suitId = MyDressUpHelper.dressUpObj.suitId;
|
|
int suitId = MyDressUpHelper.dressUpObj.suitId;
|
|
@@ -696,33 +793,34 @@ namespace GFGGame
|
|
if (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG)
|
|
if (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG)
|
|
{
|
|
{
|
|
listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
|
|
listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
|
|
|
|
+ listItem.m_comAxtionSelect.target.visible = id == selectSuitId;
|
|
|
|
+ }
|
|
|
|
+ else if (_currentMenuType == ConstDressUpItemType.DONG_ZUO)
|
|
|
|
+ {
|
|
|
|
+ listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.IsAction && MyDressUpHelper.dressUpObj.actionId == id;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装判断是否穿戴
|
|
|
|
- bool isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
|
|
|
|
- bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
|
|
|
|
|
|
+ bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
|
|
|
|
+ bool isAction = MyDressUpHelper.dressUpObj.IsAction && SuitCfgArray.Instance.CheckActionContainsItem(id, MyDressUpHelper.dressUpObj.actionId);
|
|
|
|
|
|
- isSuit = !isSceneType && suitId > 0 && suitId == id;
|
|
|
|
- bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
|
|
|
|
- listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
|
|
|
|
|
|
+ listItem.m_iconSelected.visible = isPutOn || isAction;
|
|
}
|
|
}
|
|
UI_PartsListItem.ProxyEnd();
|
|
UI_PartsListItem.ProxyEnd();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
private void UpdateListSuitPartsSelected()
|
|
private void UpdateListSuitPartsSelected()
|
|
{
|
|
{
|
|
int count = _ui.m_partsList2.m_list.numChildren;
|
|
int count = _ui.m_partsList2.m_list.numChildren;
|
|
- int suitId = MyDressUpHelper.dressUpObj.suitId;
|
|
|
|
|
|
+
|
|
for (int i = 0; i < count; i++)
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
{
|
|
UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList2.m_list.GetChildAt(i));
|
|
UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList2.m_list.GetChildAt(i));
|
|
int id = (int)listItem.target.data;
|
|
int id = (int)listItem.target.data;
|
|
-
|
|
|
|
- bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装判断是否穿戴
|
|
|
|
- bool isSuit = !DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id) && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
|
|
|
|
- bool isSceneSuit = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id) && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
|
|
|
|
- listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
|
|
|
|
|
|
+ bool isSuitSelect = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//可换部件是否穿戴
|
|
|
|
+ bool isActionSelect = MyDressUpHelper.dressUpObj.actionId == id;
|
|
|
|
+ listItem.m_iconSelected.visible = isSuitSelect || isActionSelect;
|
|
UI_PartsListItem.ProxyEnd();
|
|
UI_PartsListItem.ProxyEnd();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -747,6 +845,23 @@ namespace GFGGame
|
|
_currentList3.Reverse();
|
|
_currentList3.Reverse();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ else if (_currentMenuType == (int)ConstDressUpItemType.DONG_ZUO)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ _currentList3 = DressUpMenuSuitDataManager.GetActionIDList();
|
|
|
|
+ if (_rarityIndex == SORT_BY_HIGH_RARITY)
|
|
|
|
+ {
|
|
|
|
+ _currentList3 = SuitUtil.SortSuitListByHighRarity(_currentList3);
|
|
|
|
+ }
|
|
|
|
+ else if (_rarityIndex == SORT_BY_LOW_RARITY)
|
|
|
|
+ {
|
|
|
|
+ _currentList3 = SuitUtil.SortSuitListByLowRarity(_currentList3);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ _currentList3.Reverse();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
else
|
|
else
|
|
{
|
|
{
|
|
_currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
|
|
_currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
|
|
@@ -766,11 +881,11 @@ namespace GFGGame
|
|
}
|
|
}
|
|
if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
|
|
if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
|
|
{
|
|
{
|
|
- _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3, _currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG);
|
|
|
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3);
|
|
}
|
|
}
|
|
else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
|
|
else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
|
|
{
|
|
{
|
|
- _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3, _currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG);
|
|
|
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3);
|
|
}
|
|
}
|
|
|
|
|
|
_ui.m_partsList.m_list.RemoveChildrenToPool();
|
|
_ui.m_partsList.m_list.RemoveChildrenToPool();
|
|
@@ -780,28 +895,23 @@ namespace GFGGame
|
|
private void UpdateSuitPartsListSort()
|
|
private void UpdateSuitPartsListSort()
|
|
{
|
|
{
|
|
if (_currentMenuType == 0) return;
|
|
if (_currentMenuType == 0) return;
|
|
-
|
|
|
|
- _currentList4 = new List<int>(SuitCfgArray.Instance.GetSuitItems(_currentSuitId));
|
|
|
|
- if (_rarityIndex == SORT_BY_HIGH_RARITY)
|
|
|
|
|
|
+ if (_isNormalSuitType)
|
|
{
|
|
{
|
|
- _currentList4 = DressUpMenuItemDataManager.SortItemListByHighRarity(_currentList4);
|
|
|
|
- }
|
|
|
|
- else if (_rarityIndex == SORT_BY_LOW_RARITY)
|
|
|
|
- {
|
|
|
|
- _currentList4 = DressUpMenuItemDataManager.SortItemListByLowRarity(_currentList4);
|
|
|
|
|
|
+ _currentList4 = new List<int>(SuitCfgArray.Instance.GetSuitItems(_currentSuitId));
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- _currentList4.Reverse();
|
|
|
|
|
|
+ _currentList4 = SuitCfgArray.Instance.GetOneSuitAllNotActionParts(_currentSuitId);
|
|
|
|
+ _currentList4.Add(_currentSuitId);
|
|
}
|
|
}
|
|
|
|
|
|
if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
|
|
if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
|
|
{
|
|
{
|
|
- _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4, false);
|
|
|
|
|
|
+ _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4);
|
|
}
|
|
}
|
|
else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
|
|
else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
|
|
{
|
|
{
|
|
- _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4, false);
|
|
|
|
|
|
+ _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4);
|
|
}
|
|
}
|
|
|
|
|
|
_ui.m_partsList2.m_list.RemoveChildrenToPool();
|
|
_ui.m_partsList2.m_list.RemoveChildrenToPool();
|
|
@@ -811,11 +921,11 @@ namespace GFGGame
|
|
|
|
|
|
private void UpdateBtnAction()
|
|
private void UpdateBtnAction()
|
|
{
|
|
{
|
|
- _ui.m_btnAction.visible = (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG) || this.currentListType == DressUpListType.List4;
|
|
|
|
- if (_ui.m_btnAction.visible)
|
|
|
|
- {
|
|
|
|
- //_ui.m_btnAction.grayed = !EquipDataCache.cacher.HasSuitActionRes;
|
|
|
|
- }
|
|
|
|
|
|
+ // _ui.m_btnAction.visible = (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG) || this.currentListType == DressUpListType.List4;
|
|
|
|
+ // if (_ui.m_btnAction.visible)
|
|
|
|
+ // {
|
|
|
|
+ //_ui.m_btnAction.grayed = !EquipDataCache.cacher.HasSuitActionRes;
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
|
|
|
|
private void OnClickBtnShow()
|
|
private void OnClickBtnShow()
|