public int pbStorePokemon(Combat.Trainer player, Monster.Pokemon pokemon) { if (player.party.GetCount() < 6) { player.party[player.party.GetCount()] = pokemon; return(-1); } else { pokemon.Heal(); //int oldcurbox=Game.GameData.PokemonStorage.currentBox; //int storedbox=Game.GameData.PokemonStorage.pbStoreCaught(pokemon); int oldcurbox = Game.GameData.Player.PC.ActiveBox; int?storedbox = Game.GameData.Player.PC.getIndexOfFirstEmpty(); //if (storedbox<0) { if (!storedbox.HasValue) { //Game.UI.pbDisplayPaused(Game._INTL("Can't catch any more...")); return(oldcurbox); } else { return(storedbox.Value); } } }
public int pbStorePokemon(Combat.Trainer player, Monster.Pokemon pokemon) { if (player.party.GetCount() < 6) { player.party[player.party.GetCount()] = pokemon; } return(-1); }