数数:后台停服前关闭
This commit is contained in:
@@ -20,6 +20,8 @@ import { GuildActivityCityModel } from '../../../db/GuildActivityCity';
|
||||
import { GuildActivityRecordModel } from '../../../db/GuildActivityRec';
|
||||
import { getTimeFunM, nowSeconds } from '../../../pubUtils/timeUtil';
|
||||
import moment = require('moment');
|
||||
import { sendUngotDividend } from '../../../services/auctionService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
let timer: NodeJS.Timer;
|
||||
export default function (app: Application) {
|
||||
return new GmHandler(app);
|
||||
@@ -341,4 +343,16 @@ export class GmHandler {
|
||||
await pushCurrentTime(now.getTime());
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
async taflus() {
|
||||
taflush();
|
||||
pinus.app.rpc.activity.activityRemote.taflush.broadcast();
|
||||
pinus.app.rpc.battle.battleRemote.taflush.broadcast();
|
||||
pinus.app.rpc.chat.chatRemote.taflush.broadcast();
|
||||
pinus.app.rpc.connector.connectorRemote.taflush.broadcast();
|
||||
pinus.app.rpc.guild.guildRemote.taflush.broadcast();
|
||||
pinus.app.rpc.order.orderRemote.taflush.broadcast();
|
||||
pinus.app.rpc.role.roleRemote.taflush.broadcast();
|
||||
pinus.app.rpc.systimer.systimerRemote.taflush.broadcast();
|
||||
}
|
||||
}
|
||||
@@ -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 }}))
|
||||
|
||||
Reference in New Issue
Block a user