日志:添加玩家日志
This commit is contained in:
@@ -20,6 +20,7 @@ import { findIndex } from 'underscore';
|
||||
import { GuildModel } from '../db/Guild';
|
||||
import { DicJob } from './dictionary/DicJob';
|
||||
import { DicSuit } from './dictionary/DicSuit';
|
||||
import { saveCeChangeLog } from './logUtil';
|
||||
|
||||
// 修改并下发战力
|
||||
export async function calPlayerCeAndSave(type: number, roleId: string, originHero: HeroType, update: HeroUpdate, args?: Array<number>) {
|
||||
@@ -54,6 +55,9 @@ export async function calPlayerCeAndSave(type: number, roleId: string, originHer
|
||||
ce: reduceCe(heroCe),
|
||||
incHeroCe: reduceCe(incCe),
|
||||
});
|
||||
|
||||
saveCeChangeLog(role, incCe, role.ce, type, [originHero.hid]);
|
||||
|
||||
return { pushHeros, role, topLineupCe, hero, guild, serverId }
|
||||
}
|
||||
|
||||
@@ -96,6 +100,8 @@ export async function reCalAllHeroCe(type: number, roleId: string, update: RoleU
|
||||
role = await RoleModel.updateRoleInfo(roleId, update);
|
||||
|
||||
let guild = await GuildModel.updateCe(roleId, allIncCe); // 公会更新战力
|
||||
|
||||
saveCeChangeLog(role, allIncCe, role.ce, type, args);
|
||||
return { role, pushHeros, ce: role.ce, topLineupCe: role.topLineupCe, guild, serverId: role.serverId, heros }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user