From 86ba780a402253463adf0c631216ad9c366fd2f3 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 30 Jul 2024 09:25:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=81=93=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/bagmgr.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worldsrv/bagmgr.go b/worldsrv/bagmgr.go index d865f71..b3b162a 100644 --- a/worldsrv/bagmgr.go +++ b/worldsrv/bagmgr.go @@ -190,6 +190,9 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int continue } item := srvdata.GameItemMgr.Get(p.Platform, v.ItemId) + if item == nil { + continue + } switch item.Type { case common.ItemTypeCoin: //增加金币