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