事件本检查时间刷新并推送

This commit is contained in:
luying
2020-10-09 20:26:53 +08:00
parent 50c4aeea2a
commit 2a62b31797
17 changed files with 470 additions and 35 deletions

View File

@@ -71,14 +71,14 @@ export class WarReward {
private handleFixReward(num: number) {
if(this.isSuccess) { // 成功了才给固定奖励
let {fixReward} = this.warInfo;
let {fixReward = ''} = this.warInfo;
let reward = decodeStr('fixReward', fixReward);
for(let obj of reward) this.rewards.push({type: BATTLE_REWARD_TYPE.FIX_REWARD, ...obj, count: obj.count * num});
}
}
private handleConditionReward(num: number) {
if(this.isSuccess) {
let {conditionReward} = this.warInfo;
let {conditionReward = ''} = this.warInfo;
let reward = decodeStr('conditionReward', conditionReward);
for(let obj of reward) {
if(this.condition.get(obj.condition)) {
@@ -90,7 +90,8 @@ export class WarReward {
private async handleRandomReward(num: number) {
if(this.isSuccess) {
let {randomReward} = this.warInfo;
let {RandomReward:randomReward = ''} = this.warInfo;
let reward = decodeStr('randomReward', randomReward);
for(let obj of reward) {
let { gid, frequency } = obj;