添加最强五人战力
This commit is contained in:
@@ -13,16 +13,16 @@ const _ = require('underscore');
|
||||
|
||||
//修改并下发战力
|
||||
export async function calPlayerCeAndSave(sid: string, roleId: string, heros: Array<HeroType>, type?: number, args?: Array<number>) {
|
||||
let {role, pushHeros} = await pubCalPlayerCeAndSave(roleId, heros, type, args);
|
||||
let {role, pushHeros, topFiveCe} = 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: 0 }), uids);
|
||||
pinus.app.get('channelService').pushMessageByUids('onPlayerCeUpdate', resResult(STATUS.SUCCESS, { ce: reduceCe(role.ce) , heros: pushHeros, topFiveCe: reduceCe(topFiveCe) }), uids);
|
||||
return heros;
|
||||
}
|
||||
|
||||
export async function calAllHeroCe(sid: string, roleId: string, type?:number, args?:Array<number>) {
|
||||
let {ce, pushHeros}= await reCalAllHeroCe(roleId, type, args);
|
||||
let {ce, pushHeros, topFiveCe }= 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: 0 }), uids);
|
||||
pinus.app.get('channelService').pushMessageByUids('onPlayerCeUpdate', resResult(STATUS.SUCCESS, { ce: reduceCe(ce), heros: pushHeros, topFiveCe: reduceCe(topFiveCe) }), uids);
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user