kaka преди 4 години
родител
ревизия
b3808535d7

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
assets/resources/module/login/hot/project.manifest


+ 19 - 8
assets/script/before/view/uiItem/PlantItem.ts

@@ -164,14 +164,6 @@ export default class PlantItem extends cc.Component {
         }
 
         if (flyRed) {
-            if (gData.gameData.funOpenData[4] == "0") {
-                return;
-            }
-            gData.plantData.init_ani = true;
-            let pos = this.nameIcon.node.parent.convertToWorldSpaceAR(this.nameIcon.node.getPosition());
-            gData.gameData.gameStyle.dpFlyRedAni(pos);
-
-
             let orderPlantTimes = gData.gameData.getProp(GameProp.orderPlantTimes);
             if (orderPlantTimes[this.data.id] == undefined) {
                 orderPlantTimes[this.data.id] = 1;
@@ -182,6 +174,25 @@ export default class PlantItem extends cc.Component {
             gData.gameData.setProp(GameProp.orderPlantTimes, orderPlantTimes);
             this.checkOrder();
             mk.data.sendDataEvent('Plant', this.data.name);
+
+            let plantTimes = gData.gameData.getProp(GameProp.plantTimes);
+            if (plantTimes == undefined) {
+                plantTimes = 0;
+            }
+            plantTimes++;
+            gData.gameData.setProp(GameProp.plantTimes, plantTimes);
+
+            if (gData.gameData.showRichBankIconLimit == plantTimes && gData.gameData.funOpenData[13] == "1") {
+                mk.event.emit("showRichBankIcon");
+            }
+
+            //飞红包开关
+            if (gData.gameData.funOpenData[4] == "0") {
+                return;
+            }
+            gData.plantData.init_ani = true;
+            let pos = this.nameIcon.node.parent.convertToWorldSpaceAR(this.nameIcon.node.getPosition());
+            gData.gameData.gameStyle.dpFlyRedAni(pos);
         }
     }
 

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

@@ -2069,6 +2069,9 @@ export enum GameProp {
     //当前订单种植次数
     orderPlantTimes = 23,
 
+    //总种植次数
+    plantTimes = 24,
+
 
     //========消消游戏参数==============
     /** 关卡数 */

+ 17 - 14
assets/script/game/game/FunBtns.ts

@@ -53,22 +53,25 @@ export default class FunBtns extends cc.Component {
                     this.btn16.y = this.btn16.y + 170;
                 }
                 else if (i == 4) {
-                    if(data[i] == "1"){
+                    if (data[i] == "1") {
                         let times = gData.gameData.getProp(GameProp.cashTimes);
-                        if(!times){times = 0;}
-                        if(times < gData.gameData.taskRedBagAutoShowLimit){
+                        if (!times) { times = 0; }
+                        if (times < gData.gameData.taskRedBagAutoShowLimit) {
                             node_btn.active = false;
                             mk.event.register("showTaskRedBagAction", this.doShowTaskRedBagActionLogic.bind(this), this);
                         }
-                    }else{
+                    } else {
                         this.addCount += 1;
-                    }   
+                    }
                 }
                 else if (i == 13 && data[i] == "1") {
-                    let times = gData.gameData.getProp(GameProp.cashTimes);
-                    //let times = gData.gameData.playerProp.orderData.overTimes;
+                    let times = gData.gameData.getProp(GameProp.plantTimes);
                     console.log(`cashTimes======${times}`);
-                    if (!times || times < gData.gameData.showRichBankIconLimit) {
+                    if (times == undefined) {
+                        times = 0;
+                    }
+
+                    if (times < gData.gameData.showRichBankIconLimit) {
                         node_btn.active = false;
                         mk.event.register("showRichBankIcon", this.showRichBankIcon.bind(this), this);
                     }
@@ -92,21 +95,21 @@ export default class FunBtns extends cc.Component {
         this.btn8.active = gData.gameData.playerProp.completeFarmTaskTimes >= parseInt(gData.gameData.configs.ServerConfig.FlyRedMoney);
     }
 
-    doShowTaskRedBagActionLogic(){
-        if(gData.gameData.funOpenData[8] == "1"){
+    doShowTaskRedBagActionLogic() {
+        if (gData.gameData.funOpenData[8] == "1") {
             let posY = this.btn9.y + 130;
-            cc.tween(this.btn9).to(0.2, {y: posY}).call(()=>{
+            cc.tween(this.btn9).to(0.2, { y: posY }).call(() => {
                 this.doAction();
             }).start();
-        }else{
+        } else {
             this.doAction();
         }
     }
 
-    doAction(){
+    doAction() {
         let posX = this.btn5.x;
         this.btn5.x = posX + 430;
-        cc.tween(this.btn5).to(0.4, {x: posX}).call(()=>{
+        cc.tween(this.btn5).to(0.4, { x: posX }).call(() => {
 
         }).start();
     }

+ 15 - 0
assets/script/game/game/Game.ts

@@ -1517,6 +1517,21 @@ export default class Game extends cc.Component {
     /** 点击富翁银行 */
     public async onClickSafeDepositBox() {
         mk.audio.playEffect('button');
+        let plantTimes = gData.gameData.getProp(GameProp.plantTimes);
+        if (plantTimes == undefined) {
+            plantTimes = 0;
+        }
+
+        if (plantTimes < gData.gameData.showRichBankIconLimit) {
+            mk.tip.pop(`种植${gData.gameData.showRichBankIconLimit}次后开启`)
+            return;
+        }
+
+        if (!gData.loginData.isAuth) {
+            mk.ui.openPanel('module/authUI/authUI');
+            return;
+        }
+
         console.log(`currentRichBankCashTaskIndex 22======== ${gData.safeDepositBoxData.currentRichBankCashTaskIndex}`);
         if (gData.safeDepositBoxData.currentRichBankCashTaskIndex) {
             mk.ui.openPanel("module/safeDepositBox/SafeDepositBox");

+ 0 - 6
assets/script/game/module/newNotice/NewNotice.ts

@@ -23,12 +23,6 @@ export default class NewNotice extends cc.Component {
         }
         gData.gameData.setProp(GameProp.cashTimes, ++times);
 
-        times = gData.gameData.getProp(GameProp.cashTimes);
-        console.log(`cashTimes2222======${times}`);
-        if(gData.gameData.showRichBankIconLimit == times && gData.gameData.funOpenData[13] == "1"){
-            mk.event.emit("showRichBankIcon");   
-        }
-
         if(gData.gameData.taskRedBagAutoShowLimit == times && gData.gameData.funOpenData[4] == "1"){
             mk.event.emit("showTaskRedBagAction");
         }

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


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
build/jsb-link/assets/resources/config.json


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
build/jsb-link/assets/resources/native/a8/a81eb395-718d-4f3b-958c-cb871f7dd5fa.manifest


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

@@ -14583,9 +14583,10 @@ a.active = !1;
 mk.event.register("showTaskRedBagAction", this.doShowTaskRedBagActionLogic.bind(this), this);
 }
 } else this.addCount += 1; else if (13 == e && "1" == t[e]) {
-var o = gData.gameData.getProp(s.GameProp.cashTimes);
+var o = gData.gameData.getProp(s.GameProp.plantTimes);
 console.log("cashTimes======" + o);
-if (!o || o < gData.gameData.showRichBankIconLimit) {
+null == o && (o = 0);
+if (o < gData.gameData.showRichBankIconLimit) {
 a.active = !1;
 mk.event.register("showRichBankIcon", this.showRichBankIcon.bind(this), this);
 }
@@ -16539,6 +16540,7 @@ t[t.turnable_leftTimes = 20] = "turnable_leftTimes";
 t[t.cashOutTimes = 21] = "cashOutTimes";
 t[t.finishRichBankTodayTask = 22] = "finishRichBankTodayTask";
 t[t.orderPlantTimes = 23] = "orderPlantTimes";
+t[t.plantTimes = 24] = "plantTimes";
 t[t.levelNum = 10] = "levelNum";
 })(i = a.GameProp || (a.GameProp = {}));
 var u, d, h, f, y, g = function() {
@@ -19121,8 +19123,18 @@ gData.farmSystem._lastSeletFarm && gData.farmSystem._lastSeletFarm.clickGuideBtn
 };
 e.prototype.onClickSafeDepositBox = function() {
 return r(this, void 0, void 0, function() {
+var t;
 return c(this, function() {
 mk.audio.playEffect("button");
+null == (t = gData.gameData.getProp(d.GameProp.plantTimes)) && (t = 0);
+if (t < gData.gameData.showRichBankIconLimit) {
+mk.tip.pop("种植" + gData.gameData.showRichBankIconLimit + "次后开启");
+return [ 2 ];
+}
+if (!gData.loginData.isAuth) {
+mk.ui.openPanel("module/authUI/authUI");
+return [ 2 ];
+}
 console.log("currentRichBankCashTaskIndex 22======== " + gData.safeDepositBoxData.currentRichBankCashTaskIndex);
 if (gData.safeDepositBoxData.currentRichBankCashTaskIndex) {
 mk.ui.openPanel("module/safeDepositBox/SafeDepositBox");
@@ -27009,9 +27021,6 @@ e.prototype.start = function() {
 var t = gData.gameData.getProp(r.GameProp.cashTimes);
 t || (t = 0);
 gData.gameData.setProp(r.GameProp.cashTimes, ++t);
-t = gData.gameData.getProp(r.GameProp.cashTimes);
-console.log("cashTimes2222======" + t);
-gData.gameData.showRichBankIconLimit == t && "1" == gData.gameData.funOpenData[13] && mk.event.emit("showRichBankIcon");
 gData.gameData.taskRedBagAutoShowLimit == t && "1" == gData.gameData.funOpenData[4] && mk.event.emit("showTaskRedBagAction");
 };
 e.prototype.onEnable = function() {
@@ -29086,35 +29095,39 @@ mk.tip.pop("生产次数+5");
 };
 e.prototype.clickMake = function() {
 return r(this, void 0, void 0, function() {
-var t, e, a;
-return c(this, function(o) {
-switch (o.label) {
+var t, e, a, o;
+return c(this, function(n) {
+switch (n.label) {
 case 0:
 mk.audio.playEffect("button");
 mk.guide.next();
 return gData.gameData.isProducting ? [ 2 ] : this.data.tab != l.ProductType.nzw ? [ 3, 2 ] : [ 4, gData.farmSystem.plant(this.data.picture, this.nameIcon.node) ];
 
 case 1:
-t = o.sent();
+t = n.sent();
 return [ 3, 4 ];
 
 case 2:
 return [ 4, gData.factorySystem.make(this.data.picture, this.nameIcon.node) ];
 
 case 3:
-t = o.sent();
-o.label = 4;
+t = n.sent();
+n.label = 4;
 
 case 4:
 if (t) {
-if ("0" == gData.gameData.funOpenData[4]) return [ 2 ];
-gData.plantData.init_ani = !0;
-e = this.nameIcon.node.parent.convertToWorldSpaceAR(this.nameIcon.node.getPosition());
-gData.gameData.gameStyle.dpFlyRedAni(e);
-null == (a = gData.gameData.getProp(l.GameProp.orderPlantTimes))[this.data.id] ? a[this.data.id] = 1 : a[this.data.id]++;
-gData.gameData.setProp(l.GameProp.orderPlantTimes, a);
+null == (e = gData.gameData.getProp(l.GameProp.orderPlantTimes))[this.data.id] ? e[this.data.id] = 1 : e[this.data.id]++;
+gData.gameData.setProp(l.GameProp.orderPlantTimes, e);
 this.checkOrder();
 mk.data.sendDataEvent("Plant", this.data.name);
+null == (a = gData.gameData.getProp(l.GameProp.plantTimes)) && (a = 0);
+a++;
+gData.gameData.setProp(l.GameProp.plantTimes, a);
+gData.gameData.showRichBankIconLimit == a && "1" == gData.gameData.funOpenData[13] && mk.event.emit("showRichBankIcon");
+if ("0" == gData.gameData.funOpenData[4]) return [ 2 ];
+gData.plantData.init_ani = !0;
+o = this.nameIcon.node.parent.convertToWorldSpaceAR(this.nameIcon.node.getPosition());
+gData.gameData.gameStyle.dpFlyRedAni(o);
 }
 return [ 2 ];
 }

+ 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": 1642749610029,
-    "genTime": 1642749610029,
+    "buildTime": 1642753367792,
+    "genTime": 1642753367792,
     "genVersion": null
 }

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
packages-hot-update/manifest/project.manifest


BIN
packages-hot-update/versions/ver_1_0.13.zip


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