|
@@ -21,6 +21,8 @@ namespace GFGGame
|
|
|
|
|
|
private static List<int> _itemDatas = new List<int>();
|
|
|
|
|
|
+ private static Dictionary<int, List<int>> _newItemdata = new Dictionary<int, List<int>>();
|
|
|
+
|
|
|
public static void InitData()
|
|
|
{
|
|
|
_itemDatas.Clear();
|
|
@@ -30,6 +32,7 @@ namespace GFGGame
|
|
|
selectRarityList.Clear();
|
|
|
selectScoreList.Clear();
|
|
|
selectTagList.Clear();
|
|
|
+ _newItemdata.Clear();
|
|
|
}
|
|
|
public static void Add(int value)
|
|
|
{
|
|
@@ -43,12 +46,14 @@ namespace GFGGame
|
|
|
if (!_itemDatas.Contains(value))
|
|
|
{
|
|
|
_itemDatas.Add(value);
|
|
|
+ if (GameGlobal.DataInited)
|
|
|
+ {
|
|
|
+ AddNewDressItem(value);
|
|
|
+ }
|
|
|
DressUpMenuSuitDataManager.CheckItemInSuit(value);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
public static bool CheckHasItem(int itemID)
|
|
|
{
|
|
|
return _itemDatas.Contains(itemID);
|
|
@@ -157,6 +162,10 @@ namespace GFGGame
|
|
|
{
|
|
|
ItemCfg itemCfgA = ItemCfgArray.Instance.GetCfg(a);
|
|
|
ItemCfg itemCfgB = ItemCfgArray.Instance.GetCfg(b);
|
|
|
+ if (CheckIsDressItemNew(b) && !CheckIsDressItemNew(a))
|
|
|
+ {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
if (itemCfgB.rarity > itemCfgA.rarity)
|
|
|
{
|
|
|
return 1;
|
|
@@ -176,6 +185,10 @@ namespace GFGGame
|
|
|
{
|
|
|
ItemCfg itemCfgA = ItemCfgArray.Instance.GetCfg(a);
|
|
|
ItemCfg itemCfgB = ItemCfgArray.Instance.GetCfg(b);
|
|
|
+ if (CheckIsDressItemNew(b) && !CheckIsDressItemNew(a))
|
|
|
+ {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
if (itemCfgB.rarity < itemCfgA.rarity)
|
|
|
{
|
|
|
return 1;
|
|
@@ -287,7 +300,6 @@ namespace GFGGame
|
|
|
return score;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
public static List<int> DressSearch(List<int> list, bool isTaoZhuang)
|
|
|
{
|
|
|
List<int> searchList = new List<int>();
|
|
@@ -442,5 +454,49 @@ namespace GFGGame
|
|
|
}
|
|
|
return isTag;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ private static void AddNewDressItem(int value)
|
|
|
+ {
|
|
|
+ int subType = ItemUtilCS.GetItemSubType(value);
|
|
|
+ if (!_newItemdata.ContainsKey(subType))
|
|
|
+ {
|
|
|
+ _newItemdata.Add(subType, new List<int>());
|
|
|
+ }
|
|
|
+ _newItemdata[subType].Add(value);
|
|
|
+ }
|
|
|
+ public static void RemoveNewDressItem(int subType, int itemId)
|
|
|
+ {
|
|
|
+ if (_newItemdata.ContainsKey(subType) && _newItemdata[subType].IndexOf(itemId) >= 0)
|
|
|
+ {
|
|
|
+ _newItemdata[subType].Remove(itemId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public static bool CheckIsSubtypeNew(int subType)
|
|
|
+ {
|
|
|
+ DressUpMenuItemCfg1 cfg1 = DressUpMenuItemCfg1Array.Instance.GetCfg(subType);
|
|
|
+
|
|
|
+ if (_newItemdata.ContainsKey(subType) && _newItemdata.Count > 0)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else if (cfg1.subMenusArr.Length > 0)
|
|
|
+ {
|
|
|
+ foreach (int id2 in cfg1.subMenusArr)
|
|
|
+ {
|
|
|
+ DressUpMenuItemCfg2 cfg2 = DressUpMenuItemCfg2Array.Instance.GetCfg(id2);
|
|
|
+ if (cfg2.type == subType && _newItemdata.ContainsKey(subType) && _newItemdata.Count > 0)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ public static bool CheckIsDressItemNew(int itemId)
|
|
|
+ {
|
|
|
+ int subType = ItemUtilCS.GetItemSubType(itemId);
|
|
|
+ return _newItemdata.ContainsKey(subType) && _newItemdata[subType].IndexOf(itemId) >= 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|