refactor: 优化蛋卡抽奖逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-24 01:52:56 +08:00
committed by cnb
parent 0aba7e7ccb
commit b3cc06cd38
3 changed files with 8 additions and 13 deletions

View File

@@ -46,11 +46,9 @@ func (h Controller) EggGamePlay(data1 *C2S_EGG_GAME_PLAY, c *player.Player) (res
result.PetID = newPet.ID
}
items := service.NewItemService().GetEgg(data1.EggNum)
items := service.NewItemService().GetEgg(int(data1.EggNum))
for _, item := range items {
if item.ItemId == 0 {
continue
}
c.ItemAdd(item.ItemId, item.ItemCnt)
result.ListInfo = append(result.ListInfo, data.ItemInfo{ItemId: item.ItemId, ItemCnt: item.ItemCnt})
}