wuwangdong преди 4 години
родител
ревизия
d34b8a5c13

+ 6 - 0
assets/script/before/view/data/HarvestData.ts

@@ -23,6 +23,7 @@ export default class HarvestData extends Data {
     openPanel(configID, plantID, call, node, isTouchBtn =false, isTeach = false) {
         if(!this.isCdOver)
         {
+            console.log("=========isCdOver");
             return;
         }
         this.configID = configID;
@@ -45,6 +46,7 @@ export default class HarvestData extends Data {
                     mk.ui.openPanel('game/prefab/uiPanel/HarvestPanel');
                 }else{
                     this.isCdOver = false;
+                    console.log("=========isCdOver == false");
                     this.getNormalReward();
                 }
                 
@@ -54,6 +56,7 @@ export default class HarvestData extends Data {
             }
         }else{
             this.isCdOver = false;
+            console.log("=========isCdOver == false");
             this.getNormalReward();
         }
     
@@ -90,6 +93,7 @@ export default class HarvestData extends Data {
         //奖励弹窗
         if (response.data.redMoneyAddition <= 0) {
             this.isCdOver = true;
+            console.log("=========isCdOver == true");
             console.log('返回奖励为0')
         }
         else {
@@ -108,6 +112,7 @@ export default class HarvestData extends Data {
                 hand.setPosition(pos);
                 cc.tween(hand).delay(0.4).call(()=>{
                     this.isCdOver = true;
+                    console.log("=========isCdOver == true");
                     this.getType = 0;
                     let rewardData = [{ rewardType: 1, rewardNum: response.data.redMoneyAddition }];
                     gData.reward.data = rewardData;
@@ -119,6 +124,7 @@ export default class HarvestData extends Data {
                 }).removeSelf().start();
             }else{
                 this.isCdOver = true;
+                console.log("=========isCdOver == true");
                 this.getType = 0;
                 let rewardData = [{ rewardType: 1, rewardNum: response.data.redMoneyAddition }];
                 gData.reward.data = rewardData;

+ 3 - 0
assets/script/before/view/uiItem/PlantItem.ts

@@ -73,6 +73,9 @@ export default class PlantItem extends cc.Component {
             if (times >= list_data.value) {
                 unlock = true;
             }
+            console.log(`PlantItem=====>picture===${list_data.picture}`);
+            console.log(`PlantItem=====>times===${times}`);
+            console.log(`PlantItem=====>value===${list_data.value}`);
         }
         //根据农场等级
         else if (list_data.unlock == 2) {

+ 46 - 1
assets/script/game/data/GameData.ts

@@ -211,7 +211,7 @@ export class GameData {
         //mk.console.logSingle('redMoneyCashPayRecordList==>', res_data.redMoneyCashPayRecordList);
         this.playerProp.userFarmTaskInfo = res_data.userFarmTaskInfo;
         this.playerProp.speedUpLeftTimes = res_data.speedUpLeftTimes;
-        this.playerProp.completeFarmTaskTimes = res_data.completeFarmTaskTimes;
+        this.playerProp.completeFarmTaskTimes = 3;//res_data.completeFarmTaskTimes;
         this.playerProp.orderData = res_data.userOrderTaskInfo;
         console.log("==============initPlayerProp");
         console.log(res_data.userOrderTaskInfo);
@@ -619,6 +619,47 @@ export class GameData {
         //return this.getProductMap(id);
     }
 
+    public doJudgeOrderLogic(out?: any)
+    {
+        let data = this.playerProp.orderData;
+        let orderData = data.orderTaskList;
+        if (data && orderData) {
+            let productJson = this.configs.Product;
+            for (let i = 0; i != orderData.length; ++i) {
+                let dataE = orderData[i];
+                if (this.playerProp.copyOrderData[i] < dataE.taskCount) {
+                    if (dataE.Id <= productJson.length) {
+                        let productData = productJson[dataE.Id - 1];
+                        if (productData.tab == ProductType.nzw) {
+                            continue;
+                        }else if(productData.tab == ProductType.dw)
+                        {
+                            let pastureIcon = gData.pastureSystem.pastureIcons;
+                            let len = pastureIcon.length;
+                            for (var j = 0; j < len; j++) {
+                                if (pastureIcon[j].data.productID == productData.picture && pastureIcon[j].data.state == PastureState.Empty) {
+                                    out.state = 2;
+                                    break;
+                                }
+                            }
+
+                        }else{
+                            let factoryIcon = gData.factorySystem.factoryIcons;
+                            let len = factoryIcon.length;
+                            for (var j = 0; j < len; j++) {
+                                let tab = this.getTabByConfigID(factoryIcon[j].configID);
+                                if (tab == productData.tab&& factoryIcon[j].data.state == FactroyState.Empty) {
+                                    out.state = 1;
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
     /** 随机获取可生产产品 */
     getRandomFactoryConfig(configID) {
         let tab = gData.gameData.getTabByConfigID(configID);
@@ -719,6 +760,10 @@ export class GameData {
         let haveEmpty = { state: -1 };
         let next = gData.farmSystem.selectNextFarm(haveEmpty, sel);
         if (!next) {
+            if(haveEmpty.state == -1)
+            {
+                this.doJudgeOrderLogic(haveEmpty);
+            }
             let next1 = gData.pastureSystem.nextPasture(haveEmpty);
             if (!next1) {
                 let next2 = gData.factorySystem.nextFactory(haveEmpty);

+ 2 - 9
assets/script/game/game/Game.ts

@@ -297,10 +297,10 @@ export default class Game extends cc.Component {
 
         if (gData.gameData.addHb > 0) {
             let add = Math.round(gData.gameData.addHb / 100);
-            this.lbl_addHb.string = "+" + add.toString();
             gData.gameData.addHb = 0;
 
             if (add > 0) {
+                this.lbl_addHb.string = "+" + add.toString();
                 cc.Tween.stopAllByTarget(this.node_addHb);
                 this.node_addHb.active = true;
                 this.node_addHb.scale = 0;
@@ -696,20 +696,13 @@ export default class Game extends cc.Component {
                 }
             }
         } else {
-            let id = -1;
             let factorys = gData.factorySystem.factoryIcons;
             for (let i = 0; i != factorys.length; ++i) {
-                if (factorys[i].tab == this.productType && factorys[i].data.state == FarmState.Empty) {
-                    if (id != -1) {
-                        id = i;
-                    }
+                if (factorys[i].tab == this.productType) {
                     gData.factorySystem.currSelectFactory = factorys[i];
                     break;
                 }
             }
-            if (!gData.factorySystem.currSelectFactory) {
-                gData.factorySystem.currSelectFactory = factorys[id];
-            }
         }
 
         gData.plantData.openPanel(this.productType, 1, this.productIndex - 1);

+ 1 - 1
assets/script/game/module/forceUpdate/ForceUpdate.ts

@@ -66,7 +66,7 @@ export default class ForceUpdate extends cc.Component {
                 this.labPro.string = '0%'
 
                 this.btnSure.active = true
-                this.btnCancel.active = true
+                this.btnCancel.active = false
             },
             (bytesReceived, totalBytesReceived, totalBytesExpected) => {
                 let pro = totalBytesReceived / totalBytesExpected

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


Файловите разлики са ограничени, защото са твърде много
+ 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


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

@@ -11674,7 +11674,7 @@ t.fileProgress.node.parent.active = !1;
 t.fileProgress.fillRange = 0;
 t.labPro.string = "0%";
 t.btnSure.active = !0;
-t.btnCancel.active = !0;
+t.btnCancel.active = !1;
 }, function(e, a, o) {
 var n = a / o;
 t.setPro(n);
@@ -12880,7 +12880,7 @@ this.playerProp.redMoneyCashPayRecordList = t.redMoneyCashPayRecordList;
 mk.console.logSingle("userNoviceWeFareInfo==>", t.userNoviceWeFareInfo);
 this.playerProp.userFarmTaskInfo = t.userFarmTaskInfo;
 this.playerProp.speedUpLeftTimes = t.speedUpLeftTimes;
-this.playerProp.completeFarmTaskTimes = t.completeFarmTaskTimes;
+this.playerProp.completeFarmTaskTimes = 3;
 this.playerProp.orderData = t.userOrderTaskInfo;
 console.log("==============initPlayerProp");
 console.log(t.userOrderTaskInfo);
@@ -13135,6 +13135,28 @@ return this.getProductMap(e);
 }
 return this.getProductMap(e);
 };
+t.prototype.doJudgeOrderLogic = function(t) {
+var e = this.playerProp.orderData, a = e.orderTaskList;
+if (e && a) for (var o = this.configs.Product, n = 0; n != a.length; ++n) {
+var i = a[n];
+if (this.playerProp.copyOrderData[n] < i.taskCount && i.Id <= o.length) {
+var r = o[i.Id - 1];
+if (r.tab == u.nzw) continue;
+if (r.tab == u.dw) {
+for (var c = gData.pastureSystem.pastureIcons, s = c.length, l = 0; l < s; l++) if (c[l].data.productID == r.picture && c[l].data.state == p.Empty) {
+t.state = 2;
+break;
+}
+} else {
+var h = gData.factorySystem.factoryIcons;
+for (s = h.length, l = 0; l < s; l++) if (this.getTabByConfigID(h[l].configID) == r.tab && h[l].data.state == d.Empty) {
+t.state = 1;
+break;
+}
+}
+}
+}
+};
 t.prototype.getRandomFactoryConfig = function(t) {
 for (var e = gData.gameData.getTabByConfigID(t), a = this.getProductArrByType(e), o = this.getMaxProduct(e), n = [], i = a.length, c = 0; c < i; c++) if (a[c].picture <= o) {
 n.push(a[c].picture);
@@ -13195,7 +13217,10 @@ if (!this.nextMake) {
 var e = {
 state: -1
 };
-gData.farmSystem.selectNextFarm(e, t) || gData.pastureSystem.nextPasture(e) || gData.factorySystem.nextFactory(e) || (this.nextType = 0);
+if (!gData.farmSystem.selectNextFarm(e, t)) {
+-1 == e.state && this.doJudgeOrderLogic(e);
+gData.pastureSystem.nextPasture(e) || gData.factorySystem.nextFactory(e) || (this.nextType = 0);
+}
 this.init_makeInfo = !0;
 }
 };
@@ -14822,13 +14847,11 @@ break;
 }
 gData.farmSystem.currSelectFarm || (gData.farmSystem.currSelectFarm = t[0]);
 } else {
-var a = -1, o = gData.factorySystem.factoryIcons;
-for (e = 0; e != o.length; ++e) if (o[e].tab == this.productType && o[e].data.state == d.FarmState.Empty) {
--1 != a && (a = e);
-gData.factorySystem.currSelectFactory = o[e];
+var a = gData.factorySystem.factoryIcons;
+for (e = 0; e != a.length; ++e) if (a[e].tab == this.productType) {
+gData.factorySystem.currSelectFactory = a[e];
 break;
 }
-gData.factorySystem.currSelectFactory || (gData.factorySystem.currSelectFactory = o[a]);
 }
 gData.plantData.openPanel(this.productType, 1, this.productIndex - 1);
 };
@@ -17255,6 +17278,7 @@ this.config = gData.gameData.getProductMap(this.plantID);
 this.judgeIsMatchOrder();
 if (i) {
 this.isCdOver = !1;
+console.log("=========isCdOver == false");
 this.getNormalReward();
 } else {
 var r = mk.guide.isGuiding(), c = Math.random(), l = gData.adData.getPerByEcpm(s.RateConfig.RC_superDouble);
@@ -17263,13 +17287,14 @@ this.isTouchBtn = !1;
 mk.ui.openPanel("game/prefab/uiPanel/HarvestPanel");
 } else {
 this.isCdOver = !1;
+console.log("=========isCdOver == false");
 this.getNormalReward();
 } else {
 this.isCdOver = !1;
 this.getNormalReward();
 }
 }
-}
+} else console.log("=========isCdOver");
 };
 e.prototype.setAdData = function(e) {
 mk.console.logSingle("HarvestData  addata ", this.adData);
@@ -17302,6 +17327,7 @@ case 3:
 if ((e = c.sent()) && 0 != e.errcode) return [ 2 ];
 if (!(e.data.redMoneyAddition <= 0)) return [ 3, 4 ];
 this.isCdOver = !0;
+console.log("=========isCdOver == true");
 console.log("返回奖励为0");
 return [ 3, 7 ];
 
@@ -17319,6 +17345,7 @@ i.parent = mk.fly.node;
 i.setPosition(o);
 cc.tween(i).delay(.4).call(function() {
 l.isCdOver = !0;
+console.log("=========isCdOver == true");
 l.getType = 0;
 var t = [ {
 rewardType: 1,
@@ -17332,6 +17359,7 @@ return [ 3, 7 ];
 
 case 6:
 this.isCdOver = !0;
+console.log("=========isCdOver == true");
 this.getType = 0;
 r = [ {
 rewardType: 1,
@@ -23625,7 +23653,12 @@ this.awardLabel.string = (t.menuRedBagCoin / 100).toString();
 this.timeLabel.string = t.time;
 i = !1;
 r = 0;
-1 == t.unlock ? (r = gData.gameData.getProductMakeTimesById(t.picture - 1)) >= t.value && (i = !0) : 2 == t.unlock && gData.gameData.playerProp.completeFarmTaskTimes >= t.value && (i = !0);
+if (1 == t.unlock) {
+(r = gData.gameData.getProductMakeTimesById(t.picture - 1)) >= t.value && (i = !0);
+console.log("PlantItem=====>picture===" + t.picture);
+console.log("PlantItem=====>times===" + r);
+console.log("PlantItem=====>value===" + t.value);
+} else 2 == t.unlock && gData.gameData.playerProp.completeFarmTaskTimes >= t.value && (i = !0);
 this.mainNode.active = i;
 this.lockNode.active = !i;
 if (!i) {

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

@@ -10,7 +10,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyTest/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyJsb/baseRemote/"
     ],
-    "buildTime": 1635313181310,
-    "genTime": 1635313181310,
+    "buildTime": 1635321283154,
+    "genTime": 1635321283154,
     "genVersion": null
 }

Някои файлове не бяха показани, защото твърде много файлове са промени