This commit is contained in:
@@ -125,7 +125,7 @@ func (h Controller) TogglePetBagWarehouse(
|
||||
if ok {
|
||||
// ========== 新增:index合法性校验 ==========
|
||||
if index < 0 || index >= len(player.Info.PetList) {
|
||||
return result, errorcode.ErrorCodes.ErrSystemError
|
||||
return result, errorcode.ErrorCodes.ErrPokemonIDMismatch
|
||||
}
|
||||
player.Service.Pet.UPdate(*pet)
|
||||
|
||||
@@ -142,7 +142,7 @@ func (h Controller) TogglePetBagWarehouse(
|
||||
if !ok {
|
||||
r := player.Service.Pet.PetInfo_One(data.CatchTime)
|
||||
if r == nil {
|
||||
return result, errorcode.ErrorCodes.ErrSystemError
|
||||
return result, errorcode.ErrorCodes.ErrPokemonNotExists
|
||||
}
|
||||
player.Info.PetList = append(player.Info.PetList, r.Data)
|
||||
result.PetInfo = r.Data
|
||||
|
||||
Reference in New Issue
Block a user