|
@@ -84,12 +84,12 @@ namespace GFGGame
|
|
|
return resources;
|
|
|
}
|
|
|
|
|
|
+ //默认词牌排序规则 :稀有度>星级>等级>种类(风>花>雪>月)
|
|
|
public static List<CardData> SortItemList(List<CardData> arrayList)
|
|
|
{
|
|
|
|
|
|
arrayList.Sort((CardData a, CardData b) =>
|
|
|
{
|
|
|
-
|
|
|
int rarityA = a.itemCfg.rarity;
|
|
|
int rarityB = b.itemCfg.rarity;
|
|
|
if (rarityA < rarityB)
|
|
@@ -100,6 +100,28 @@ namespace GFGGame
|
|
|
{
|
|
|
return -1;
|
|
|
}
|
|
|
+ else {
|
|
|
+ if (a.star < b.star)
|
|
|
+ {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ else if (a.star > b.star) {
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if (a.lv < b.lv)
|
|
|
+ return 1;
|
|
|
+ else if (a.lv > b.lv)
|
|
|
+ return -1;
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (a.mainScore> b.mainScore)
|
|
|
+ return 1;
|
|
|
+ else if (a.mainScore < b.mainScore)
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
return string.Compare(a.itemCfg.res, b.itemCfg.res);
|
|
|
});
|