Files
bl/logic/controller/pet_barge.go
昔念 0ae65cee45
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
1
2026-04-24 17:22:25 +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[1]),
IsKilled: uint32(v.Results[0]),
})
}
return ret, 0
}