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

@@ -29,6 +29,7 @@ import { HeroModel } from '../../../db/Hero';
import { addUserToTeamChannel, delTeamChannel, removeFromTeamChannel, sendMessageToTeam, sendMessageToUsersWithSuc, sendMessageToUserWithSuc } from '../../../services/pushService';
import { getFriendRelationType, getRecommendType } from '../../../services/friendService';
import { FriendRelationModel } from '../../../db/FriendRelation';
import { isHeroHidden } from '../../../services/dataService';
export default function(app: Application) {
return new ComBattleHandler(app);
@@ -301,6 +302,7 @@ export class ComBattleHandler {
let roleId = session.get('roleId');
let { teamCode, heroes: hids, battleCode = 'default' } = msg;
if (!hids || hids.length === 0) return resResult(STATUS.COM_BATTLE_HEROES_ERR);
if(isHeroHidden(...hids)) return resResult(STATUS.HERO_IS_HIDDEN);
let teamStatus = this.teamMap.get(teamCode);
if (!teamStatus || !teamStatus.roleIds || teamStatus.roleIds.indexOf(roleId) === -1) return resResult(STATUS.COM_BATTLE_TEAM_INVALID);