From a231d3545311d317b612bc7b2aba48887c75ca5d Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 20 Nov 2024 17:43:51 +0800 Subject: [PATCH] 1 --- server/wheelserver/api/v1/activity/activity.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/wheelserver/api/v1/activity/activity.go b/server/wheelserver/api/v1/activity/activity.go index 39d51538..bf6111d5 100644 --- a/server/wheelserver/api/v1/activity/activity.go +++ b/server/wheelserver/api/v1/activity/activity.go @@ -66,6 +66,9 @@ func (this *ActivityApi) RollDice(c *gin.Context) { Point int32 `json:"point"` }{} rspObj.Point = int32(1 + rand.Intn(6)) + if reqJson.ForwardPoint > 0 { + rspObj.Point = reqJson.ForwardPoint + } rspObj.GetOrCreateAward().AddItem(constant.VIRTUAL_ITEM_SCORE, score) rspObj.GetOrCreateSideEffect().GetOrCreateUser().FromModel(user) c.JSON(200, rspObj)