1
This commit is contained in:
parent
35b8c1a72d
commit
a231d35453
@ -66,6 +66,9 @@ func (this *ActivityApi) RollDice(c *gin.Context) {
|
|||||||
Point int32 `json:"point"`
|
Point int32 `json:"point"`
|
||||||
}{}
|
}{}
|
||||||
rspObj.Point = int32(1 + rand.Intn(6))
|
rspObj.Point = int32(1 + rand.Intn(6))
|
||||||
|
if reqJson.ForwardPoint > 0 {
|
||||||
|
rspObj.Point = reqJson.ForwardPoint
|
||||||
|
}
|
||||||
rspObj.GetOrCreateAward().AddItem(constant.VIRTUAL_ITEM_SCORE, score)
|
rspObj.GetOrCreateAward().AddItem(constant.VIRTUAL_ITEM_SCORE, score)
|
||||||
rspObj.GetOrCreateSideEffect().GetOrCreateUser().FromModel(user)
|
rspObj.GetOrCreateSideEffect().GetOrCreateUser().FromModel(user)
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user