|
|
@@ -2490,12 +2490,16 @@ this.adMap.set(i.turntable, gData.turnable);
|
|
|
this.adMap.set(i.sign, gData.sign);
|
|
|
this.adMap.set(i.bigCash, gData.blessingBag);
|
|
|
this.adMap.set(i.cashOutAddCash, gData.walletCashOutData);
|
|
|
+this.adMap.set(i.harvest, gData.harvestData);
|
|
|
+this.adMap.set(i.farmMap, gData.farmMapData);
|
|
|
};
|
|
|
t.prototype.checkAdMax = function() {
|
|
|
this.watchNumToday++;
|
|
|
var t = parseInt(gData.gameData.configs.ServerConfig.VideoTimesMax);
|
|
|
+mk.console.logSingle("checkAdMax watchNumToday ", this.watchNumToday);
|
|
|
+mk.console.logSingle("checkAdMax max ", t);
|
|
|
if (this.watchNumToday > t) {
|
|
|
-mk.tip.pop("今日看广告获得奖励的次数已用完", 1);
|
|
|
+mk.tip.pop("今日看广告获得奖励的次数已用完");
|
|
|
mk.ui.closeAllUI();
|
|
|
return !0;
|
|
|
}
|
|
|
@@ -2621,8 +2625,11 @@ this.ABCInsertAdArr = gData.gameData.configs.ServerConfig.ABInsertAd.split(",");
|
|
|
this.FullCsahAdArr = gData.gameData.configs.ServerConfig.FullCsahAd.split(",");
|
|
|
};
|
|
|
t.prototype.setEcpmLevel = function() {
|
|
|
-this.ecpmLevel = 1;
|
|
|
-this.AutoRedMoneyMap.set(1, 20);
|
|
|
+for (var t = gData.gameData.configs.ForceAd, e = t.length, o = -1, n = 0; n < e; n++) if (gData.gameData.adShowConfig.average_ecpm <= parseInt(t[n].ecpmMax)) {
|
|
|
+-1 == o && (o = parseInt(t[n].value));
|
|
|
+this.AutoRedMoneyMap.set(parseInt(t[n].value), parseInt(t[n].AutoRedMoney));
|
|
|
+}
|
|
|
+this.ecpmLevel = o;
|
|
|
};
|
|
|
t.prototype.checkShowFullInter = function(t, e) {
|
|
|
void 0 === e && (e = null);
|
|
|
@@ -2701,7 +2708,11 @@ mk.ui.openPanel("module/newOpenRedBag/newOpenRedBag");
|
|
|
}
|
|
|
};
|
|
|
t.prototype.getPerByEcpm = function() {
|
|
|
-return .26;
|
|
|
+for (var t = gData.gameData.configs.ForceAd, e = t.length, o = 0, n = 0; n < e; n++) if (gData.gameData.adShowConfig.average_ecpm <= parseInt(t[n].ecpmMax)) {
|
|
|
+o = parseFloat(t[n].percent);
|
|
|
+break;
|
|
|
+}
|
|
|
+return o;
|
|
|
};
|
|
|
return t;
|
|
|
}();
|
|
|
@@ -2713,7 +2724,6 @@ t[t.settlement = 3] = "settlement";
|
|
|
t[t.turntable = 4] = "turntable";
|
|
|
t[t.sign = 5] = "sign";
|
|
|
t[t.bigCash = 6] = "bigCash";
|
|
|
-t[t.cashOutNoviceWelfare = 7] = "cashOutNoviceWelfare";
|
|
|
t[t.cashOutAddCash = 8] = "cashOutAddCash";
|
|
|
t[t.harvest = 9] = "harvest";
|
|
|
t[t.farmMap = 10] = "farmMap";
|
|
|
@@ -6753,7 +6763,6 @@ t++;
|
|
|
return [ 3, 1 ];
|
|
|
|
|
|
case 5:
|
|
|
-gData.gameData.setProductMapFromJson();
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
});
|
|
|
@@ -8823,6 +8832,7 @@ this.countDown.node.active = !0;
|
|
|
this.process.node.active = !0;
|
|
|
this.countDown.setState(1);
|
|
|
this.process.setData(this.data);
|
|
|
+this.plantID = this.data.productID;
|
|
|
return [ 4, mk.loader.load("game/prefab/ProductShow1", cc.Prefab) ];
|
|
|
|
|
|
case 6:
|
|
|
@@ -11501,7 +11511,8 @@ this.init_makeInfo = !1;
|
|
|
this.isProducting = !1;
|
|
|
this.init_task = !1;
|
|
|
this.init_expLevel = !1;
|
|
|
-this.init_redBagTask = !0;
|
|
|
+this.init_redBagTask = !1;
|
|
|
+this.init_productTask = !1;
|
|
|
this._farmMapRewardData = [];
|
|
|
this._farmData = [];
|
|
|
this._farmDataMap = new Map();
|
|
|
@@ -11566,6 +11577,7 @@ return [ 2 ];
|
|
|
t.prototype.initConfigs = function(t) {
|
|
|
this.configs = t;
|
|
|
this.funOpenData = this.configs.ServerConfig.Functionswitch.split(",");
|
|
|
+this.setProductMapFromJson();
|
|
|
};
|
|
|
t.prototype.initPlayerProp = function(t) {
|
|
|
this.gameData = new d();
|
|
|
@@ -11880,7 +11892,7 @@ this.setProp(i.farmData, this._farmData);
|
|
|
} else for (n = 0; n < t; n++) this._farmDataMap.set(this._farmData[n].id, this._farmData[n]);
|
|
|
};
|
|
|
t.prototype.setProductMapFromJson = function() {
|
|
|
-for (var t = gData.configData.configMap.get("product"), e = t.length, o = null, n = "", a = [], i = 0; i < e; i++) {
|
|
|
+for (var t = this.configs.Product, e = t.length, o = null, n = "", a = [], i = 0; i < e; i++) {
|
|
|
o = t[i];
|
|
|
this._productMap.set(o.picture, o);
|
|
|
if (n != o.tab) {
|
|
|
@@ -12843,14 +12855,9 @@ scale: 1
|
|
|
}).start();
|
|
|
if (gData.gameData.gameData.userFarmTaskInfo) {
|
|
|
var t = gData.gameData.gameData.userFarmTaskInfo.completeCount, e = gData.gameData.gameData.userFarmTaskInfo.taskCount;
|
|
|
-if (gData.gameData.init_redBagTask) {
|
|
|
-this.lbl_task.string = "<b><color=#8D4D32>点击领取任务!</c></b>";
|
|
|
-this.node_hand.active = !0;
|
|
|
-} else {
|
|
|
this.lbl_task.string = "<b><color=#8D4D32>进行" + e + "次生产</c><color=#7EB80E>(" + t + "/" + e + ")</color></b>";
|
|
|
this.node_hand.active = t >= e;
|
|
|
}
|
|
|
-}
|
|
|
gData.gameData.init_task = !1;
|
|
|
};
|
|
|
e.prototype.initFarmExpUI = function() {
|
|
|
@@ -14685,6 +14692,7 @@ this.config = gData.gameData.getProductMap(this.plantID);
|
|
|
mk.ui.openPanel("game/prefab/uiPanel/HarvestPanel");
|
|
|
};
|
|
|
e.prototype.setAdData = function(e) {
|
|
|
+mk.console.logSingle("HarvestData addata ", this.adData);
|
|
|
t.prototype.setAdData.call(this, e);
|
|
|
this.init_reward = !0;
|
|
|
};
|
|
|
@@ -14840,18 +14848,30 @@ return null !== t && t.apply(this, arguments) || this;
|
|
|
}
|
|
|
e.prototype.clickNormalBtn = function() {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
-var t;
|
|
|
-return c(this, function() {
|
|
|
+var t, e, o;
|
|
|
+return c(this, function(n) {
|
|
|
+switch (n.label) {
|
|
|
+case 0:
|
|
|
mk.ui.closePanel("HarvestPanel");
|
|
|
gData.adData.checkShowFullInter(1, l.InterFullAdType.interstitial2_init_2);
|
|
|
-t = [ {
|
|
|
+t = {
|
|
|
+id: gData.harvestData.config.id
|
|
|
+};
|
|
|
+return [ 4, mk.http.sendData("redMoney/addRedMoneyByFarm", t) ];
|
|
|
+
|
|
|
+case 1:
|
|
|
+if ((e = n.sent()) && 0 != e.errcode) return [ 2 ];
|
|
|
+if (e.data.redMoneyAddition <= 0) console.log("返回奖励为0"); else {
|
|
|
+o = [ {
|
|
|
rewardType: 1,
|
|
|
-rewardNum: 20
|
|
|
+rewardNum: e.data.redMoneyAddition
|
|
|
} ];
|
|
|
-gData.reward.data = t;
|
|
|
+gData.reward.data = o;
|
|
|
gData.reward.callback = gData.harvestData.call;
|
|
|
mk.ui.openPanel("module/reward/reward");
|
|
|
+}
|
|
|
return [ 2 ];
|
|
|
+}
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
@@ -16101,7 +16121,7 @@ e.lbl_tip = null;
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.start = function() {
|
|
|
-this.lbl_tip.string = gData.lineUpUIData.personCount.toString();
|
|
|
+this.lbl_tip.string = "提现排队中,你前面还有" + gData.lineUpUIData.personCount + "人";
|
|
|
};
|
|
|
e.prototype.clickVideoBtn = function() {
|
|
|
mk.audio.playEffect("button");
|
|
|
@@ -16877,6 +16897,7 @@ this.setProgress(0);
|
|
|
e.prototype.start = function() {
|
|
|
if (1 != mk.storage.getStorage("alifengkong")) {
|
|
|
mk.aliRiskManager.init();
|
|
|
+mk.loader.preload("game/coregame/coregame", cc.Prefab);
|
|
|
this.init();
|
|
|
}
|
|
|
};
|
|
|
@@ -17055,7 +17076,6 @@ return [ 4, gData.configData.loadConfig() ];
|
|
|
|
|
|
case 1:
|
|
|
t.sent();
|
|
|
-mk.loader.preload("game/coregame/coregame", cc.Prefab);
|
|
|
gData.adData.init();
|
|
|
mk.console.log("[FC] gData.appData.appId", gData.appData.appId);
|
|
|
gData.loginData.login();
|
|
|
@@ -19068,6 +19088,8 @@ mk.tip.pop("复制成功");
|
|
|
e.prototype.clickCloseBtn = function() {
|
|
|
mk.audio.playEffect("closeButton");
|
|
|
mk.audio.setResumeMusic();
|
|
|
+gData.gameData.init_redBagTask = !0;
|
|
|
+gData.gameData.init_productTask = !0;
|
|
|
};
|
|
|
e.prototype.onDestroy = function() {};
|
|
|
i([ l({
|
|
|
@@ -19130,7 +19152,10 @@ console.log("newNotices=>" + gData.receiptNotice.receip_rmb);
|
|
|
this.lbl_reward_value.string = (gData.receiptNotice.receip_rmb / 100).toFixed(2);
|
|
|
this.lbl_time.string = mk.time.getNowDayStringExtend();
|
|
|
};
|
|
|
-e.prototype.clickCloseBtn = function() {};
|
|
|
+e.prototype.clickCloseBtn = function() {
|
|
|
+mk.audio.playEffect("closeButton");
|
|
|
+gData.gameData.init_redBagTask = !0;
|
|
|
+};
|
|
|
i([ s({
|
|
|
displayName: "提现金额",
|
|
|
type: cc.Label
|
|
|
@@ -20707,7 +20732,7 @@ return [ 4, mk.loader.load(o + t.picture, cc.SpriteFrame) ];
|
|
|
|
|
|
case 2:
|
|
|
a.spriteFrame = c.sent();
|
|
|
-this.awardLabel.string = t.MenuredBagCoin;
|
|
|
+this.awardLabel.string = t.menuRedBagCoin.toString();
|
|
|
this.timeLabel.string = t.time;
|
|
|
i = !1;
|
|
|
r = 0;
|
|
|
@@ -20729,7 +20754,7 @@ return [ 2 ];
|
|
|
});
|
|
|
};
|
|
|
e.prototype.clickMake = function() {
|
|
|
-if (gData.gameData.leftTimes <= 0) mk.ui.openPanel("module/speedUpUI/productReward"); else if (this.data.tab == l.ProductType.nzw) {
|
|
|
+if (gData.gameData.leftTimes <= 0) mk.ui.openPanel("module/speedUpUI/productReward"); else if (gData.gameData.isProducting) mk.tip.pop("点击太快了"); else if (this.data.tab == l.ProductType.nzw) {
|
|
|
gData.farmSystem.plant(this.data.picture);
|
|
|
gData.gameData.nextMake = null;
|
|
|
gData.farmSystem.selectNextFarm(!1);
|
|
|
@@ -21293,6 +21318,11 @@ a(e, t);
|
|
|
function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
e.lbl_times = null;
|
|
|
+e.lbl_taskTimes = null;
|
|
|
+e.lbl_progress = null;
|
|
|
+e.sp_taskProgress = null;
|
|
|
+e.node_complete = null;
|
|
|
+e.node_Uncomplete = null;
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.onEnable = function() {
|
|
|
@@ -21300,6 +21330,38 @@ this.scheduleOnce(function() {
|
|
|
mk.guide.open(4);
|
|
|
}, .5);
|
|
|
this.lbl_times.string = "生产次数x" + gData.gameData.configs.ServerConfig.ProductionAd;
|
|
|
+gData.gameData.init_productTask = !1;
|
|
|
+if (gData.gameData.gameData.userFarmTaskInfo) {
|
|
|
+var t = gData.gameData.gameData.userFarmTaskInfo.completeCount, e = gData.gameData.gameData.userFarmTaskInfo.taskCount;
|
|
|
+if (e > t) {
|
|
|
+this.lbl_taskTimes.string = (e - t).toString();
|
|
|
+this.node_Uncomplete.active = !0;
|
|
|
+this.node_complete.active = !1;
|
|
|
+} else {
|
|
|
+this.node_Uncomplete.active = !1;
|
|
|
+this.node_complete.active = !0;
|
|
|
+}
|
|
|
+this.lbl_progress.string = (t / e).toString();
|
|
|
+this.sp_taskProgress.fillRange = t / e;
|
|
|
+}
|
|
|
+};
|
|
|
+e.prototype.update = function() {
|
|
|
+if (gData.gameData.init_productTask) {
|
|
|
+if (gData.gameData.gameData.userFarmTaskInfo) {
|
|
|
+var t = gData.gameData.gameData.userFarmTaskInfo.completeCount, e = gData.gameData.gameData.userFarmTaskInfo.taskCount;
|
|
|
+if (e > t) {
|
|
|
+this.lbl_taskTimes.string = (e - t).toString();
|
|
|
+this.node_Uncomplete.active = !0;
|
|
|
+this.node_complete.active = !1;
|
|
|
+} else {
|
|
|
+this.node_Uncomplete.active = !1;
|
|
|
+this.node_complete.active = !0;
|
|
|
+}
|
|
|
+this.lbl_progress.string = (t / e).toString();
|
|
|
+this.sp_taskProgress.fillRange = t / e;
|
|
|
+}
|
|
|
+gData.gameData.init_productTask = !1;
|
|
|
+}
|
|
|
};
|
|
|
e.prototype.clickVideoBtn = function() {
|
|
|
var t = this;
|
|
|
@@ -21330,6 +21392,26 @@ i([ l({
|
|
|
type: cc.Label,
|
|
|
displayName: "文本"
|
|
|
}) ], e.prototype, "lbl_times", void 0);
|
|
|
+i([ l({
|
|
|
+type: cc.Label,
|
|
|
+displayName: "任务次数"
|
|
|
+}) ], e.prototype, "lbl_taskTimes", void 0);
|
|
|
+i([ l({
|
|
|
+type: cc.Label,
|
|
|
+displayName: "进度文本"
|
|
|
+}) ], e.prototype, "lbl_progress", void 0);
|
|
|
+i([ l({
|
|
|
+type: cc.Sprite,
|
|
|
+displayName: "进度条"
|
|
|
+}) ], e.prototype, "sp_taskProgress", void 0);
|
|
|
+i([ l({
|
|
|
+type: cc.Node,
|
|
|
+displayName: "完成节点"
|
|
|
+}) ], e.prototype, "node_complete", void 0);
|
|
|
+i([ l({
|
|
|
+type: cc.Node,
|
|
|
+displayName: "未完成节点"
|
|
|
+}) ], e.prototype, "node_Uncomplete", void 0);
|
|
|
return i([ s ], e);
|
|
|
}(cc.Component);
|
|
|
o.default = p;
|
|
|
@@ -22743,7 +22825,7 @@ e.lbl_Ani = null;
|
|
|
e.lbl_taskNum = null;
|
|
|
e.lbl_taskDes = null;
|
|
|
e.node_videoIcon = null;
|
|
|
-e.isShowNewTask = !0;
|
|
|
+e.isShowNewTask = !1;
|
|
|
e.num = 0;
|
|
|
e.delayTime = 0;
|
|
|
e.times = 0;
|
|
|
@@ -22754,8 +22836,8 @@ return e;
|
|
|
e.prototype.start = function() {
|
|
|
mk.console.logSingle("redBagTask=>", gData.gameData.gameData.userFarmTaskInfo);
|
|
|
if (gData.gameData.gameData.userFarmTaskInfo) {
|
|
|
+gData.gameData.init_redBagTask = !1;
|
|
|
this.maxNum = gData.gameData.gameData.userFarmTaskInfo.taskCount;
|
|
|
-this.isShowNewTask = gData.gameData.init_redBagTask;
|
|
|
if (this.isShowNewTask) this.showNewTaskUI(); else {
|
|
|
this.initTaskProgressUI();
|
|
|
this.showChangePart();
|
|
|
@@ -22768,9 +22850,7 @@ this.node_value.active = !1;
|
|
|
this.node_task.active = !1;
|
|
|
this.openBtn_ani.node.active = !1;
|
|
|
this.lbl_Ani.node.active = !0;
|
|
|
-gData.gameData.init_redBagTask = !1;
|
|
|
gData.gameData.init_task = !0;
|
|
|
-gData.gameData.setProp(p.GameProp.redBagTaskRefresh, gData.gameData.init_redBagTask);
|
|
|
};
|
|
|
e.prototype.onEnable = function() {
|
|
|
mk.ad.showBanner(p.BannerAdType.banner_click_2);
|
|
|
@@ -22831,6 +22911,11 @@ e.showChangePart();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+if (gData.gameData.init_redBagTask) {
|
|
|
+gData.gameData.init_redBagTask = !1;
|
|
|
+this.showNewTaskUI();
|
|
|
+this.isShowNewTask = !0;
|
|
|
+}
|
|
|
};
|
|
|
e.prototype.initTaskProgressUI = function() {
|
|
|
var t = this;
|
|
|
@@ -22897,13 +22982,11 @@ e = o.sent();
|
|
|
mk.console.logSingle("redBagTask=>", e);
|
|
|
if (0 != e.errcode) return [ 2, null ];
|
|
|
gData.gameData.gameData.userFarmTaskInfo = e.data.userFarmTaskInfo;
|
|
|
-gData.gameData.init_redBagTask = !0;
|
|
|
+gData.gameData.init_task = !0;
|
|
|
this.maxNum = gData.gameData.gameData.userFarmTaskInfo.taskCount;
|
|
|
this.num = 0;
|
|
|
this.delayTime = 0;
|
|
|
this.times = 0;
|
|
|
-this.showNewTaskUI();
|
|
|
-this.isShowNewTask = !0;
|
|
|
gData.receiptNotice.receip_rmb = e.data.cashMoney;
|
|
|
mk.ui.openPanel("module/newNotice/newNotice");
|
|
|
mk.data.sendDataEvent(p.DataEventId.Sundry, "任务红包提现成功");
|
|
|
@@ -29290,7 +29373,7 @@ mk.console.logSingle("wallet2=>", o);
|
|
|
if (0 != o.errcode) {
|
|
|
if (o.data.count > 0) {
|
|
|
gData.lineUpUIData.personCount = o.data.count;
|
|
|
-mk.ui.openPanel("module/newNotice/LineUpUI");
|
|
|
+mk.ui.openPanel("module/newNotice/lineUpUI");
|
|
|
}
|
|
|
return [ 2 ];
|
|
|
}
|