秘境本挑战次数
This commit is contained in:
@@ -41,29 +41,35 @@ export class WarReward {
|
||||
}
|
||||
|
||||
public setFixReward(reward: string) {
|
||||
let last = this.fixReward.substr(this.fixReward.length - 1, 1);
|
||||
if(this.fixReward.length && last == '&') {
|
||||
let str = this.fixReward;
|
||||
let last = str.substr(str.length-1, 1);
|
||||
if(last == '&') str = str.substr(0, str.length - 1);
|
||||
if(str.length) {
|
||||
this.fixReward += reward;
|
||||
} else {
|
||||
this.fixReward += '&' + reward;
|
||||
this.fixReward += '|' + reward;
|
||||
}
|
||||
}
|
||||
|
||||
public setConditionReward(reward: string) {
|
||||
let last = this.conditionReward.substr(this.fixReward.length - 1, 1);
|
||||
if(last == '&') {
|
||||
let str = this.conditionReward;
|
||||
let last = str.substr(str.length-1, 1);
|
||||
if(last == '&') str = str.substr(0, str.length - 1);
|
||||
if(str.length) {
|
||||
this.conditionReward += reward;
|
||||
} else {
|
||||
this.conditionReward += '&' + reward;
|
||||
this.conditionReward += '|' + reward;
|
||||
}
|
||||
}
|
||||
|
||||
public setRandomReward(reward: string) {
|
||||
let last = this.randomReward.substr(this.fixReward.length - 1, 1);
|
||||
if(last == '&') {
|
||||
let str = this.randomReward;
|
||||
let last = str.substr(str.length-1, 1);
|
||||
if(last == '&') str = str.substr(0, str.length - 1);
|
||||
if(str.length) {
|
||||
this.randomReward += reward;
|
||||
} else {
|
||||
this.randomReward += '&' + reward;
|
||||
this.randomReward += '|' + reward;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user