28 lines
715 B
Go
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
|
|
}
|