|
@@ -729,23 +729,18 @@ namespace GFGGame
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
- public static IEnumerator GetAllDressUpGuideIdListBySubTypeAsync(Action<List<int>> onComplete)
|
|
|
|
|
|
+ public static void GetAllDressUpGuideIdListBySubTypeAsync()
|
|
{
|
|
{
|
|
- List<ItemCfg> itemCfgs = new List<ItemCfg>();
|
|
|
|
- List<int> result = new List<int>();
|
|
|
|
-
|
|
|
|
// 除饰品外的散件
|
|
// 除饰品外的散件
|
|
for (int i = 0; i < dressUpGuideSubType.Length; i++)
|
|
for (int i = 0; i < dressUpGuideSubType.Length; i++)
|
|
{
|
|
{
|
|
- itemCfgs.AddRange(ItemCfgArray.Instance.GetCfgsByitemTypeAndsubType(ConstItemType.DRESS_UP, dressUpGuideSubType[i]));
|
|
|
|
- yield return new WaitForEndOfFrame();
|
|
|
|
|
|
+ ItemCfgArray.Instance.GetCfgsByitemTypeAndsubTypeAsync(ConstItemType.DRESS_UP, dressUpGuideSubType[i]);
|
|
}
|
|
}
|
|
|
|
|
|
// 饰品
|
|
// 饰品
|
|
for (int i = 0; i < dressUpGuideAccessoriesType.Length; i++)
|
|
for (int i = 0; i < dressUpGuideAccessoriesType.Length; i++)
|
|
{
|
|
{
|
|
- itemCfgs.AddRange(ItemCfgArray.Instance.GetCfgsByitemTypeAndsubType(ConstItemType.DRESS_UP, dressUpGuideAccessoriesType[i]));
|
|
|
|
- yield return new WaitForEndOfFrame();
|
|
|
|
|
|
+ ItemCfgArray.Instance.GetCfgsByitemTypeAndsubTypeAsync(ConstItemType.DRESS_UP, dressUpGuideAccessoriesType[i]);
|
|
}
|
|
}
|
|
|
|
|
|
// 特殊
|
|
// 特殊
|
|
@@ -754,46 +749,9 @@ namespace GFGGame
|
|
{
|
|
{
|
|
if (itemTypeCfg[i].type > ConstDressUpItemType.TE_SHU)
|
|
if (itemTypeCfg[i].type > ConstDressUpItemType.TE_SHU)
|
|
{
|
|
{
|
|
- itemCfgs.AddRange(ItemCfgArray.Instance.GetCfgsByitemTypeAndsubType(ConstItemType.DRESS_UP, itemTypeCfg[i].type));
|
|
|
|
- yield return new WaitForEndOfFrame();
|
|
|
|
|
|
+ ItemCfgArray.Instance.GetCfgsByitemTypeAndsubTypeAsync(ConstItemType.DRESS_UP, itemTypeCfg[i].type);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
- itemCfgs.Sort((a, b) =>
|
|
|
|
- {
|
|
|
|
- bool haveA = CheckHasItem(a.id);
|
|
|
|
- bool haveB = CheckHasItem(b.id);
|
|
|
|
-
|
|
|
|
- if (haveB && !haveA)
|
|
|
|
- {
|
|
|
|
- return 1;
|
|
|
|
- }
|
|
|
|
- else if (!haveB && haveA)
|
|
|
|
- {
|
|
|
|
- return -1;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (a.rarity != b.rarity)
|
|
|
|
- {
|
|
|
|
- return a.rarity > b.rarity ? -1 : 1;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return a.res.CompareTo(b.res);
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- for (int i = 0; i < itemCfgs.Count; i++)
|
|
|
|
- {
|
|
|
|
- if (itemCfgs[i].isHide <= 0)
|
|
|
|
- {
|
|
|
|
- result.Add(itemCfgs[i].id);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- onComplete?.Invoke(result);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public static void SortDressUpGuideIdList(List<int> list)
|
|
public static void SortDressUpGuideIdList(List<int> list)
|