全局修改:topFive字段

This commit is contained in:
luying
2021-02-25 13:36:10 +08:00
parent 47c3c093f2
commit 56efab8cb7
17 changed files with 224 additions and 224 deletions
+4 -4
View File
@@ -12,17 +12,17 @@ import { defaultHeroes } from './pvpService';
//修改并下发战力
export async function calPlayerCeAndSave(sid: string, roleId: string, heros: Array<HeroType>, type?: number, args?: Array<number>) {
let {role, pushHeros, topFiveCe} = await pubCalPlayerCeAndSave(roleId, heros, type, args);
let {role, pushHeros, topLineupCe} = await pubCalPlayerCeAndSave(roleId, heros, type, args);
//下发战力
let uids = [{ uid: roleId, sid }];
pinus.app.get('channelService').pushMessageByUids('onPlayerCeUpdate', resResult(STATUS.SUCCESS, { ce: reduceCe(role.ce) , heros: pushHeros, topFiveCe: reduceCe(topFiveCe) }), uids);
pinus.app.get('channelService').pushMessageByUids('onPlayerCeUpdate', resResult(STATUS.SUCCESS, { ce: reduceCe(role.ce) , heros: pushHeros, topLineupCe: reduceCe(topLineupCe) }), uids);
defaultHeroes(role);
return heros;
}
export async function calAllHeroCe(sid: string, roleId: string, type?:number, args?:Array<number>) {
let {ce, pushHeros, topFiveCe }= await reCalAllHeroCe(roleId, type, args);
let {ce, pushHeros, topLineupCe }= await reCalAllHeroCe(roleId, type, args);
let uids = [{ uid: roleId, sid }];
pinus.app.get('channelService').pushMessageByUids('onPlayerCeUpdate', resResult(STATUS.SUCCESS, { ce: reduceCe(ce), heros: pushHeros, topFiveCe: reduceCe(topFiveCe) }), uids);
pinus.app.get('channelService').pushMessageByUids('onPlayerCeUpdate', resResult(STATUS.SUCCESS, { ce: reduceCe(ce), heros: pushHeros, topLineupCe: reduceCe(topLineupCe) }), uids);
return {ce: reduceCe(ce)};
}