wuwangdong 4 năm trước cách đây
mục cha
commit
7e9f59438f
1 tập tin đã thay đổi với 10 bổ sung3 xóa
  1. 10 3
      assets/script/game/data/GameData.ts

+ 10 - 3
assets/script/game/data/GameData.ts

@@ -1140,11 +1140,18 @@ export class GameData {
         {
             let data = this._productMakeTimesData.productUnlockMaxId;
 
-            data.forEach(function (value, key) {
+            data.forEach((value, key) => {
                 if(key != ProductType.dw)
                 {
-                    let data = this.updateDataToSever(key);
-
+                    let data = this.getMaxProductDataByType(key);
+                    if(data.unlock == 1 && value < data.picture)
+                    {
+                        let makeTimes = this.getProductMakeTimesById(value);
+                        if(makeTimes >= data.value)
+                        {
+                            this.addProductUnlockMaxId(key, data.picture, false);
+                        }
+                    }
                 }    
             });
         }