This commit is contained in:
@@ -19,20 +19,13 @@ func (h Controller) SavePetBagOrder(
|
||||
return nil, 0
|
||||
}
|
||||
|
||||
// PetRetrieveFromWarehouse 领回仓库精灵
|
||||
// PetRetrieveFromWarehouse 从放生仓库领回精灵
|
||||
func (h Controller) PetRetrieveFromWarehouse(
|
||||
data *PET_RETRIEVE, player *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
|
||||
if _, ok := player.FindPetBagSlot(data.CatchTime); ok {
|
||||
return nil, 0
|
||||
if !player.Service.Pet.UpdateFree(data.CatchTime, 1, 0) {
|
||||
return nil, errorcode.ErrorCodes.ErrPokemonIDMismatch
|
||||
}
|
||||
|
||||
petInfo := player.Service.Pet.PetInfoOneByCatchTime(data.CatchTime)
|
||||
if petInfo == nil {
|
||||
return nil, 0
|
||||
}
|
||||
|
||||
player.AddPetToAvailableBag(petInfo.Data)
|
||||
|
||||
return nil, 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user