This commit is contained in:
昔念
2026-02-10 10:49:01 +08:00
parent 89645c0f4c
commit c790b68d47
5 changed files with 44 additions and 7 deletions

View File

@@ -21,7 +21,13 @@ func (h Controller) EggGamePlay(data1 *egg.C2S_EGG_GAME_PLAY, c *player.Player)
data1.EggNum = 10
}
r := c.Service.Item.CheakItem(400501)
if r < int32(data1.EggNum) {
if data1.EggNum > 10 || data1.EggNum <= 0 {
}
if r < 0 {
return nil, errorcode.ErrorCode(errorcode.ErrorCodes.ErrGachaTicketsInsufficient)
}
if data1.EggNum > uint32(r) {
return nil, errorcode.ErrorCode(errorcode.ErrorCodes.ErrGachaTicketsInsufficient)
}