Adds support for new evolution helper functions
parent
3b25f8b415
commit
dc79ed6e46
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using PkmnLibSharp.Library.Evolution;
|
||||
using PkmnLibSharp.Utilities;
|
||||
|
||||
namespace PkmnLibSharp.Battling
|
||||
{
|
||||
public class EvolutionScript : PointerWrapper
|
||||
{
|
||||
internal EvolutionScript(IntPtr script) : base(script)
|
||||
{
|
||||
}
|
||||
|
||||
public bool DoesEvolveFromLevelUp(EvolutionData data, Pokemon pokemon)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
byte b = 0;
|
||||
var bPtr = new IntPtr(&b);
|
||||
Pkmnlib.Generated.EvolutionScript.DoesEvolveFromLevelUp(Ptr, data.Ptr, pokemon.Ptr, bPtr).Assert();
|
||||
return b == 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override void DeletePtr()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
namespace PkmnLibSharp.Battling
|
||||
{
|
||||
public enum ScriptCategory
|
||||
{
|
||||
Attack = 0,
|
||||
Talent = 1,
|
||||
Status = 2,
|
||||
Creature = 3,
|
||||
Battle = 4,
|
||||
Side = 5,
|
||||
Weather = 128,
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
// AUTOMATICALLY GENERATED, DO NOT EDIT
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Pkmnlib.Generated
|
||||
{
|
||||
internal static class EvolutionScript
|
||||
{
|
||||
/// <param name="script">EvolutionScript *</param>
|
||||
/// <param name="evoData">const EvolutionData *</param>
|
||||
/// <param name="pokemon">const Pokemon *</param>
|
||||
/// <param name="out">bool *</param>
|
||||
/// <returns>unsigned char</returns>
|
||||
[DllImport("libpkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_EvolutionScript_DoesEvolveFromLevelUp")]
|
||||
internal static extern byte DoesEvolveFromLevelUp(IntPtr script, IntPtr evoData, IntPtr pokemon, IntPtr @out);
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue