diff --git a/game-server/app/services/rewardService.ts b/game-server/app/services/rewardService.ts index fa99af4fa..048853178 100644 --- a/game-server/app/services/rewardService.ts +++ b/game-server/app/services/rewardService.ts @@ -160,7 +160,11 @@ export async function addItems(roleId: string, roleName: string, sid: string, go function sortItems (goods: Array, bags: Array, skins: Array, currencysMap: any, equips: Array, showItems: Array) { for (let good of goods) { let goodInfo = gameData.goods.get(good.id); - console.error('无道具', good.id); + // 道具不存在时先跳过 + if (!goodInfo) { + console.log('sortItems 道具不存在:', good.id); + continue; + } let {type, table, isCurrency} = ITID.get(goodInfo.itid); if(table == ITEM_TABLE.EQUIP) {