fix 修复远征当前血量和最大血量无法匹配bug
This commit is contained in:
@@ -45,9 +45,9 @@ export class WarReward {
|
||||
let last = str.substr(str.length-1, 1);
|
||||
if(last == '&') str = str.substr(0, str.length - 1);
|
||||
if(str.length) {
|
||||
this.fixReward += '|' + reward;
|
||||
this.fixReward = str + '|' + reward;
|
||||
} else {
|
||||
this.fixReward += reward;
|
||||
this.fixReward = str + reward;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,9 +56,9 @@ export class WarReward {
|
||||
let last = str.substr(str.length-1, 1);
|
||||
if(last == '&') str = str.substr(0, str.length - 1);
|
||||
if(str.length) {
|
||||
this.conditionReward += reward;
|
||||
this.conditionReward = str + '|' + reward;
|
||||
} else {
|
||||
this.conditionReward += '|' + reward;
|
||||
this.conditionReward = str + reward;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,9 +67,9 @@ export class WarReward {
|
||||
let last = str.substr(str.length-1, 1);
|
||||
if(last == '&') str = str.substr(0, str.length - 1);
|
||||
if(str.length) {
|
||||
this.randomReward += reward;
|
||||
this.randomReward = str + '|' + reward;
|
||||
} else {
|
||||
this.randomReward += '|' + reward;
|
||||
this.randomReward = str + reward;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ export class WarReward {
|
||||
// let warType = this.warInfo.warType;
|
||||
|
||||
if(this.isSuccess) { // 成功了才给固定奖励
|
||||
console.log(this.fixReward)
|
||||
if(this.fixReward) this.handleFixReward(num, this.fixReward);
|
||||
if(this.conditionReward) this.handleConditionReward(num, this.conditionReward);
|
||||
if(this.randomReward) await this.handleRandomReward(num, this.randomReward);
|
||||
|
||||
Reference in New Issue
Block a user