Update CreatureLib
This commit is contained in:
parent
ba9333ebb7
commit
01fcbc1935
|
@ -34,7 +34,8 @@ namespace PkmnLibSharp.Battling
|
|||
|
||||
public Pokemon SwapInto(ulong indexA, Pokemon pokemon)
|
||||
{
|
||||
var ptr = Creaturelib.Generated.CreatureParty.SwapInto(Ptr, indexA, pokemon.Ptr);
|
||||
var ptr = IntPtr.Zero;
|
||||
Creaturelib.Generated.CreatureParty.SwapInto(ref ptr, Ptr, indexA, pokemon.Ptr).Assert();
|
||||
if (TryResolvePointer(ptr, out Pokemon? newPokemon))
|
||||
return newPokemon!;
|
||||
return new Pokemon(ptr);
|
||||
|
|
|
@ -41,12 +41,13 @@ namespace Creaturelib.Generated
|
|||
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_PackParty")]
|
||||
internal static extern byte PackParty(IntPtr p);
|
||||
|
||||
/// <param name="out">Creature * &</param>
|
||||
/// <param name="p">CreatureParty *</param>
|
||||
/// <param name="index">long unsigned int</param>
|
||||
/// <param name="creature">Creature *</param>
|
||||
/// <returns>Creature *</returns>
|
||||
/// <returns>unsigned char</returns>
|
||||
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_SwapInto")]
|
||||
internal static extern IntPtr SwapInto(IntPtr p, ulong index, IntPtr creature);
|
||||
internal static extern byte SwapInto(ref IntPtr @out, IntPtr p, ulong index, IntPtr creature);
|
||||
|
||||
/// <param name="p">const CreatureParty *</param>
|
||||
/// <returns>bool</returns>
|
||||
|
|
Loading…
Reference in New Issue