✨ feat(gvg): 组建期
This commit is contained in:
@@ -20,6 +20,7 @@ import { sendMessageToUserWithSuc } from './pushService';
|
||||
import { SkinType } from '../db/Skin';
|
||||
import { LadderMatchModel } from '../db/LadderMatch';
|
||||
import { ArtifactModelType } from '../db/Artifact';
|
||||
import { GVGLeagueModel } from '../db/GVGLeague';
|
||||
|
||||
interface Param {
|
||||
isInitRole?: boolean,
|
||||
@@ -454,6 +455,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
roleCe = await RoleCeModel.updateRoleCe(roleId, roleCeUpdate);
|
||||
let role = await RoleModel.incRoleInfo(roleId, { ...roleIncUpdate, ce: roleInc }, { ...roleUpdate, topLineup, topLineupCe });
|
||||
let guild = await GuildModel.updateCe(roleId, roleInc); // 公会更新战力
|
||||
let league = await GVGLeagueModel.updateCe(roleId, roleInc); // 联军更新战力
|
||||
|
||||
saveCeChangeLog(role, roleInc, role.ce, type, ceChangeTxt);
|
||||
updateRank(roleId, serverId, topLineupCe, role, pushHeros, guild);
|
||||
@@ -461,6 +463,9 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
if(hasTopCeChange) await updateRoleOnlineInfo(roleId, { topLineupCe });
|
||||
if(guild) {
|
||||
await updateUserInfo(REDIS_KEY.GUILD_INFO, guild.code, [{ field: 'guildCe', value: guild.guildCe }]);
|
||||
}
|
||||
if(league) { // TODO 联军排行榜需要更新数据
|
||||
|
||||
}
|
||||
return { heroes, curRole: role }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user