Support for finding a previous evolution of a Pokemon.
This commit is contained in:
@@ -54,6 +54,13 @@ namespace PkmnLibSharp.Library
|
||||
return species;
|
||||
}
|
||||
|
||||
public Species? FindPreEvolution(Species species)
|
||||
{
|
||||
var ptr = Pkmnlib.Generated.SpeciesLibrary.FindPreEvolution(Ptr, species.Ptr);
|
||||
if (ptr == IntPtr.Zero) return null;
|
||||
return TryResolvePointer(ptr, out Species? prevoSpecies) ? prevoSpecies : new Species(ptr);
|
||||
}
|
||||
|
||||
public IEnumerable<Species> GetEnumerator()
|
||||
{
|
||||
var count = Creaturelib.Generated.SpeciesLibrary.GetCount(Ptr);
|
||||
|
||||
Reference in New Issue
Block a user