|
|
@@ -612,6 +612,8 @@ export class GameData {
|
|
|
|
|
|
this.RawInsectCurArr[0] = sickTimes;
|
|
|
}
|
|
|
+
|
|
|
+ this.setMaxProduct(10003, true);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -769,7 +771,7 @@ export class GameData {
|
|
|
let id = 30001;
|
|
|
let data = null;
|
|
|
for (var i = 0; i < len1; i++) {
|
|
|
- if (this.playerProp.gradeLevel < arr[i].value) {
|
|
|
+ if (this.playerProp.completeFarmTaskTimes < arr[i].value) {
|
|
|
data = { id: id, state: PastureState.Lock, productID: arr[i].picture, growSpan: 0 };
|
|
|
}
|
|
|
else {
|
|
|
@@ -846,7 +848,7 @@ export class GameData {
|
|
|
else {
|
|
|
data = { id: id, state: FactroyState.Empty, productID: 0, growSpan: 0 };
|
|
|
//更新最大可购买商品
|
|
|
- // this.setMaxProduct(arr[0].picture);
|
|
|
+ this.setMaxProduct(arr[0].picture, true);
|
|
|
}
|
|
|
this._factoryData.push(data);
|
|
|
this._factoryDataMap.set(id, data);
|
|
|
@@ -858,11 +860,21 @@ export class GameData {
|
|
|
}
|
|
|
else {
|
|
|
let sickTimes = 0;
|
|
|
+ let id = 30004;
|
|
|
+ let tab = null;
|
|
|
for (var i = 0; i < len; i++) {
|
|
|
+ tab = this.getTabByConfigID(id);
|
|
|
+ let arr = this.getProductArrByType(tab);
|
|
|
this._factoryDataMap.set(this._factoryData[i].id, this._factoryData[i]);
|
|
|
if (this._factoryData[i].state == FactroyState.Sick) {
|
|
|
sickTimes++;
|
|
|
}
|
|
|
+
|
|
|
+ if (this.playerProp.completeFarmTaskTimes < arr[0].value) {
|
|
|
+ //更新最大可购买商品
|
|
|
+ this.setMaxProduct(arr[0].picture, true);
|
|
|
+ }
|
|
|
+ id++;
|
|
|
}
|
|
|
|
|
|
this.RawInsectCurArr[2] = sickTimes;
|
|
|
@@ -993,7 +1005,7 @@ export class GameData {
|
|
|
let needUpdate = false;
|
|
|
switch (tab) {
|
|
|
case ProductType.nzw:
|
|
|
- this.setMaxProduct(10003, true);
|
|
|
+
|
|
|
break;
|
|
|
case ProductType.dw:
|
|
|
let id = 30001;
|