|
@@ -114,16 +114,19 @@ namespace GFGGame
|
|
return arrayList;
|
|
return arrayList;
|
|
}
|
|
}
|
|
|
|
|
|
- public static List<int> SortItemListByHighScore(List<int> arrayList)
|
|
|
|
|
|
+ public static List<int> SortItemListByHighScore(List<int> arrayList, bool checkNew = false)
|
|
{
|
|
{
|
|
arrayList.Sort((int a, int b) =>
|
|
arrayList.Sort((int a, int b) =>
|
|
{
|
|
{
|
|
- bool isNewA = CheckIsDressUpItemNew(a);
|
|
|
|
- bool isNewB = CheckIsDressUpItemNew(b);
|
|
|
|
- if (isNewA != isNewB)
|
|
|
|
|
|
+ if (checkNew)
|
|
{
|
|
{
|
|
- if (isNewA) return -1;
|
|
|
|
- if (isNewB) return 1;
|
|
|
|
|
|
+ bool isNewA = CheckIsDressUpItemNew(a);
|
|
|
|
+ bool isNewB = CheckIsDressUpItemNew(b);
|
|
|
|
+ if (isNewA != isNewB)
|
|
|
|
+ {
|
|
|
|
+ if (isNewA) return -1;
|
|
|
|
+ if (isNewB) return 1;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
|
|
int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
|
|
int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
|
|
int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
|
|
@@ -134,16 +137,19 @@ namespace GFGGame
|
|
});
|
|
});
|
|
return arrayList;
|
|
return arrayList;
|
|
}
|
|
}
|
|
- public static List<int> SortItemListByLowScore(List<int> arrayList)
|
|
|
|
|
|
+ public static List<int> SortItemListByLowScore(List<int> arrayList, bool checkNew = false)
|
|
{
|
|
{
|
|
arrayList.Sort((int a, int b) =>
|
|
arrayList.Sort((int a, int b) =>
|
|
{
|
|
{
|
|
- bool isNewA = CheckIsDressUpItemNew(a);
|
|
|
|
- bool isNewB = CheckIsDressUpItemNew(b);
|
|
|
|
- if (isNewA != isNewB)
|
|
|
|
|
|
+ if (checkNew)
|
|
{
|
|
{
|
|
- if (isNewA) return -1;
|
|
|
|
- if (isNewB) return 1;
|
|
|
|
|
|
+ bool isNewA = CheckIsDressUpItemNew(a);
|
|
|
|
+ bool isNewB = CheckIsDressUpItemNew(b);
|
|
|
|
+ if (isNewA != isNewB)
|
|
|
|
+ {
|
|
|
|
+ if (isNewA) return -1;
|
|
|
|
+ if (isNewB) return 1;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
|
|
int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
|
|
int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
|
|
int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
|