数数:后台停服前关闭

This commit is contained in:
luying
2021-12-15 10:41:30 +08:00
parent 2092d692df
commit 05e410d28f
10 changed files with 56 additions and 5 deletions
@@ -6,7 +6,7 @@ import { addItems, createHeroes } from '../../../services/rewardService';
import { RewardInter } from '../../../pubUtils/interface';
import { getExpByLv } from '../../../pubUtils/data';
import { RoleModel } from '../../../db/Role';
import { BLOCK_TYPE } from '../../../consts';
import { BLOCK_TYPE, ITEM_CHANGE_REASON } from '../../../consts';
let timer: NodeJS.Timer;
export default function (app: Application) {
return new GmRoleHandler(app);
@@ -27,7 +27,7 @@ export class GmRoleHandler {
let sid = connect.isOnline?connect.sid: null;
if(reward &&reward.length > 0) {
await addItems(roleId, roleName, sid, values.reward);
await addItems(roleId, roleName, sid, values.reward, ITEM_CHANGE_REASON.DEBUG);
}
if(heroes && heroes.length > 0) {
await createHeroes(roleId, roleName, sid, serverId, heroes.map(hid => { return { hid, count: 1 }}))