Support for getting a species by ID
This commit is contained in:
@@ -54,6 +54,17 @@ namespace PkmnLibSharp.Library
|
||||
return species;
|
||||
}
|
||||
|
||||
public Species GetById(ushort id)
|
||||
{
|
||||
var ptr = Creaturelib.Generated.SpeciesLibrary.GetById(Ptr, id);
|
||||
if (TryResolvePointer(ptr, out Species? s))
|
||||
{
|
||||
return s!;
|
||||
}
|
||||
s = new Species(ptr);
|
||||
return s;
|
||||
}
|
||||
|
||||
public Species? FindPreEvolution(Species species)
|
||||
{
|
||||
var ptr = Pkmnlib.Generated.SpeciesLibrary.FindPreEvolution(Ptr, species.Ptr);
|
||||
|
||||
Reference in New Issue
Block a user