|
@@ -157,6 +157,7 @@ namespace GFGGame
|
|
Dictionary<int, List<int>> itemListDic = new Dictionary<int, List<int>>();
|
|
Dictionary<int, List<int>> itemListDic = new Dictionary<int, List<int>>();
|
|
Dictionary<int, List<int>> itemDatasDic = DressUpMenuItemDataManager.ItemDatasBySubTypeDic;
|
|
Dictionary<int, List<int>> itemDatasDic = DressUpMenuItemDataManager.ItemDatasBySubTypeDic;
|
|
|
|
|
|
|
|
+
|
|
foreach (int subType in itemDatasDic.Keys)
|
|
foreach (int subType in itemDatasDic.Keys)
|
|
{
|
|
{
|
|
int key = subType;
|
|
int key = subType;
|
|
@@ -175,55 +176,44 @@ namespace GFGGame
|
|
}
|
|
}
|
|
itemListDic[key].AddRange(dressList.GetRange(0, max));
|
|
itemListDic[key].AddRange(dressList.GetRange(0, max));
|
|
}
|
|
}
|
|
- if (itemListDic.ContainsKey(ConstDressUpItemType.LIAN_YI_QUN) &&
|
|
|
|
- (!itemListDic.ContainsKey(ConstDressUpItemType.SHANG_YI) ||
|
|
|
|
- !itemListDic.ContainsKey(ConstDressUpItemType.XIA_ZHUANG) ||
|
|
|
|
- !itemListDic.ContainsKey(ConstDressUpItemType.NEI_DA)))
|
|
|
|
|
|
+
|
|
|
|
+ bool isHasLYQ = itemListDic.ContainsKey(ConstDressUpItemType.LIAN_YI_QUN);
|
|
|
|
+ bool isHasSY = itemListDic.ContainsKey(ConstDressUpItemType.SHANG_YI);
|
|
|
|
+ bool isHasXZ = itemListDic.ContainsKey(ConstDressUpItemType.XIA_ZHUANG);
|
|
|
|
+ bool isHasND = itemListDic.ContainsKey(ConstDressUpItemType.NEI_DA);
|
|
|
|
+
|
|
|
|
+ int countTagLYQ = isHasLYQ && ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.LIAN_YI_QUN][0], tags) ? 1 : 0;
|
|
|
|
+ int countTagSY = isHasSY && ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.SHANG_YI][0], tags) ? 1 : 0;
|
|
|
|
+ int countTagXZ = isHasXZ && ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.XIA_ZHUANG][0], tags) ? 1 : 0;
|
|
|
|
+ int countTagND = isHasND && ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.NEI_DA][0], tags) ? 1 : 0;
|
|
|
|
+
|
|
|
|
+ if (countTagLYQ > countTagSY + countTagXZ + countTagND)
|
|
{
|
|
{
|
|
|
|
+ itemListDic.Remove(ConstDressUpItemType.NEI_DA);
|
|
itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
|
|
itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
|
|
itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
|
|
itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
|
|
- itemListDic.Remove(ConstDressUpItemType.NEI_DA);
|
|
|
|
}
|
|
}
|
|
- else if (!itemListDic.ContainsKey(ConstDressUpItemType.LIAN_YI_QUN) &&
|
|
|
|
- (itemListDic.ContainsKey(ConstDressUpItemType.SHANG_YI) &&
|
|
|
|
- itemListDic.ContainsKey(ConstDressUpItemType.XIA_ZHUANG) &&
|
|
|
|
- itemListDic.ContainsKey(ConstDressUpItemType.NEI_DA)))
|
|
|
|
|
|
+ else if (countTagLYQ < countTagSY + countTagXZ + countTagND)
|
|
{
|
|
{
|
|
itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
|
|
itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
|
|
}
|
|
}
|
|
- if (itemListDic.ContainsKey(ConstDressUpItemType.LIAN_YI_QUN) && itemListDic.ContainsKey(ConstDressUpItemType.SHANG_YI) && itemListDic.ContainsKey(ConstDressUpItemType.XIA_ZHUANG) && itemListDic.ContainsKey(ConstDressUpItemType.NEI_DA))
|
|
|
|
|
|
+ else
|
|
{
|
|
{
|
|
- bool hasTagLYQ = ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.LIAN_YI_QUN][0], tags);
|
|
|
|
- bool hasTagSY = ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.SHANG_YI][0], tags);
|
|
|
|
- bool hasTagXZ = ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.XIA_ZHUANG][0], tags);
|
|
|
|
- bool hasTagND = ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.NEI_DA][0], tags);
|
|
|
|
- if (hasTagLYQ && !hasTagSY && !hasTagXZ)
|
|
|
|
|
|
+ int scoreLYQ = !isHasLYQ ? 0 : ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.LIAN_YI_QUN][0], scoreType, tags);
|
|
|
|
+ int scoreSY = !isHasSY ? 0 : ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.SHANG_YI][0], scoreType, tags);
|
|
|
|
+ int scoreXZ = !isHasXZ ? 0 : ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.XIA_ZHUANG][0], scoreType, tags);
|
|
|
|
+ int scoreND = !isHasND ? 0 : ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.NEI_DA][0], scoreType, tags);
|
|
|
|
+ if (scoreLYQ > scoreSY + scoreXZ + scoreND)
|
|
{
|
|
{
|
|
itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
|
|
itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
|
|
itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
|
|
itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
|
|
itemListDic.Remove(ConstDressUpItemType.NEI_DA);
|
|
itemListDic.Remove(ConstDressUpItemType.NEI_DA);
|
|
}
|
|
}
|
|
- else if (!hasTagLYQ && (hasTagSY || hasTagXZ))
|
|
|
|
- {
|
|
|
|
- itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
|
|
|
|
- }
|
|
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- int scoreLYQ = ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.LIAN_YI_QUN][0], scoreType, tags);
|
|
|
|
- int scoreSY = ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.SHANG_YI][0], scoreType, tags);
|
|
|
|
- int scoreXZ = ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.XIA_ZHUANG][0], scoreType, tags);
|
|
|
|
- int scoreND = ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.NEI_DA][0], scoreType, tags);
|
|
|
|
- if (scoreLYQ > scoreSY + scoreXZ + scoreND)
|
|
|
|
- {
|
|
|
|
- itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
|
|
|
|
- itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
|
|
|
|
- itemListDic.Remove(ConstDressUpItemType.NEI_DA);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
|
|
|
|
- }
|
|
|
|
|
|
+ itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
List<int> itemList = new List<int>();
|
|
List<int> itemList = new List<int>();
|
|
foreach (int subType in itemListDic.Keys)
|
|
foreach (int subType in itemListDic.Keys)
|