This commit is contained in:
@@ -85,18 +85,17 @@ func (h Controller) PlayerShowPet(
|
||||
return
|
||||
}
|
||||
|
||||
// 仅允许仓库精灵展示:背包中的精灵直接拒绝
|
||||
if _, ok := player.FindPetBagSlot(data.CatchTime); ok {
|
||||
// 仅允许背包精灵跟随:仓库中的精灵不允许跟随
|
||||
slot, found := player.FindPetBagSlot(data.CatchTime)
|
||||
if !found {
|
||||
return nil, errorcode.ErrorCodes.ErrCannotShowBagPokemon
|
||||
}
|
||||
|
||||
ret := player.Service.Pet.PetInfoOneByCatchTime(data.CatchTime)
|
||||
if ret == nil {
|
||||
currentPet := slot.PetInfoPtr()
|
||||
if currentPet == nil {
|
||||
return nil, errorcode.ErrorCodes.ErrPokemonNotExists
|
||||
}
|
||||
|
||||
currentPet := &ret.Data
|
||||
|
||||
player.SetPetDisplay(data.Flag, currentPet)
|
||||
player.GetSpace().RefreshUserInfo(player)
|
||||
result = buildPetShowOutboundInfo(data.Head.UserID, data.Flag, currentPet)
|
||||
|
||||
Reference in New Issue
Block a user