From c73d8850090c4dda3748d7d836ec79705d825814 Mon Sep 17 00:00:00 2001 From: luying Date: Fri, 4 Mar 2022 16:06:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A6=E5=B0=86=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=B6=88=E8=80=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/roleService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/game-server/app/services/roleService.ts b/game-server/app/services/roleService.ts index 66d362386..ae84f99fe 100644 --- a/game-server/app/services/roleService.ts +++ b/game-server/app/services/roleService.ts @@ -154,6 +154,7 @@ export function getInitHeroById(hid: number) { } export function addConsumeToHero(oldConsume: Reward[] = [], consumes: ItemInter[] = []) { + if(!oldConsume) oldConsume = []; let consumeMap = new Map(); for(let { id, count = 1 } of consumes) { consumeMap.set(id, count);