```
feat(game): 添加蛋类游戏道具检查和闪光配置删除保护 - 在蛋类游戏玩法中添加道具数量检查,确保玩家拥有足够的道具 - 防止道具不足时的游戏错误 - 为闪光配置服务添加删除方法的保护,避免意外删除操作 ```
This commit is contained in:
@@ -20,6 +20,11 @@ func (h Controller) EggGamePlay(data1 *egg.C2S_EGG_GAME_PLAY, c *player.Player)
|
||||
case 3:
|
||||
data1.EggNum = 10
|
||||
}
|
||||
r := c.Service.Item.CheakItem(400501)
|
||||
if r < data1.EggNum {
|
||||
return nil, errorcode.ErrorCode(errorcode.ErrorCodes.ErrSystemError)
|
||||
|
||||
}
|
||||
result = &egg.S2C_EGG_GAME_PLAY{ListInfo: []data.ItemInfo{}}
|
||||
if grand.Meet(int(data1.EggNum), 100) {
|
||||
r := service.NewPetRewardService().GetEgg()
|
||||
|
||||
Reference in New Issue
Block a user