From 28495373fc37cc46f5fe352a6dfac11ecd3f2605 Mon Sep 17 00:00:00 2001 From: luying Date: Wed, 2 Nov 2022 14:15:17 +0800 Subject: [PATCH] =?UTF-8?q?(=E8=BF=9C=E5=BE=81):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=AC=A1=E7=BA=A7=E5=B1=9E=E6=80=A7=E8=A1=A8=E8=B6=85=E8=BF=87?= =?UTF-8?q?=E7=AD=89=E7=BA=A7=E7=9A=84=E6=95=B0=E6=8D=AE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/expeditionService.ts | 1 + shared/pubUtils/dictionary/DicExpeditionSubAttr.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/game-server/app/services/expeditionService.ts b/game-server/app/services/expeditionService.ts index a486f8e16..4d9cdd609 100644 --- a/game-server/app/services/expeditionService.ts +++ b/game-server/app/services/expeditionService.ts @@ -281,6 +281,7 @@ export async function getResetRemainCnt(curTime: Date, roleId: string, role?: Ro let newAttribute = new AttributeCal(); newAttribute.setLv(_lv); let dicExpeditionSubAttr = gameData.expeditionSubAttr.get(_lv); + if(!dicExpeditionSubAttr) dicExpeditionSubAttr = gameData.expeditionSubAttr.get('max'); newAttribute.setByWarJson(dicExpeditionSubAttr.attribute); // 次级属性 let subAttrCe = newAttribute.calSubAttrCe() * enemyCount; diff --git a/shared/pubUtils/dictionary/DicExpeditionSubAttr.ts b/shared/pubUtils/dictionary/DicExpeditionSubAttr.ts index b727c5dd0..fb5a8e7ba 100644 --- a/shared/pubUtils/dictionary/DicExpeditionSubAttr.ts +++ b/shared/pubUtils/dictionary/DicExpeditionSubAttr.ts @@ -15,7 +15,7 @@ const DicExpeditionSubAttrKeys: KeysEnum = { attribute: true, }; -export const dicExpeditionSubAttr = new Map(); +export const dicExpeditionSubAttr = new Map(); export function loadExpeditionSubAttr() { dicExpeditionSubAttr.clear(); let l = 1; @@ -25,6 +25,7 @@ export function loadExpeditionSubAttr() { o.lv = o.level; for(let i = l; i <= o.lv; i++) { dicExpeditionSubAttr.set(l, _.pick(o, Object.keys(DicExpeditionSubAttrKeys))); + dicExpeditionSubAttr.set('max', _.pick(o, Object.keys(DicExpeditionSubAttrKeys))); l++; } });