1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-04-18 15:22:30 +08:00
parent 4abd179a23
commit 7844c5b76b
2 changed files with 50 additions and 12 deletions

View File

@@ -35,7 +35,12 @@ func (h Controller) CDK(data *C2S_GET_GIFT_COMPLETE, player *logicplayer.Player)
return nil, errorcode.ErrorCodes.ErrMolecularCodeGiftsGone
}
reward, grantErr := playerservice.NewCdkService(data.Head.UserID).GrantConfigReward(uint32(r.ID))
reward, grantErr := playerservice.NewCdkService(data.Head.UserID).GrantConfigReward(
uint32(r.ID),
func(itemID uint32, count int64) bool {
return player.ItemAdd(int64(itemID), count)
},
)
if grantErr != nil {
return nil, errorcode.ErrorCodes.ErrSystemError
}