Adds setter to IsEgg

This commit is contained in:
Deukhoofd committed 2021-06-27 12:24:11 +02:00
1 parent 74bd383093
commit 3b25f8b415
2 files changed
+11 -1

No files matched your search

+5 -1
View File
@@ -202,7 +202,11 @@ namespace PkmnLibSharp.Battling
} }
} }
public bool IsEgg => Pkmnlib.Generated.Pokemon.IsEgg(Ptr) == 1; public bool IsEgg
{
get => Pkmnlib.Generated.Pokemon.IsEgg(Ptr) == 1;
set => Pkmnlib.Generated.Pokemon.SetIsEgg(Ptr, value.ToNative());
}
public ReadOnlyNativePtrArray<LearnedMove> Moves public ReadOnlyNativePtrArray<LearnedMove> Moves
{ {
@@ -119,6 +119,12 @@ namespace Pkmnlib.Generated
[DllImport("libpkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_IsEgg")] [DllImport("libpkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_IsEgg")]
internal static extern byte IsEgg(IntPtr p); internal static extern byte IsEgg(IntPtr p);
/// <param name="p">Pokemon *</param>
/// <param name="value">bool</param>
/// <returns>void</returns>
[DllImport("libpkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_SetIsEgg")]
internal static extern void SetIsEgg(IntPtr p, byte value);
/// <param name="p">Pokemon *</param> /// <param name="p">Pokemon *</param>
/// <param name="species">const PokemonSpecies *</param> /// <param name="species">const PokemonSpecies *</param>
/// <param name="forme">const PokemonForme *</param> /// <param name="forme">const PokemonForme *</param>