寻宝掉落

This commit is contained in:
liangtongchuan
2020-12-02 00:16:07 +08:00
parent 15cf434d73
commit cdd889f1aa
9 changed files with 116 additions and 13 deletions
@@ -17,6 +17,7 @@ import { RScriptRecordModel } from '../../../db/RScriptRecord';
import { updateWarStar, checkBattleHeroes, roleLevelup } from '../../../services/normalBattleService';
import { checkDungeonNum, checkDungeonAndIncrease } from '../../../services/dungeonService';
import { switchOnFunc } from '../../../services/funcSwitchService';
import { checkComBattleDrop } from '../../../services/comBattleService';
export default function(app: Application) {
return new NormalBattleHandler(app);
@@ -219,6 +220,15 @@ export class NormalBattleHandler {
return checkResult.resResult;
}
dungeonNum = Object.assign(dungeonNum, checkResult.data)
} else if (warInfo.warType == WAR_TYPE.WARLOARDS) {
let checkResult = await checkComBattleDrop(roleId, battleCode);
if (checkResult.status === -1) {
return checkResult.resResult;
}
// 寻宝会根据是否队长重新计算掉落
if (checkResult.fixReward) {
warReward.resetFixReward(checkResult.fixReward);
}
}
if(isSuccess) { // 挑战胜利