feat(兼容): 配表使用后台隐藏物品

This commit is contained in:
luying
2022-11-09 18:01:02 +08:00
parent 5d0873630a
commit 53d4af4e09
54 changed files with 768 additions and 102 deletions

View File

@@ -26,6 +26,7 @@ import { PvpSaveDataModel } from '../../../db/PvpSaveData';
import { PVPConfigModel } from '../../../db/PvpConfig';
import { getAllServerName, getServerName } from '../../../services/redisService';
import { RoleRankInfo } from '../../../domain/rank';
import { isHeroHidden } from '../../../services/dataService';
export default function (app: Application) {
new HandlerService(app, {});
@@ -363,6 +364,7 @@ export class PvpHandler {
// 更新挑战阵容
let scores: number[] = [];
for(let { actorId } of heroes) {
if(isHeroHidden(actorId)) return resResult(STATUS.HERO_IS_HIDDEN);
let heroScore = pvpDefense.heroScores.find(cur => cur.hid == actorId);
if(heroScore) {
scores.push(heroScore.score);
@@ -431,6 +433,8 @@ export class PvpHandler {
// 更新防守阵容
let scores: number[] = [], heroIdMap = new Map<number, string>(), hids: number[] = [];
for(let { actorId } of heroes) {
if(isHeroHidden(actorId)) return resResult(STATUS.HERO_IS_HIDDEN);
let heroScore = pvpDefense.heroScores.find(cur => cur.hid == actorId);
if(heroScore) {
scores.push(heroScore.score);