wuwangdong 4 gadi atpakaļ
vecāks
revīzija
ec91cf17c8

+ 21 - 27
assets/script/game/game/Game.ts

@@ -167,15 +167,14 @@ export default class Game extends cc.Component {
         //     }
         //     this.autoPopSign = false;        
         // }
-        if(gData.gameData.funOpenData[11] == "1")
-        {
+        if (gData.gameData.funOpenData[11] == "1") {
             let isTeach = mk.guide.open(10);
             if (isTeach) {
                 mk.event.register("event_guide", this.initGuideEvent.bind(this), this);
                 //mk.guide.continueCallBack = this.judgeContinueTeach;
             }
         }
-    
+
         let value = mk.storage.getStorage('loadingFinish');
         if (!value) {
             mk.storage.setStorage('loadingFinish', 1);
@@ -232,7 +231,7 @@ export default class Game extends cc.Component {
 
         if (!this.isShowAddProductTimesUI && needAdd) {
             this.isShowAddProductTimesUI = true;
-            if (add > 0) {    
+            if (add > 0) {
                 add = add > offset ? offset : add;
                 if (add > 0) {
                     //add = add > gData.gameData.maxTimes ? gData.gameData.maxTimes : add;
@@ -525,6 +524,13 @@ export default class Game extends cc.Component {
             // {
             //     mk.ui.openPanel('module/speedUpUI/productReward');
             // } 
+            if (gData.gameData.prohibitProductionAd[gData.loginData.userChannel - 1] == "1") {
+                if (gData.gameData.playerProp.curProductionAdTimes >= gData.gameData.productionAdMaxTimes) {
+                    mk.tip.pop('今日领取生产次数已达上限!');
+                    return;
+                }
+            }
+            
             mk.ui.openPanel('module/speedUpUI/productReward');
             return;
         }
@@ -534,14 +540,6 @@ export default class Game extends cc.Component {
             return;
         }
 
-        if(gData.gameData.prohibitProductionAd[gData.loginData.userChannel - 1] == "1")
-        {
-            if(gData.gameData.playerProp.curProductionAdTimes >= gData.gameData.productionAdMaxTimes)
-            {
-                mk.tip.pop('今日领取生产次数已达上限!');
-                return;
-            }
-        }
 
         let flyRed = await gData.gameData.makeProduct();
 
@@ -730,9 +728,8 @@ export default class Game extends cc.Component {
         //     namePath = 'game/coregame/texture/factory_icons/factoryNams/factory_name_icon_';
         // }
 
-        
-        if(gData.gameData.funOpenData[12] == "0")
-        {
+
+        if (gData.gameData.funOpenData[12] == "0") {
             this.node_farmMapUI.active = false;
             return;
         }
@@ -746,9 +743,8 @@ export default class Game extends cc.Component {
                     let data = list_data[i];
                     //剔除前三个农作物
                     let extraCondition = true;
-                    if(ProductType[key] == ProductType.nzw)
-                    {
-                        extraCondition = (data.picture >10003);
+                    if (ProductType[key] == ProductType.nzw) {
+                        extraCondition = (data.picture > 10003);
                     }
                     if (extraCondition && data.picture <= max) {
                         let state = gData.gameData.getFarmMapRewardState(this.getIndex(data));
@@ -775,7 +771,7 @@ export default class Game extends cc.Component {
                         let plantName = gData.gameData.getProductMap(data.picture - 1).name;
                         let des = this.getDesByType(data);
                         let len = plantName.length;
-                        this.node_farmMapUI.width = 300 + (len - 2) * 20 + (len - 2)*5;
+                        this.node_farmMapUI.width = 300 + (len - 2) * 20 + (len - 2) * 5;
                         this.lbl_farmMapDes.string = `<color=#7E411F>${des}<color=#FF0000>${data.value}</c>次${plantName} <color=#FF0000>${times}</c>/${data.value}</color>`;
                         //this.sp_farmMapIcon.spriteFrame = await mk.loader.load('module/farmMap/texture/gift', cc.SpriteFrame);
                         return;
@@ -1124,15 +1120,14 @@ export default class Game extends cc.Component {
                 this.node_getOrderReward.getComponent(cc.Animation).play();
                 this.node_orderHand.active = true;
                 mk.ui.closeAllUI();
-                if(gData.gameData.funOpenData[11] == "1")
-                {
+                if (gData.gameData.funOpenData[11] == "1") {
                     let isGuide = mk.guide.open(12);
                     if (!isGuide) {
                         mk.tip.pop("订单已完成,快领奖吧!");
                     }
-                }else{
+                } else {
                     mk.tip.pop("订单已完成,快领奖吧!");
-                }       
+                }
             }
 
             {
@@ -1206,16 +1201,15 @@ export default class Game extends cc.Component {
         //     return false;
         // }
         let leftTimes = gData.gameData.leftTimes;
-        if(leftTimes > 0)
-        {
+        if (leftTimes > 0) {
             mk.guide.curDes = `<color=8A4312><color=ff0000>继续生产${leftTimes}次</c>,很快就\n可以完成订单了!</color>`;
             return true;
-        }else{
+        } else {
             // if(gData.gameData.moveMapNode)
             // {
             //     gData.gameData.moveMapNode.move(new cc.Vec3(0, -370, 0));
             // }
-   
+
             return false;
         }
     }

BIN
build/jsb-link/assets/main/index.jsc


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
build/jsb-link/assets/resources/config.json


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/caches/build_file_checksums.ser


+ 4 - 4
build/jsb-link/js backups (useful for debugging)/main.index.js

@@ -15021,6 +15021,10 @@ switch (o.label) {
 case 0:
 mk.audio.playEffect("button");
 if (gData.gameData.leftTimes <= 0) {
+if ("1" == gData.gameData.prohibitProductionAd[gData.loginData.userChannel - 1] && gData.gameData.playerProp.curProductionAdTimes >= gData.gameData.productionAdMaxTimes) {
+mk.tip.pop("今日领取生产次数已达上限!");
+return [ 2 ];
+}
 mk.ui.openPanel("module/speedUpUI/productReward");
 return [ 2 ];
 }
@@ -15028,10 +15032,6 @@ if (gData.gameData.isProducting) {
 mk.tip.pop("点击太快了");
 return [ 2 ];
 }
-if ("1" == gData.gameData.prohibitProductionAd[gData.loginData.userChannel - 1] && gData.gameData.playerProp.curProductionAdTimes >= gData.gameData.productionAdMaxTimes) {
-mk.tip.pop("今日领取生产次数已达上限!");
-return [ 2 ];
-}
 return [ 4, gData.gameData.makeProduct() ];
 
 case 1:

+ 2 - 2
packages-hot-update/cfg.json

@@ -12,7 +12,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsfTest/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsf/baseRemote/"
     ],
-    "buildTime": 1635820977539,
-    "genTime": 1635820977539,
+    "buildTime": 1635821881563,
+    "genTime": 1635821881563,
     "genVersion": null
 }

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels