refactor: 优化蛋卡抽奖逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -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})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user