feat(共鸣系统): 新增

This commit is contained in:
zhangxk
2023-10-09 15:11:54 +08:00
parent cd87b9e74c
commit 53a0b0f340
18 changed files with 1195 additions and 14 deletions

View File

@@ -61,6 +61,7 @@ import { getVestigeRecStatus } from './gvg/gvgFightService';
import { getRemoteRplPrefix } from '../pubUtils/battleUtils';
import { calculateCeWithRole } from './playerCeService';
import { SchoolModel } from '../db/School';
import { getResonanceDataMap } from './role/resonanceService';
/**
* init: 初始的时候是否推送 true-推 false-不推
@@ -140,8 +141,17 @@ export async function getModuleData(type: string, data: { role: RoleType, sessio
let artifacts = await ArtifactModel.findbyRole(role.roleId, ARTIFACT_SELECT.ENTRY);
let activityItems = await ActivityItemModel.findbyRole(role.roleId, ACTIVITYITEM_SELECT.ENTRY);
let link = await LinkModel.findByType(SNS_LINK_TYPE.CUSTOMER);
await reCalJewel(role, heros, jewels, skins, artifacts);
let { dbResonanceMap } = await getResonanceDataMap(role.roleId);
role['heros'] = heros.map(hero => new HeroParam(hero));
for(let hero of role['heros']){
if(dbResonanceMap.has(hero.hid)){
hero.isResonance = true;
}
}
role['jewels'] = jewels;
role['consumeGoods'] = items;
role['skins'] = skins;