diff --git a/PkmnLibSharp/Battling/PokemonParty.cs b/PkmnLibSharp/Battling/PokemonParty.cs index 8e17193..85c8e42 100644 --- a/PkmnLibSharp/Battling/PokemonParty.cs +++ b/PkmnLibSharp/Battling/PokemonParty.cs @@ -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); diff --git a/PkmnLibSharp/Generated/Creaturelib/CreatureParty.cs b/PkmnLibSharp/Generated/Creaturelib/CreatureParty.cs index 44a611c..7ca870a 100644 --- a/PkmnLibSharp/Generated/Creaturelib/CreatureParty.cs +++ b/PkmnLibSharp/Generated/Creaturelib/CreatureParty.cs @@ -41,12 +41,13 @@ namespace Creaturelib.Generated [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_PackParty")] internal static extern byte PackParty(IntPtr p); + /// Creature * & /// CreatureParty * /// long unsigned int /// Creature * - /// Creature * + /// unsigned char [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); /// const CreatureParty * /// bool