From 64481dc378ecfab550c0bbf9de6b39996db02ec3 Mon Sep 17 00:00:00 2001 From: luying Date: Thu, 22 Jul 2021 20:19:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BB=E5=AE=9D=EF=BC=9A=E8=97=8F=E5=AE=9D?= =?UTF-8?q?=E5=9B=BE=E6=B6=88=E8=80=97=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/servers/battle/handler/comBattleHandler.ts | 5 +---- game-server/app/servers/role/handler/equipHandler.ts | 5 +---- shared/pubUtils/dictionary/DicBlueprtCompose.ts | 6 ++++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/game-server/app/servers/battle/handler/comBattleHandler.ts b/game-server/app/servers/battle/handler/comBattleHandler.ts index b96cbf9b8..5015758db 100644 --- a/game-server/app/servers/battle/handler/comBattleHandler.ts +++ b/game-server/app/servers/battle/handler/comBattleHandler.ts @@ -757,10 +757,7 @@ export class ComBattleHandler { return resResult(STATUS.COM_BLUEPRT_COUNT_ERROR); } // 添加寻宝币 - original.push({ - id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.TREASURE_POINT), - count: dicCompose.coinNum - }); + original.concat(dicCompose.coinNum); // 消耗藏宝图和寻宝币 let costResult = await handleCost(roleId, sid, original); diff --git a/game-server/app/servers/role/handler/equipHandler.ts b/game-server/app/servers/role/handler/equipHandler.ts index 4ce2df671..3835c7579 100644 --- a/game-server/app/servers/role/handler/equipHandler.ts +++ b/game-server/app/servers/role/handler/equipHandler.ts @@ -916,10 +916,7 @@ export class EquipHandler { if (dicTargetInfo.quality != dicCompose.targetQuality) return resResult(STATUS.COM_BLUEPRT_QUALITY_ERROR); // 添加寻宝币 - original.push({ - id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.TREASURE_POINT), - count: dicCompose.coinNum - }); + original.concat(dicCompose.coinNum); // 消耗藏宝图和寻宝币 let costResult = await handleCost(roleId, sid, original); diff --git a/shared/pubUtils/dictionary/DicBlueprtCompose.ts b/shared/pubUtils/dictionary/DicBlueprtCompose.ts index cabbb40e9..7f82c9ca6 100644 --- a/shared/pubUtils/dictionary/DicBlueprtCompose.ts +++ b/shared/pubUtils/dictionary/DicBlueprtCompose.ts @@ -1,13 +1,14 @@ // 藏宝图合成表 -import { readFileAndParse } from '../util' +import { readFileAndParse, parseGoodStr } from '../util' import { FILENAME } from '../../consts' +import { RewardInter } from '../interface'; export interface DicBlueprtCompose { // 品质 readonly quality: number; // 消耗的寻宝币数量 - readonly coinNum: number; + readonly coinNum: RewardInter[]; // 消耗的藏宝图的数量 readonly blueprtNum: number; // 目标品质 @@ -20,6 +21,7 @@ export function loadBlueprtCompose() { let arr = readFileAndParse(FILENAME.DIC_BLUEPRT_COMPOSE); arr.forEach(o => { + o.coinNum = parseGoodStr(o.coinNum); dicBlueprtCompose.set(o.quality, o); }); arr = undefined;