huangxiaoyue 1 жил өмнө
parent
commit
ab48b68665

+ 4 - 1
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -130,7 +130,10 @@ namespace GFGGame
                 int buyTypeB = (b.maxBuyNum == 0 || b.maxBuyNum - GetGoodsBuyNumById(b.id) > 0) ? 1 : -1;
                 if (buyTypeA > buyTypeB) return -1;
                 if (buyTypeA < buyTypeB) return 1;
-
+                int sortTypeA = a.sort == 0 ? 999 : a.sort;
+                int sortTypeB = b.sort == 0 ? 999 : b.sort; 
+                if (sortTypeA > sortTypeB) return 1;
+                if (sortTypeA < sortTypeB) return -1;
                 return a.id - b.id;
             });
             return shopCfgs;