浏览代码

生虫概率读配置

kaka 4 年之前
父节点
当前提交
90d50b1e9c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      assets/script/before/main/FarmCountDown.ts

+ 1 - 1
assets/script/before/main/FarmCountDown.ts

@@ -104,7 +104,7 @@ export class FarmCountDown extends cc.Component {
         this.counting = false;
         this.normalGroup.active = false;
         let sick = false;
-        if (gData.gameData.playerProp.completeFarmTaskTimes >= 1 && Math.random() < 0.2) {
+        if (gData.gameData.playerProp.completeFarmTaskTimes >= 1 && Math.random() < parseFloat(gData.gameData.configs.ServerConfig.StopProduction)) {
             if (this.productConfig.tab == ProductType.nzw) {
                 if (gData.gameData.RawInsectCurArr[0] < parseInt(gData.gameData.RawInsectArr[0])) {
                     sick = true;