From d17992a6f1452036d0bf67ffc3d793120629eec9 Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Tue, 9 Dec 2025 17:28:30 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=8C=AB=E8=8D=89=E5=A4=A7=E4=BD=9C?= =?UTF-8?q?=E6=88=98=E3=80=91-=E9=A2=86=E5=A5=96=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/mod/catnip/Catnip.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/game/mod/catnip/Catnip.go b/src/server/game/mod/catnip/Catnip.go index 907feb48..f77bb81b 100644 --- a/src/server/game/mod/catnip/Catnip.go +++ b/src/server/game/mod/catnip/Catnip.go @@ -191,7 +191,11 @@ func (c *CatnipMod) Reward(Id, Progress int) ([]*item.Item, *CatnipGame, error) return nil, nil, fmt.Errorf("reward for progress %d has already been claimed in game ID %d", Progress, Id) } GameInfo.Reward = append(GameInfo.Reward, Progress) - return catnipCfg.GetProgressReward(c.Id, Progress), GameInfo, nil + Items := catnipCfg.GetProgressReward(c.Id, Progress) + if Items == nil { + return nil, nil, fmt.Errorf("no reward found for progress %d in game ID %d", Progress, Id) + } + return Items, GameInfo, nil } func (c *CatnipMod) GrandReward() ([]*item.Item, error) {