日志:记录重生数据
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { ACTIVITY_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, HERO_SYSTEM_TYPE, LOG_TYPE } from "../consts";
|
||||
import { HeroType } from "../db/Hero";
|
||||
import { RoleModel, RoleType, RoleUpdate } from "../db/Role";
|
||||
import { UserLogModel, GateHpLog, BossHpLog } from "../db/UserLog";
|
||||
import { UserOrderModelType } from "../db/UserOrder";
|
||||
@@ -125,4 +126,13 @@ export async function saveGuildBossHpLog(serverId: number, warId: number, guildC
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
export async function saveRebirthLog(session: any, hero: HeroType) {
|
||||
try {
|
||||
let params = getParamBySession(session);
|
||||
await UserLogModel.createRecord({ type: LOG_TYPE.REBIRTH, ...params, hid: hero.hid, heroInfo: JSON.stringify(hero) });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user