数数:后台停服前关闭
This commit is contained in:
@@ -4,6 +4,7 @@ import { ServerlistModel } from '../../../db/Serverlist';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { _getActivitiesByType, _getActivityById, _getActivities } from '../../../services/activity/activityService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -129,4 +130,8 @@ export class ActivityRemote {
|
||||
public getServerMainten(serverId: number) {
|
||||
return getServerMainten(serverId);
|
||||
}
|
||||
|
||||
public taflush() {
|
||||
return taflush();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { Application, ChannelService, FrontendSession, RemoterClass, HandlerServ
|
||||
import { PVPConfigType } from '../../../db/SystemConfig';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -100,4 +101,8 @@ export class BattleRemote {
|
||||
public getServerMainten(serverId: number) {
|
||||
return getServerMainten(serverId);
|
||||
}
|
||||
|
||||
public taflush() {
|
||||
return taflush();
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import { getAllGuildActivityStatus } from '../../../services/guildActivityServic
|
||||
import { MailParam } from '../../../domain/roleField/mail';
|
||||
import { RankFirstType } from '../../../db/RankFirst';
|
||||
import { LotType } from '../../../db/Lot';
|
||||
import { _checkFilterWords, getTire } from '../../../services/sdkService';
|
||||
import { _checkFilterWords, getTire, taflush } from '../../../services/sdkService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
|
||||
export default function (app: Application) {
|
||||
@@ -302,4 +302,8 @@ export class ChatRemote {
|
||||
public getServerMainten(serverId: number) {
|
||||
return getServerMainten(serverId);
|
||||
}
|
||||
|
||||
public taflush() {
|
||||
return taflush();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { kickUser } from '../../../services/connectorService';
|
||||
import { PVPConfigType } from '../../../db/SystemConfig';
|
||||
import { setDicAuctionTime } from '../../../services/guildActivityService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
return new ConnectorRemote(app);
|
||||
@@ -94,4 +95,8 @@ export class ConnectorRemote {
|
||||
async setDicAuctionTime(startTime: number, endActivity: number, startGuild: number, endGuild: number, startWorld: number, endWorld: number) {
|
||||
setDicAuctionTime(startTime, endActivity, startGuild, endGuild, startWorld, endWorld);
|
||||
}
|
||||
|
||||
public taflush() {
|
||||
return taflush();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 }}))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { treatGuildName } from '../../../services/sdkService';
|
||||
import { taflush, treatGuildName } from '../../../services/sdkService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
|
||||
export default function (app: Application) {
|
||||
@@ -39,4 +39,8 @@ export class GuildRemote {
|
||||
public getServerMainten(serverId: number) {
|
||||
return getServerMainten(serverId);
|
||||
}
|
||||
|
||||
public taflush() {
|
||||
return taflush();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { settleOrderFromRedisPub } from '../../../services/orderService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -39,4 +40,8 @@ export class OrderRemote {
|
||||
public getServerMainten(serverId: number) {
|
||||
return getServerMainten(serverId);
|
||||
}
|
||||
|
||||
public taflush() {
|
||||
return taflush();
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import { DEFAULT_HEROES } from '../../../consts';
|
||||
import { Figure } from '../../../domain/dbGeneral';
|
||||
import { getDefaultRoleInfo } from '../../../services/roleService';
|
||||
import { PVPConfigType } from '../../../db/SystemConfig';
|
||||
import { treatRoleName } from '../../../services/sdkService';
|
||||
import { treatRoleName, taflush } from '../../../services/sdkService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
|
||||
export default function (app: Application) {
|
||||
@@ -135,4 +135,8 @@ export class RoleRemote {
|
||||
public getServerMainten(serverId: number) {
|
||||
return getServerMainten(serverId);
|
||||
}
|
||||
|
||||
public taflush() {
|
||||
return taflush();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { setDicAuctionTime, setDicGuildActivity } from '../../../services/guildA
|
||||
import { setWeek } from '../../../pubUtils/timeUtil';
|
||||
import { ServerlistType } from '../../../db/Serverlist';
|
||||
import { MarqueeType } from '../../../db/Marquee';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
|
||||
export default function (app: Application) {
|
||||
return new SystimerRemote(app);
|
||||
@@ -99,4 +100,8 @@ export class SystimerRemote {
|
||||
public async stopMaintenance(batchCode: string, serverIds: number[]) {
|
||||
await stopMaintenance(batchCode, serverIds);
|
||||
}
|
||||
|
||||
public taflush() {
|
||||
return taflush();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user