✨ feat(线上维护): json线上更新方案
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||||
import { ActivityModel, ActivityModelType } from '../../../db/Activity';
|
import { ActivityModel, ActivityModelType } from '../../../db/Activity';
|
||||||
import { ServerlistModel } from '../../../db/Serverlist';
|
import { ServerlistModel } from '../../../db/Serverlist';
|
||||||
import { reloadResources } from '../../../pubUtils/data';
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||||
import { taflush } from '../../../services/sdkService';
|
import { taflush } from '../../../services/sdkService';
|
||||||
import { ActivityInRemote } from '../../../domain/activityField/activityField';
|
import { ActivityInRemote } from '../../../domain/activityField/activityField';
|
||||||
@@ -13,6 +13,7 @@ import { setApiIsClose } from '../../../services/chatService';
|
|||||||
import { setKvToMemory } from '../../../services/pushService';
|
import { setKvToMemory } from '../../../services/pushService';
|
||||||
import { sendPublicAccountGift } from '../../../services/activity/bindPhoneService';
|
import { sendPublicAccountGift } from '../../../services/activity/bindPhoneService';
|
||||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -31,9 +32,26 @@ export class ActivityRemote {
|
|||||||
/**
|
/**
|
||||||
* 重载json资源
|
* 重载json资源
|
||||||
*/
|
*/
|
||||||
public async reloadResources() {
|
public reloadResources(type?: string) {
|
||||||
try {
|
try {
|
||||||
reloadResources();
|
reloadResources(type);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
@@ -183,4 +201,12 @@ export class ActivityRemote {
|
|||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||||
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
||||||
import { reloadResources } from '../../../pubUtils/data';
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
import { setApiIsClose } from '../../../services/chatService';
|
import { setApiIsClose } from '../../../services/chatService';
|
||||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||||
import { setServerGroup } from '../../../services/serverService';
|
import { setServerGroup } from '../../../services/serverService';
|
||||||
@@ -11,6 +11,7 @@ import { taflush } from '../../../services/sdkService';
|
|||||||
import { setPvpSeasonNum, setPvpSettleSeasonNum } from '../../../services/timeTaskService';
|
import { setPvpSeasonNum, setPvpSettleSeasonNum } from '../../../services/timeTaskService';
|
||||||
import { errlogger } from '../../../util/logger';
|
import { errlogger } from '../../../util/logger';
|
||||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -86,14 +87,30 @@ export class BattleRemote {
|
|||||||
/**
|
/**
|
||||||
* 重载json资源
|
* 重载json资源
|
||||||
*/
|
*/
|
||||||
public async reloadResources() {
|
public reloadResources(type?: string) {
|
||||||
try {
|
try {
|
||||||
reloadResources();
|
reloadResources(type);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async setPvpSettleSeasonNum(pvpConfig: PVPConfigType) {
|
public async setPvpSettleSeasonNum(pvpConfig: PVPConfigType) {
|
||||||
try {
|
try {
|
||||||
@@ -190,4 +207,12 @@ export class BattleRemote {
|
|||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||||
import { reloadResources } from '../../../pubUtils/data';
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
import { _checkFilterWords, taflush } from '../../../services/sdkService';
|
import { _checkFilterWords, taflush } from '../../../services/sdkService';
|
||||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||||
import { errlogger } from '../../../util/logger';
|
import { errlogger } from '../../../util/logger';
|
||||||
@@ -7,6 +7,7 @@ import { addUserToChannel, sendMessageToChannel, sendMessgeToChannelByBatch, set
|
|||||||
import { setApiIsClose } from '../../../services/chatService';
|
import { setApiIsClose } from '../../../services/chatService';
|
||||||
import { setServerGroup } from '../../../services/serverService';
|
import { setServerGroup } from '../../../services/serverService';
|
||||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -103,9 +104,26 @@ export class ChatRemote {
|
|||||||
/**
|
/**
|
||||||
* 重载json资源
|
* 重载json资源
|
||||||
*/
|
*/
|
||||||
public async reloadResources() {
|
public async reloadResources(type?: string) {
|
||||||
try {
|
try {
|
||||||
reloadResources();
|
reloadResources(type);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
@@ -182,4 +200,12 @@ export class ChatRemote {
|
|||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ import { setApiIsClose } from '../../../services/chatService';
|
|||||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||||
import { setKvToMemory } from '../../../services/pushService';
|
import { setKvToMemory } from '../../../services/pushService';
|
||||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||||
import { reloadResources } from '../../../pubUtils/data';
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -109,11 +110,36 @@ export class ComBattleRemote {
|
|||||||
/**
|
/**
|
||||||
* 重载json资源
|
* 重载json资源
|
||||||
*/
|
*/
|
||||||
public async reloadResources() {
|
public async reloadResources(type?: string) {
|
||||||
try {
|
try {
|
||||||
reloadResources();
|
reloadResources(type);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Application, HandlerService, } from 'pinus';
|
import { Application, HandlerService, } from 'pinus';
|
||||||
import { reloadResources } from '../../../pubUtils/data';
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
import { UserGuildType } from '../../../db/UserGuild';
|
import { UserGuildType } from '../../../db/UserGuild';
|
||||||
import { incServerNum, kickUser } from '../../../services/connectorService';
|
import { incServerNum, kickUser } from '../../../services/connectorService';
|
||||||
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
||||||
@@ -14,6 +14,7 @@ import { setPvpSeasonNum, setPvpSettleSeasonNum } from '../../../services/timeTa
|
|||||||
import { setKvToMemory } from '../../../services/pushService';
|
import { setKvToMemory } from '../../../services/pushService';
|
||||||
import { setServerGroup } from '../../../services/serverService';
|
import { setServerGroup } from '../../../services/serverService';
|
||||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -75,9 +76,26 @@ export class ConnectorRemote {
|
|||||||
/**
|
/**
|
||||||
* 重载json资源
|
* 重载json资源
|
||||||
*/
|
*/
|
||||||
public async reloadResources() {
|
public async reloadResources(type?: string) {
|
||||||
try {
|
try {
|
||||||
reloadResources();
|
reloadResources(type);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
@@ -211,4 +229,12 @@ export class ConnectorRemote {
|
|||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { Application, ChannelService, HandlerService, } from 'pinus';
|
|||||||
import { setServerGroup } from '../../../services/serverService';
|
import { setServerGroup } from '../../../services/serverService';
|
||||||
import { errlogger } from '../../../util/logger';
|
import { errlogger } from '../../../util/logger';
|
||||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||||
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -44,5 +46,40 @@ export class GMRemote {
|
|||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重载json资源
|
||||||
|
*/
|
||||||
|
public async reloadResources(type?: string) {
|
||||||
|
try {
|
||||||
|
reloadResources(type);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||||
import { reloadResources } from '../../../pubUtils/data';
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
import { taflush, treatGuildName } from '../../../services/sdkService';
|
import { taflush, treatGuildName } from '../../../services/sdkService';
|
||||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||||
import { errlogger } from '../../../util/logger';
|
import { errlogger } from '../../../util/logger';
|
||||||
@@ -13,6 +13,7 @@ import { updateLeagueNameMem, updateTeamRoleInfoMem } from '../../../services/gv
|
|||||||
import { resetPeriodTime, setPeriodTime } from '../../../services/gvg/gvgFightService';
|
import { resetPeriodTime, setPeriodTime } from '../../../services/gvg/gvgFightService';
|
||||||
import { setServerGroup } from '../../../services/serverService';
|
import { setServerGroup } from '../../../services/serverService';
|
||||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -28,9 +29,26 @@ export class GuildRemote {
|
|||||||
/**
|
/**
|
||||||
* 重载json资源
|
* 重载json资源
|
||||||
*/
|
*/
|
||||||
public async reloadResources() {
|
public reloadResources(type?: string) {
|
||||||
try {
|
try {
|
||||||
reloadResources();
|
reloadResources(type);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
@@ -211,4 +229,12 @@ export class GuildRemote {
|
|||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||||
import { reloadResources } from '../../../pubUtils/data';
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
import { refundOrderFromRedisPub, settleOrderFromRedisPub } from '../../../services/orderService';
|
import { refundOrderFromRedisPub, settleOrderFromRedisPub } from '../../../services/orderService';
|
||||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||||
import { taflush } from '../../../services/sdkService';
|
import { taflush } from '../../../services/sdkService';
|
||||||
@@ -7,6 +7,7 @@ import { errlogger } from '../../../util/logger';
|
|||||||
import { setApiIsClose } from '../../../services/chatService';
|
import { setApiIsClose } from '../../../services/chatService';
|
||||||
import { setKvToMemory } from '../../../services/pushService';
|
import { setKvToMemory } from '../../../services/pushService';
|
||||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -25,14 +26,31 @@ export class OrderRemote {
|
|||||||
/**
|
/**
|
||||||
* 重载json资源
|
* 重载json资源
|
||||||
*/
|
*/
|
||||||
public async reloadResources() {
|
public async reloadResources(type?: string) {
|
||||||
try {
|
try {
|
||||||
reloadResources();
|
reloadResources(type);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async settleOrderFromRedisPub(message: string) {
|
public async settleOrderFromRedisPub(message: string) {
|
||||||
try {
|
try {
|
||||||
await settleOrderFromRedisPub(message);
|
await settleOrderFromRedisPub(message);
|
||||||
@@ -104,4 +122,12 @@ export class OrderRemote {
|
|||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||||
// import { sendRolesMails } from '../../../services/mailService';
|
// import { sendRolesMails } from '../../../services/mailService';
|
||||||
import { reloadResources } from '../../../pubUtils/data';
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
import { RankFirstModel, RankFirstType } from '../../../db/RankFirst';
|
import { RankFirstModel, RankFirstType } from '../../../db/RankFirst';
|
||||||
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
||||||
import { treatRoleName, taflush, sendSurveyMail, sendGiftCodeMail } from '../../../services/sdkService';
|
import { treatRoleName, taflush, sendSurveyMail, sendGiftCodeMail } from '../../../services/sdkService';
|
||||||
@@ -14,6 +14,7 @@ import { DEBUG_MAGIC_WORD, MAIL_TYPE } from '../../../consts';
|
|||||||
import { ActivityTimeLimitRankModel } from '../../../db/ActivityTimeLimitRank';
|
import { ActivityTimeLimitRankModel } from '../../../db/ActivityTimeLimitRank';
|
||||||
import { RoleModel } from '../../../db/Role';
|
import { RoleModel } from '../../../db/Role';
|
||||||
import { sendMailToManyPlayerByContent } from '../../../services/mailService';
|
import { sendMailToManyPlayerByContent } from '../../../services/mailService';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
new HandlerService(app, {});
|
new HandlerService(app, {});
|
||||||
@@ -67,14 +68,30 @@ export class RoleRemote {
|
|||||||
/**
|
/**
|
||||||
* 重载json资源
|
* 重载json资源
|
||||||
*/
|
*/
|
||||||
public async reloadResources() {
|
public async reloadResources(type?: string) {
|
||||||
try {
|
try {
|
||||||
reloadResources();
|
reloadResources(type);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async setPvpSeasonNum(pvpConfig: PVPConfigType) {
|
public async setPvpSeasonNum(pvpConfig: PVPConfigType) {
|
||||||
try {
|
try {
|
||||||
@@ -197,4 +214,12 @@ export class RoleRemote {
|
|||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Application, ChannelService } from 'pinus';
|
|||||||
import { guildActivityStart, gateActivityEnd, cityActivityEnd, raceActivityEnd, guildActivitySchedule, auctionSchedule, initMaintenance, stopMaintenance, addMailsToSchedule, updateTimeLimitRank, setLadderCountDown, cancelLadderCountDown, initSumSchedule, setPvpSeasonSchedule, initGVGConfigSchedule, gvgBattleStartSchedule, gvgBattleEndSchedule } from '../../../services/timeTaskService';
|
import { guildActivityStart, gateActivityEnd, cityActivityEnd, raceActivityEnd, guildActivitySchedule, auctionSchedule, initMaintenance, stopMaintenance, addMailsToSchedule, updateTimeLimitRank, setLadderCountDown, cancelLadderCountDown, initSumSchedule, setPvpSeasonSchedule, initGVGConfigSchedule, gvgBattleStartSchedule, gvgBattleEndSchedule } from '../../../services/timeTaskService';
|
||||||
import PvpDefenseType from '../../../db/PvpDefense';
|
import PvpDefenseType from '../../../db/PvpDefense';
|
||||||
import { DicGuildActivity } from '../../../pubUtils/dictionary/DicGuildActivity';
|
import { DicGuildActivity } from '../../../pubUtils/dictionary/DicGuildActivity';
|
||||||
import { reloadResources } from '../../../pubUtils/data';
|
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||||
import { setMarquee, cancelMarquee } from '../../../services/gmService';
|
import { setMarquee, cancelMarquee } from '../../../services/gmService';
|
||||||
import { setDicAuctionTime, setDicGuildActivity } from '../../../services/guildActivity/guildActivityService';
|
import { setDicAuctionTime, setDicGuildActivity } from '../../../services/guildActivity/guildActivityService';
|
||||||
import { setWeek } from '../../../pubUtils/timeUtil';
|
import { setWeek } from '../../../pubUtils/timeUtil';
|
||||||
@@ -20,6 +20,7 @@ import { setApiIsClose } from '../../../services/chatService';
|
|||||||
import { setKvToMemory } from '../../../services/pushService';
|
import { setKvToMemory } from '../../../services/pushService';
|
||||||
import { setServerGroup } from '../../../services/serverService';
|
import { setServerGroup } from '../../../services/serverService';
|
||||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||||
|
import * as dicParam from '../../../pubUtils/dicParam';
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
return new SystimerRemote(app);
|
return new SystimerRemote(app);
|
||||||
@@ -68,9 +69,26 @@ export class SystimerRemote {
|
|||||||
/**
|
/**
|
||||||
* 重载json资源
|
* 重载json资源
|
||||||
*/
|
*/
|
||||||
public async reloadResources() {
|
public async reloadResources(type?: string) {
|
||||||
try {
|
try {
|
||||||
reloadResources();
|
reloadResources(type);
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||||
|
try {
|
||||||
|
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async setGameDataToApp() {
|
||||||
|
try {
|
||||||
|
this.app.set('gameData', gameData);
|
||||||
|
this.app.set('dicParam', dicParam);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
@@ -275,4 +293,12 @@ export class SystimerRemote {
|
|||||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async fun() {
|
||||||
|
try {
|
||||||
|
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||||
|
} catch(e) {
|
||||||
|
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ import { dicCityActivityReward, loadCityActivityReward } from "./dictionary/DicC
|
|||||||
import { dicRaceActivity, dicRaceTypes, loadRaceActivity } from './dictionary/DicRaceActivity';
|
import { dicRaceActivity, dicRaceTypes, loadRaceActivity } from './dictionary/DicRaceActivity';
|
||||||
import { GUILDACTIVITY, RECRUIT } from "./dicParam";
|
import { GUILDACTIVITY, RECRUIT } from "./dicParam";
|
||||||
import * as param from "./dicParam";
|
import * as param from "./dicParam";
|
||||||
import { decodeIdCntArrayStr, parseGoodStr, decodeArrayListStr, getRandEelm, readTsFile, getRandSingleEelm, parseNumberList } from "./util";
|
import { decodeIdCntArrayStr, parseGoodStr, decodeArrayListStr, getRandEelm, getRandSingleEelm, parseNumberList } from "./util";
|
||||||
import { RACE_EVENT_TYPE } from "../consts";
|
import { RACE_EVENT_TYPE } from "../consts";
|
||||||
import { dicShopByType, dicShopItem, loadShop } from "./dictionary/DicShop";
|
import { dicShopByType, dicShopItem, loadShop } from "./dictionary/DicShop";
|
||||||
import { dicShopType, loadShopType } from "./dictionary/DicShopType";
|
import { dicShopType, loadShopType } from "./dictionary/DicShopType";
|
||||||
@@ -1278,26 +1278,47 @@ function initDatas() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 解析一部分dicParam的数据
|
// 解析一部分dicParam的数据
|
||||||
function parseDicParam() {
|
function parseDicParam(type?: string) {
|
||||||
decodeRaceActivityEncounter();
|
if(type == undefined || type == 'decodeRaceActivityEncounter')
|
||||||
decodeRaceNormalItems();
|
decodeRaceActivityEncounter();
|
||||||
decodeRaceEventItems();
|
if(type == undefined || type == 'decodeRaceNormalItems')
|
||||||
getGachaHopePercent();
|
decodeRaceNormalItems();
|
||||||
getGachaTurntablePercent();
|
if(type == undefined || type == 'decodeRaceEventItems')
|
||||||
getGachaPickHeroCnt();
|
decodeRaceEventItems();
|
||||||
getHeroTransPiece();
|
if(type == undefined || type == 'getGachaHopePercent')
|
||||||
parseComBtlLvRange();
|
getGachaHopePercent();
|
||||||
getCeRatio();
|
if(type == undefined || type == 'getGachaTurntablePercent')
|
||||||
loadAuctionTime();
|
getGachaTurntablePercent();
|
||||||
decodeLadderBuyCost();
|
if(type == undefined || type == 'getGachaPickHeroCnt')
|
||||||
parseComBattleRewardTime();
|
getGachaPickHeroCnt();
|
||||||
parseGVGActive();
|
if(type == undefined || type == 'getHeroTransPiece')
|
||||||
parseGVGFieldAdd();
|
getHeroTransPiece();
|
||||||
parseGVGVestigeCnt();
|
if(type == undefined || type == 'parseComBtlLvRange')
|
||||||
parseGVGDurabilityMinus();
|
parseComBtlLvRange();
|
||||||
parseGVGTeamDurability();
|
if(type == undefined || type == 'getCeRatio')
|
||||||
parseGVGReviveCoin();
|
getCeRatio();
|
||||||
parseQuitGuildTime();
|
if(type == undefined || type == 'loadAuctionTime')
|
||||||
|
loadAuctionTime();
|
||||||
|
if(type == undefined || type == 'decodeLadderBuyCost')
|
||||||
|
decodeLadderBuyCost();
|
||||||
|
if(type == undefined || type == 'parseComBattleRewardTime')
|
||||||
|
parseComBattleRewardTime();
|
||||||
|
if(type == undefined || type == 'parseGVGActive')
|
||||||
|
parseGVGActive();
|
||||||
|
if(type == undefined || type == 'parseGVGFieldAdd')
|
||||||
|
parseGVGFieldAdd();
|
||||||
|
if(type == undefined || type == 'parseGVGVestigeCnt')
|
||||||
|
parseGVGVestigeCnt();
|
||||||
|
if(type == undefined || type == 'parseGVGDurabilityMinus')
|
||||||
|
parseGVGDurabilityMinus();
|
||||||
|
if(type == undefined || type == 'parseGVGTeamDurability')
|
||||||
|
parseGVGTeamDurability();
|
||||||
|
if(type == undefined || type == 'parseGVGReviveCoin')
|
||||||
|
parseGVGReviveCoin();
|
||||||
|
if(type == undefined || type == 'parseQuitGuildTime')
|
||||||
|
parseQuitGuildTime();
|
||||||
|
|
||||||
|
console.log('loadDicParam type: ', type||'all');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1362,174 +1383,271 @@ function parseComBattleRewardTime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 加载json
|
// 加载json
|
||||||
function loadDatas() {
|
function loadDatas(type?: string) {
|
||||||
loadHero();
|
if(type == undefined || type == 'loadHero')
|
||||||
loadGoods();
|
loadHero();
|
||||||
loadDaily();
|
if(type == undefined || type == 'loadGoods')
|
||||||
loadEvent();
|
loadGoods();
|
||||||
loadExpedition();
|
if(type == undefined || type == 'loadDaily')
|
||||||
loadExpeditionPoint();
|
loadDaily();
|
||||||
loadJob();
|
if(type == undefined || type == 'loadEvent')
|
||||||
loadKingExp();
|
loadEvent();
|
||||||
loadCharExp();
|
if(type == undefined || type == 'loadExpedition')
|
||||||
loadQuestion();
|
loadExpedition();
|
||||||
loadSe();
|
if(type == undefined || type == 'loadExpeditionPoint')
|
||||||
loadTower();
|
loadExpeditionPoint();
|
||||||
loadTowerTask();
|
if(type == undefined || type == 'loadJob')
|
||||||
loadTowerGift();
|
loadJob();
|
||||||
loadWar();
|
if(type == undefined || type == 'loadKingExp')
|
||||||
loadWarJson();
|
loadKingExp();
|
||||||
loadFashions();
|
if(type == undefined || type == 'loadCharExp')
|
||||||
loadFriendShip();
|
loadCharExp();
|
||||||
loadHeroQualityUp();
|
if(type == undefined || type == 'loadQuestion')
|
||||||
loadHeroStar();
|
loadQuestion();
|
||||||
loadHeroWake();
|
if(type == undefined || type == 'loadSe')
|
||||||
loadRandomEffectPool();
|
loadSe();
|
||||||
loadTitle();
|
if(type == undefined || type == 'loadTower')
|
||||||
loadTeraph();
|
loadTower();
|
||||||
loadSchool();
|
if(type == undefined || type == 'loadTowerTask')
|
||||||
loadSchoolRate();
|
loadTowerTask();
|
||||||
loadHeroScroll();
|
if(type == undefined || type == 'loadTowerGift')
|
||||||
loadPvpOpponent();
|
loadTowerGift();
|
||||||
loadPvpTeamLevel();
|
if(type == undefined || type == 'loadWar')
|
||||||
loadPvpRefreshConsume();
|
loadWar();
|
||||||
loadPvpHeroReward();
|
if(type == undefined || type == 'loadWarJson')
|
||||||
loadPvpRankReward();
|
loadWarJson();
|
||||||
loadPvpBox();
|
if(type == undefined || type == 'loadFashions')
|
||||||
loadGuildAuth();
|
loadFashions();
|
||||||
loadStructure();
|
if(type == undefined || type == 'loadFriendShip')
|
||||||
loadGuildActiveDayReward();
|
loadFriendShip();
|
||||||
loadGuildActiveWeekReward();
|
if(type == undefined || type == 'loadHeroQualityUp')
|
||||||
loadGuildActiveWays();
|
loadHeroQualityUp();
|
||||||
loadGuildPosition();
|
if(type == undefined || type == 'loadHeroStar')
|
||||||
loadMail();
|
loadHeroStar();
|
||||||
loadArmyTrainJuDian();
|
if(type == undefined || type == 'loadHeroWake')
|
||||||
loadTrainSoloReward();
|
loadHeroWake();
|
||||||
loadArmyDevelopConsume();
|
if(type == undefined || type == 'loadRandomEffectPool')
|
||||||
loadArmyBossRank();
|
loadRandomEffectPool();
|
||||||
loadArmyDonate();
|
if(type == undefined || type == 'loadTitle')
|
||||||
loadRoleFriend();
|
loadTitle();
|
||||||
loadRoleFriendLv();
|
if(type == undefined || type == 'loadTeraph')
|
||||||
loadGuildActivity();
|
loadTeraph();
|
||||||
loadGateActivityPoint();
|
if(type == undefined || type == 'loadSchool')
|
||||||
loadGuildAuction();
|
loadSchool();
|
||||||
loadCityActivity();
|
if(type == undefined || type == 'loadSchoolRate')
|
||||||
loadChatAccuse();
|
loadSchoolRate();
|
||||||
loadCityActivityReward();
|
if(type == undefined || type == 'loadHeroScroll')
|
||||||
loadRaceActivity();
|
loadHeroScroll();
|
||||||
loadShop();
|
if(type == undefined || type == 'loadPvpOpponent')
|
||||||
loadShopType();
|
loadPvpOpponent();
|
||||||
loadRank();
|
if(type == undefined || type == 'loadPvpTeamLevel')
|
||||||
loadRankReward();
|
loadPvpTeamLevel();
|
||||||
loadTask();
|
if(type == undefined || type == 'loadPvpRefreshConsume')
|
||||||
loadMainTaskStage();
|
loadPvpRefreshConsume();
|
||||||
loadTaskBox();
|
if(type == undefined || type == 'loadPvpHeroReward')
|
||||||
loadGacha();
|
loadPvpHeroReward();
|
||||||
loadGachaPlan();
|
if(type == undefined || type == 'loadPvpRankReward')
|
||||||
loadGachaFloor();
|
loadPvpRankReward();
|
||||||
loadGiftPackage();
|
if(type == undefined || type == 'loadPvpBox')
|
||||||
loadGiftPackagePlan();
|
loadPvpBox();
|
||||||
loadGiftPackageFloor();
|
if(type == undefined || type == 'loadGuildAuth')
|
||||||
loadRecruit();
|
loadGuildAuth();
|
||||||
loadRMB();
|
if(type == undefined || type == 'loadStructure')
|
||||||
loadActivityType();
|
loadStructure();
|
||||||
loadTaskType();
|
if(type == undefined || type == 'loadGuildActiveDayReward')
|
||||||
loadServerName();
|
loadGuildActiveDayReward();
|
||||||
loadAp();
|
if(type == undefined || type == 'loadGuildActiveWeekReward')
|
||||||
loadApBuy();
|
loadGuildActiveWeekReward();
|
||||||
loadKingExpRatio();
|
if(type == undefined || type == 'loadGuildActiveWays')
|
||||||
loadEquipAttributeRatio();
|
loadGuildActiveWays();
|
||||||
loadHoliday();
|
if(type == undefined || type == 'loadGuildPosition')
|
||||||
loadExpeditionSubAttr();
|
loadGuildPosition();
|
||||||
loadAuctionReward();
|
if(type == undefined || type == 'loadMail')
|
||||||
loadGuildTrainInfo();
|
loadMail();
|
||||||
loadPvpDifficultRatio();
|
if(type == undefined || type == 'loadArmyTrainJuDian')
|
||||||
loadWhiteIp();
|
loadArmyTrainJuDian();
|
||||||
treatTaskGroup();
|
if(type == undefined || type == 'loadTrainSoloReward')
|
||||||
loadGuildWishReward();
|
loadTrainSoloReward();
|
||||||
loadApi();
|
if(type == undefined || type == 'loadArmyDevelopConsume')
|
||||||
loadServerConst();
|
loadArmyDevelopConsume();
|
||||||
loadEquip();
|
if(type == undefined || type == 'loadArmyBossRank')
|
||||||
loadEquipStrength();
|
loadArmyBossRank();
|
||||||
loadEquipQuality();
|
if(type == undefined || type == 'loadArmyDonate')
|
||||||
loadEquipStar();
|
loadArmyDonate();
|
||||||
loadEquipSuit();
|
if(type == undefined || type == 'loadRoleFriend')
|
||||||
loadEquipQualityExtra();
|
loadRoleFriend();
|
||||||
loadJewel();
|
if(type == undefined || type == 'loadRoleFriendLv')
|
||||||
loadStone();
|
loadRoleFriendLv();
|
||||||
loadJewelCondition();
|
if(type == undefined || type == 'loadGuildActivity')
|
||||||
loadMainStarBox();
|
loadGuildActivity();
|
||||||
loadHeroTalent();
|
if(type == undefined || type == 'loadGateActivityPoint')
|
||||||
loadEquipStrengthAttr();
|
loadGateActivityPoint();
|
||||||
loadTowerPvpSubAttr();
|
if(type == undefined || type == 'loadGuildAuction')
|
||||||
loadSystemOpenTime();
|
loadGuildAuction();
|
||||||
loadRandomEffectPoolPlan();
|
if(type == undefined || type == 'loadCityActivity')
|
||||||
loadMainWarReward();
|
loadCityActivity();
|
||||||
loadLadderMatch();
|
if(type == undefined || type == 'loadChatAccuse')
|
||||||
loadLadderDifficultRatio();
|
loadChatAccuse();
|
||||||
loadLadderRankReward();
|
if(type == undefined || type == 'loadCityActivityReward')
|
||||||
loadGeneralGoods();
|
loadCityActivityReward();
|
||||||
loadArtifact();
|
if(type == undefined || type == 'loadRaceActivity')
|
||||||
loadArtifactLvPlan();
|
loadRaceActivity();
|
||||||
loadArtifactQuality();
|
if(type == undefined || type == 'loadShop')
|
||||||
loadArtifactQualityPlan();
|
loadShop();
|
||||||
loadArtifactSeid();
|
if(type == undefined || type == 'loadShopType')
|
||||||
loadGVGPeriod();
|
loadShopType();
|
||||||
loadGVGTech();
|
if(type == undefined || type == 'loadRank')
|
||||||
loadGVGItem();
|
loadRank();
|
||||||
loadGVGLeagueLv();
|
if(type == undefined || type == 'loadRankReward')
|
||||||
loadGVGResourceBase();
|
loadRankReward();
|
||||||
loadGVGContributeBox();
|
if(type == undefined || type == 'loadTask')
|
||||||
loadGVGArea();
|
loadTask();
|
||||||
loadGVGCityAdd();
|
if(type == undefined || type == 'loadMainTaskStage')
|
||||||
loadGVGTask();
|
loadMainTaskStage();
|
||||||
loadGVGVestigeType();
|
if(type == undefined || type == 'loadTaskBox')
|
||||||
loadGVGVestige();
|
loadTaskBox();
|
||||||
loadGVGVestigeRange();
|
if(type == undefined || type == 'loadGacha')
|
||||||
loadGVGVestigeLeagueRank();
|
loadGacha();
|
||||||
loadGVGVestigePlayerRank();
|
if(type == undefined || type == 'loadGachaPlan')
|
||||||
loadGVGAreaPoint();
|
loadGachaPlan();
|
||||||
loadGVGBattleRankReward();
|
if(type == undefined || type == 'loadGachaFloor')
|
||||||
loadPushMessage();
|
loadGachaFloor();
|
||||||
}
|
if(type == undefined || type == 'loadGiftPackage')
|
||||||
|
loadGiftPackage();
|
||||||
// 重载dicParam
|
if(type == undefined || type == 'loadGiftPackagePlan')
|
||||||
export function reloadDicParam() {
|
loadGiftPackagePlan();
|
||||||
let file = readTsFile('dicParam');
|
if(type == undefined || type == 'loadGiftPackageFloor')
|
||||||
if(file) {
|
loadGiftPackageFloor();
|
||||||
let lines = file.split('\n');
|
if(type == undefined || type == 'loadRecruit')
|
||||||
let outer = '';
|
loadRecruit();
|
||||||
lines.forEach(line => {
|
if(type == undefined || type == 'loadRMB')
|
||||||
if(line.replace(/ /g, '')) {
|
loadRMB();
|
||||||
if(line.indexOf('export') != -1) {
|
if(type == undefined || type == 'loadActivityType')
|
||||||
outer = line.split(' ')[2];
|
loadActivityType();
|
||||||
// console.log(outer)
|
if(type == undefined || type == 'loadTaskType')
|
||||||
}
|
loadTaskType();
|
||||||
if(line.indexOf('export') == -1 && line.indexOf('}') == -1) {
|
if(type == undefined || type == 'loadServerName')
|
||||||
let s = line.split(', //')[0];
|
loadServerName();
|
||||||
let key = s.slice(0, s.indexOf(':')).replace(/ /g, '');
|
if(type == undefined || type == 'loadAp')
|
||||||
let value = s.slice(s.indexOf(':' + 1)).replace(/ /g, '');
|
loadAp();
|
||||||
let isString = value.match(/(?<=')[^']*/);
|
if(type == undefined || type == 'loadApBuy')
|
||||||
if(!param[outer]) {
|
loadApBuy();
|
||||||
param[outer] = {}
|
if(type == undefined || type == 'loadKingExpRatio')
|
||||||
}
|
loadKingExpRatio();
|
||||||
if(isString) {
|
if(type == undefined || type == 'loadEquipAttributeRatio')
|
||||||
param[outer][key] = isString[0];
|
loadEquipAttributeRatio();
|
||||||
} else {
|
if(type == undefined || type == 'loadHoliday')
|
||||||
param[outer][key] = parseFloat(value);
|
loadHoliday();
|
||||||
}
|
if(type == undefined || type == 'loadExpeditionSubAttr')
|
||||||
}
|
loadExpeditionSubAttr();
|
||||||
}
|
if(type == undefined || type == 'loadAuctionReward')
|
||||||
});
|
loadAuctionReward();
|
||||||
parseDicParam();
|
if(type == undefined || type == 'loadGuildTrainInfo')
|
||||||
}
|
loadGuildTrainInfo();
|
||||||
|
if(type == undefined || type == 'loadPvpDifficultRatio')
|
||||||
|
loadPvpDifficultRatio();
|
||||||
|
if(type == undefined || type == 'loadWhiteIp')
|
||||||
|
loadWhiteIp();
|
||||||
|
if(type == undefined || type == 'treatTaskGroup')
|
||||||
|
treatTaskGroup();
|
||||||
|
if(type == undefined || type == 'loadGuildWishReward')
|
||||||
|
loadGuildWishReward();
|
||||||
|
if(type == undefined || type == 'loadApi')
|
||||||
|
loadApi();
|
||||||
|
if(type == undefined || type == 'loadServerConst')
|
||||||
|
loadServerConst();
|
||||||
|
if(type == undefined || type == 'loadEquip')
|
||||||
|
loadEquip();
|
||||||
|
if(type == undefined || type == 'loadEquipStrength')
|
||||||
|
loadEquipStrength();
|
||||||
|
if(type == undefined || type == 'loadEquipQuality')
|
||||||
|
loadEquipQuality();
|
||||||
|
if(type == undefined || type == 'loadEquipStar')
|
||||||
|
loadEquipStar();
|
||||||
|
if(type == undefined || type == 'loadEquipSuit')
|
||||||
|
loadEquipSuit();
|
||||||
|
if(type == undefined || type == 'loadEquipQualityExtra')
|
||||||
|
loadEquipQualityExtra();
|
||||||
|
if(type == undefined || type == 'loadJewel')
|
||||||
|
loadJewel();
|
||||||
|
if(type == undefined || type == 'loadStone')
|
||||||
|
loadStone();
|
||||||
|
if(type == undefined || type == 'loadJewelCondition')
|
||||||
|
loadJewelCondition();
|
||||||
|
if(type == undefined || type == 'loadMainStarBox')
|
||||||
|
loadMainStarBox();
|
||||||
|
if(type == undefined || type == 'loadHeroTalent')
|
||||||
|
loadHeroTalent();
|
||||||
|
if(type == undefined || type == 'loadEquipStrengthAttr')
|
||||||
|
loadEquipStrengthAttr();
|
||||||
|
if(type == undefined || type == 'loadTowerPvpSubAttr')
|
||||||
|
loadTowerPvpSubAttr();
|
||||||
|
if(type == undefined || type == 'loadSystemOpenTime')
|
||||||
|
loadSystemOpenTime();
|
||||||
|
if(type == undefined || type == 'loadRandomEffectPoolPlan')
|
||||||
|
loadRandomEffectPoolPlan();
|
||||||
|
if(type == undefined || type == 'loadMainWarReward')
|
||||||
|
loadMainWarReward();
|
||||||
|
if(type == undefined || type == 'loadLadderMatch')
|
||||||
|
loadLadderMatch();
|
||||||
|
if(type == undefined || type == 'loadLadderDifficultRatio')
|
||||||
|
loadLadderDifficultRatio();
|
||||||
|
if(type == undefined || type == 'loadLadderRankReward')
|
||||||
|
loadLadderRankReward();
|
||||||
|
if(type == undefined || type == 'loadGeneralGoods')
|
||||||
|
loadGeneralGoods();
|
||||||
|
if(type == undefined || type == 'loadArtifact')
|
||||||
|
loadArtifact();
|
||||||
|
if(type == undefined || type == 'loadArtifactLvPlan')
|
||||||
|
loadArtifactLvPlan();
|
||||||
|
if(type == undefined || type == 'loadArtifactQuality')
|
||||||
|
loadArtifactQuality();
|
||||||
|
if(type == undefined || type == 'loadArtifactQualityPlan')
|
||||||
|
loadArtifactQualityPlan();
|
||||||
|
if(type == undefined || type == 'loadArtifactSeid')
|
||||||
|
loadArtifactSeid();
|
||||||
|
if(type == undefined || type == 'loadGVGPeriod')
|
||||||
|
loadGVGPeriod();
|
||||||
|
if(type == undefined || type == 'loadGVGTech')
|
||||||
|
loadGVGTech();
|
||||||
|
if(type == undefined || type == 'loadGVGItem')
|
||||||
|
loadGVGItem();
|
||||||
|
if(type == undefined || type == 'loadGVGLeagueLv')
|
||||||
|
loadGVGLeagueLv();
|
||||||
|
if(type == undefined || type == 'loadGVGResourceBase')
|
||||||
|
loadGVGResourceBase();
|
||||||
|
if(type == undefined || type == 'loadGVGContributeBox')
|
||||||
|
loadGVGContributeBox();
|
||||||
|
if(type == undefined || type == 'loadGVGArea')
|
||||||
|
loadGVGArea();
|
||||||
|
if(type == undefined || type == 'loadGVGCityAdd')
|
||||||
|
loadGVGCityAdd();
|
||||||
|
if(type == undefined || type == 'loadGVGTask')
|
||||||
|
loadGVGTask();
|
||||||
|
if(type == undefined || type == 'loadGVGVestigeType')
|
||||||
|
loadGVGVestigeType();
|
||||||
|
if(type == undefined || type == 'loadGVGVestige')
|
||||||
|
loadGVGVestige();
|
||||||
|
if(type == undefined || type == 'loadGVGVestigeRange')
|
||||||
|
loadGVGVestigeRange();
|
||||||
|
if(type == undefined || type == 'loadGVGVestigeLeagueRank')
|
||||||
|
loadGVGVestigeLeagueRank();
|
||||||
|
if(type == undefined || type == 'loadGVGVestigePlayerRank')
|
||||||
|
loadGVGVestigePlayerRank();
|
||||||
|
if(type == undefined || type == 'loadGVGAreaPoint')
|
||||||
|
loadGVGAreaPoint();
|
||||||
|
if(type == undefined || type == 'loadGVGBattleRankReward')
|
||||||
|
loadGVGBattleRankReward();
|
||||||
|
if(type == undefined || type == 'loadPushMessage')
|
||||||
|
loadPushMessage();
|
||||||
|
|
||||||
|
console.log('loadDatas type: ', type||'all');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 后台调用重载资源
|
// 后台调用重载资源
|
||||||
export function reloadResources() {
|
export function reloadResources(fileName: string) {
|
||||||
loadDatas();
|
loadDatas(fileName);
|
||||||
reloadDicParam();
|
parseDicParam(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
initDatas();
|
initDatas();
|
||||||
|
|||||||
Reference in New Issue
Block a user