|
@@ -224,7 +224,7 @@ namespace GFGGame
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (!CheckListCount(item1.type))
|
|
|
+ if (_ui.m_partsList.m_list.numItems <= 0)
|
|
|
{
|
|
|
PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
|
|
|
return;
|
|
@@ -243,7 +243,7 @@ namespace GFGGame
|
|
|
GObject typeItem = context.data as GObject;
|
|
|
int order = (int)typeItem.data;
|
|
|
DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[order - 1];
|
|
|
- if (!CheckListCount(item2.type))
|
|
|
+ if (_ui.m_partsList.m_list.numItems <= 0)
|
|
|
{
|
|
|
PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
|
|
|
return;
|
|
@@ -334,7 +334,7 @@ namespace GFGGame
|
|
|
.SetRightButton(true, "好的");
|
|
|
return;
|
|
|
}
|
|
|
- int _suitId = EquipDataCache.cacher.suitId;
|
|
|
+ int _suitId = DressUpMenuSuitDataManager.CheckCurDressIsSuit(); ;
|
|
|
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)
|
|
|
{
|
|
|
Alert.Show("未穿戴必须品~").SetRightButton(true, "好的");
|
|
@@ -694,19 +694,21 @@ namespace GFGGame
|
|
|
private void UpdateListPartsSelected()
|
|
|
{
|
|
|
int count = _ui.m_partsList.m_list.numChildren;
|
|
|
+ int suitId = DressUpMenuSuitDataManager.CheckCurDressIsSuit();
|
|
|
+
|
|
|
for (int i = 0; i < count; i++)
|
|
|
{
|
|
|
UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList.m_list.GetChildAt(i));
|
|
|
int id = (int)listItem.target.data;
|
|
|
if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
|
|
|
{
|
|
|
- listItem.m_iconSelected.visible = EquipDataCache.cacher.suitId > 0 && id == EquipDataCache.cacher.suitId;
|
|
|
+ listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool isPutOn = EquipDataCache.cacher.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
|
|
|
- bool isSuit = !DressUpMenuItemDataManager.CheckIsSceneType(id) && EquipDataCache.cacher.suitId > 0 && SuitCfgManager.Instance.GetItemSuitId(id) == EquipDataCache.cacher.suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
|
|
|
- bool isSceneSuit = DressUpMenuItemDataManager.CheckIsSceneType(id) && EquipDataCache.cacher.suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
|
|
|
+ bool isSuit = !DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && SuitCfgManager.Instance.GetItemSuitId(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
|
|
|
+ bool isSceneSuit = DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
|
|
|
listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
|
|
|
}
|
|
|
}
|
|
@@ -714,14 +716,16 @@ namespace GFGGame
|
|
|
private void UpdateListSuitPartsSelected()
|
|
|
{
|
|
|
int count = _ui.m_partsList2.m_list.numChildren;
|
|
|
+ int suitId = DressUpMenuSuitDataManager.CheckCurDressIsSuit();
|
|
|
+
|
|
|
for (int i = 0; i < count; i++)
|
|
|
{
|
|
|
UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList2.m_list.GetChildAt(i));
|
|
|
int id = (int)listItem.target.data;
|
|
|
|
|
|
bool isPutOn = EquipDataCache.cacher.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
|
|
|
- bool isSuit = !DressUpMenuItemDataManager.CheckIsSceneType(id) && EquipDataCache.cacher.suitId > 0 && SuitCfgManager.Instance.GetItemSuitId(id) == EquipDataCache.cacher.suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
|
|
|
- bool isSceneSuit = DressUpMenuItemDataManager.CheckIsSceneType(id) && EquipDataCache.cacher.suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
|
|
|
+ bool isSuit = !DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && SuitCfgManager.Instance.GetItemSuitId(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
|
|
|
+ bool isSceneSuit = DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
|
|
|
listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
|
|
|
|
|
|
}
|