Dont lose references to libraries

This commit is contained in:
2020-09-04 21:01:18 +02:00
parent 471c082527
commit ce54b8c2c2
2 changed files with 15 additions and 1 deletions

View File

@@ -115,7 +115,7 @@ namespace PkmnLibSharp.Library
}
internal PokemonLibrary(IntPtr ptr) : base(ptr)
public PokemonLibrary(IntPtr ptr) : base(ptr)
{
}
@@ -127,6 +127,13 @@ namespace PkmnLibSharp.Library
Pkmnlib.Generated.PokemonLibrary.Construct(ref ptr, settings.Ptr, species.Ptr, moves.Ptr, items.Ptr,
growthRates.Ptr, types.Ptr, natures.Ptr).Assert();
Initialize(ptr);
_settings = settings;
_species = species;
_moves = moves;
_items = items;
_growthRateLibrary = growthRates;
_typeLibrary = types;
_natureLibrary = natures;
}
protected override void DeletePtr()