寻宝:调整黑名单检查代码
This commit is contained in:
@@ -17,10 +17,9 @@ import { ItemModel } from '../../../db/Item';
|
||||
import { handleFixedReward, addItems, handleCost } from '../../../services/rewardService';
|
||||
import { checkRoleInQueue, getTeamSearchByQuality, rmRoleFromQueue, setTeamSearchReq } from '../../../services/redisService';
|
||||
import { transBossHpArr } from '../../../services/battleService';
|
||||
import { getRandBlueprtId, getRandComBtlRobots, clearComBtlTimer, getRealReward, getAssistTimesByQuality, getFrd, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer, setDismissTimer, dismissTeam, incEquipPrintDrop, randEquipPrintId, handleComBtlProgress, getComBattleFriendAdd, getValidTeammateRoleSt } from '../../../services/comBattleService';
|
||||
import { getRandBlueprtId, getRandComBtlRobots, clearComBtlTimer, getAssistTimesByQuality, getFrd, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer, setDismissTimer, dismissTeam, incEquipPrintDrop, randEquipPrintId, handleComBtlProgress, getComBattleFriendAdd, getValidTeammateRoleSt, teammateInBlackList } from '../../../services/comBattleService';
|
||||
import { setAp } from '../../../services/actionPointService';
|
||||
import { roleLevelup } from '../../../services/normalBattleService';
|
||||
import { FriendRelationModel } from '../../../db/FriendRelation';
|
||||
|
||||
export default function(app: Application) {
|
||||
return new ComBattleHandler(app);
|
||||
@@ -217,15 +216,10 @@ export class ComBattleHandler {
|
||||
let team: ComBattleTeamType;
|
||||
for(let curTeam of teams) {
|
||||
let { roleIds } = curTeam;
|
||||
|
||||
// 黑名单屏蔽
|
||||
let hasBlackList = false;
|
||||
for(let hisRoleId of roleIds) {
|
||||
let isInBlackList = await FriendRelationModel.isInBlackList(roleId, hisRoleId);
|
||||
if(isInBlackList) { hasBlackList = true; break; }
|
||||
}
|
||||
if(!hasBlackList) {
|
||||
team = curTeam; break;
|
||||
const inBlackList = await teammateInBlackList(roleId, roleIds);
|
||||
if(!inBlackList) {
|
||||
team = curTeam;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,12 +320,6 @@ export class ComBattleHandler {
|
||||
isFrd = await getFrd(roleId, quality);
|
||||
}
|
||||
|
||||
// 一般不会匹配到,手动邀请的可以加入
|
||||
// for(let hisRoleId of teamStatus.roleIds) {
|
||||
// let isInBlackList = await FriendRelationModel.isInBlackList(roleId, hisRoleId);
|
||||
// if(isInBlackList) return resResult(STATUS.COM_BATTLE_BLACKLIST);
|
||||
// }
|
||||
|
||||
// 加入队伍
|
||||
let roleStatus = new RoleStatus(roleId, roleName, false, isFrd, headHid, sHid, topFiveCe, lv);
|
||||
const team = await ComBattleTeamModel.addRole(teamCode, roleStatus);
|
||||
|
||||
Reference in New Issue
Block a user