✨ feat(兼容): 配表使用后台隐藏物品
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user