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: //增加金币