25 lines
716 B
C#
25 lines
716 B
C#
|
using System;
|
||
|
using Creaturelibbattling;
|
||
|
using Creaturelibbattling.Generated;
|
||
|
using PkmnLibSharp.Library.Moves;
|
||
|
using PkmnLibSharp.Utilities;
|
||
|
|
||
|
namespace PkmnLibSharp.Battling
|
||
|
{
|
||
|
public class LearnedMove : PointerWrapper
|
||
|
{
|
||
|
internal LearnedMove(IntPtr ptr) : base(ptr){}
|
||
|
|
||
|
public static LearnedMove Create(MoveData move, byte maxUses, MoveLearnMethod learnMethod)
|
||
|
{
|
||
|
var ptr = IntPtr.Zero;
|
||
|
LearnedAttack.Construct(ref ptr, move.Ptr, maxUses, (AttackLearnMethod) learnMethod).Assert();
|
||
|
return new LearnedMove(ptr);
|
||
|
}
|
||
|
|
||
|
protected override void DeletePtr()
|
||
|
{
|
||
|
LearnedAttack.Destruct(Ptr);
|
||
|
}
|
||
|
}
|
||
|
}
|