镇念塔:检查武将需要根据皮肤变化
This commit is contained in:
@@ -69,7 +69,7 @@ export class NormalBattleHandler {
|
||||
if (preBattle == -1) return resResult(STATUS.BATTLE_NEED_PREVIOUS_GK);
|
||||
}
|
||||
|
||||
let { isOK, hids, lineup } = await checkBattleHeroes(roleId, seqIds);
|
||||
let { isOK, hids, heroes, lineup } = await checkBattleHeroes(roleId, seqIds);
|
||||
if (!isOK) return resResult(STATUS.BATTLE_HERO_NOT_FOUND);
|
||||
|
||||
const battleCode = genCode(8); // 关卡唯一值
|
||||
@@ -83,7 +83,7 @@ export class NormalBattleHandler {
|
||||
}
|
||||
dailyNum = Object.assign(dailyNum, checkResult.data);
|
||||
} else if (warInfo.warType == WAR_TYPE.TOWER) {
|
||||
let checkResult = await checkTowerWar(roleId, battleId, seqIds, hids);
|
||||
let checkResult = await checkTowerWar(roleId, battleId, seqIds, heroes);
|
||||
if (checkResult.status == -1) {
|
||||
return checkResult.resResult
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ export class TowerBattleHandler {
|
||||
let { warStatus, heroes: recHeroes } = await getTowerRecByLv(roleId, role.towerLv);
|
||||
|
||||
// 检查战力是否足够
|
||||
let heroes = await HeroModel.findByRole(roleId, [{ field: 'ce', sortBy: -1 }], 'hid ce', true);
|
||||
let heroes = await HeroModel.findByRole(roleId, [{ field: 'ce', sortBy: -1 }], 'hid ce job', true);
|
||||
let recommendCeSum = 0, heroesCeSum = 0;
|
||||
let newWarStar: WarStar[] = [];
|
||||
for(let { warId, status } of warStatus) {
|
||||
@@ -318,7 +318,7 @@ export class TowerBattleHandler {
|
||||
recommendCeSum += dicWar.recommendedPower;
|
||||
let heroNum = 0;
|
||||
for(let hero of heroes) {
|
||||
if(recHeroes.indexOf(hero.hid) == -1 && !checkForbiddenChar(hero.hid, dicWar.fobiddenCharactor)) {
|
||||
if(recHeroes.indexOf(hero.hid) == -1 && !checkForbiddenChar(hero.hid, hero.job, dicWar.fobiddenCharactor)) {
|
||||
heroNum++;
|
||||
recHeroes.push(hero.hid);
|
||||
heroesCeSum += hero.ce;
|
||||
|
||||
Reference in New Issue
Block a user