Files
bl/logic/controller/pet_barge.go
xinian 6510e4e09b
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重构入参类型引用
2026-04-05 07:24:36 +08:00

28 lines
715 B
Go

package controller
import (
"blazing/common/socket/errorcode"
"blazing/logic/service/pet"
"blazing/logic/service/player"
)
// GetPetBargeList 精灵图鉴
func (h Controller) GetPetBargeList(data *PetBargeListInboundInfo, player *player.Player) (result *pet.PetBargeListOutboundInfo, err errorcode.ErrorCode) {
ret := &pet.PetBargeListOutboundInfo{
PetBargeList: make([]pet.PetBargeListInfo, 0),
}
r := player.Service.Done.PetBarge(data.StartPetId, data.EndPetId)
for _, v := range r {
ret.PetBargeList = append(ret.PetBargeList, pet.PetBargeListInfo{
PetId: uint32(v.Args[0]),
EnCntCnt: 1,
IsCatched: uint32(v.Results[0]),
IsKilled: uint32(v.Results[1]),
})
}
return ret, 0
}