From 18b0eb88b14d2b56d93d95a49f585354ca8e16d2 Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:44:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dplayroom=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E5=A5=96=E5=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/PlayerFunc.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/server/game/PlayerFunc.go b/src/server/game/PlayerFunc.go index 33f787a2..f95d4eb7 100644 --- a/src/server/game/PlayerFunc.go +++ b/src/server/game/PlayerFunc.go @@ -1118,15 +1118,14 @@ func (p *Player) GetPlayroomGameReward(Type, SelectId int) []*item.Item { BaseMod := p.PlayMod.getBaseMod() Level := BaseMod.GetLevel() Items := make([]*item.Item, 0) - if Type == playroom.GAME_RESULT_LOSE { + switch Type { + case playroom.GAME_RESULT_LOSE: Items = append(Items, item.NewItem(item.ITEM_STAR_ID, 20)) - } - if Type == playroom.GAME_RESULT_LOW { + case playroom.GAME_RESULT_LOW: Items = append(Items, item.NewItem(item.ITEM_STAR_ID, Level*2)) - } - if Type == playroom.GAME_RESULT_MIDDLE { + case playroom.GAME_RESULT_MIDDLE: Items = append(Items, item.NewItem(item.ITEM_STAR_ID, Level*3)) - } else { + default: Items = PlayroomMod.SelectReward(SelectId) } return Items