Adds setter to IsEgg

This commit is contained in:
Deukhoofd 2021-06-27 12:24:11 +02:00
parent 74bd383093
commit 3b25f8b415
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 11 additions and 1 deletions

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
{ {

View File

@ -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>