From 6e8dce5d7bc0b7d598a54f6cafe43a9e592b8dbe Mon Sep 17 00:00:00 2001 From: luying Date: Mon, 9 May 2022 23:22:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A6=E5=B0=86=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=8E=B7=E5=8F=96=E6=AD=A6=E5=B0=86=E7=9A=AE?= =?UTF-8?q?=E8=82=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/role/createHero.ts | 4 +++- gm-server/config/config.sq1.ts | 17 +++++++++++++++++ web-server/config/config.sq1.ts | 17 +++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/game-server/app/services/role/createHero.ts b/game-server/app/services/role/createHero.ts index ea7bedfcb..0c374ca9f 100644 --- a/game-server/app/services/role/createHero.ts +++ b/game-server/app/services/role/createHero.ts @@ -50,10 +50,12 @@ import { Rank } from "../rankService"; if (createHeroeInfos.length > 0) { let heroInfos = new Map(); for(let {hid, ...info} of createHeroeInfos) { + let originSkins = await SkinModel.findbyRoleAndHid(roleId, hid); let initSkin = SkinModel.getInitInfo(hid); skins.push(initSkin); // 初始皮肤 let seqId = await CounterModel.getNewCounter(COUNTER.HID) || -1; - let initHero = HeroModel.getInitInfo(hid, { ...info, seqId, serverId, roleId, roleName, skins: [new HeroSkin(initSkin)] }); + let initHeroSkins = [initSkin, ...originSkins].map((skin, index) => new HeroSkin(skin, index == 0)); + let initHero = HeroModel.getInitInfo(hid, { ...info, seqId, serverId, roleId, roleName, skins: initHeroSkins }); heroInfos.set(hid, initHero); figureConditions.push({ type: FIGURE_UNLOCK_CONDITION.GET_HERO, paramHid: hid }); incHeroNum ++; diff --git a/gm-server/config/config.sq1.ts b/gm-server/config/config.sq1.ts index a655ff749..9504fd802 100644 --- a/gm-server/config/config.sq1.ts +++ b/gm-server/config/config.sq1.ts @@ -21,6 +21,23 @@ export default (appInfo: EggAppInfo) => { pw: 'PANl3Vr2eozkq4N2' }; + + config.customLogger = { + linkLogger: { + file: '/zyz_logs/gm-server/link-log.log', + formatter(meta) { + return `[${meta.level}] [${meta.date}] ${meta.message}`; + }, + }, + }; + + config.logrotator = { + filesRotateBySize: [ + '/zyz_logs/gm-server/link-log.log', + ], + maxFileSize: 1024, + }; + // the return config will combines to EggAppConfig return { ...defaultConfig(appInfo), diff --git a/web-server/config/config.sq1.ts b/web-server/config/config.sq1.ts index 481a6e1c5..3dda1b6ae 100644 --- a/web-server/config/config.sq1.ts +++ b/web-server/config/config.sq1.ts @@ -23,6 +23,23 @@ export default (appInfo: EggAppInfo) => { appSecret: '19f8d6272fbba17294513610ba67f21b' }; + config.customLogger = { + linkLogger: { + file: '/zyz_logs/web-server/link-log.log', + formatter(meta) { + return `[${meta.level}] [${meta.date}] ${meta.message}`; + }, + }, + }; + + config.logrotator = { + filesRotateBySize: [ + '/zyz_logs/web-server/link-log.log', + ], + maxFileSize: 1024, + }; + + // the return config will combines to EggAppConfig return { ...defaultConfig(appInfo),