From 012a47c78a05cccdf59d5f5154a3fd9e11c4eb9f Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 15 May 2022 13:48:41 +0200 Subject: [PATCH] Fixes MoveTurnChoice creating potential invalid types. --- PkmnLibSharp/Battling/ChoiceTurn/MoveTurnChoice.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PkmnLibSharp/Battling/ChoiceTurn/MoveTurnChoice.cs b/PkmnLibSharp/Battling/ChoiceTurn/MoveTurnChoice.cs index 19edfa7..ecc1cc9 100644 --- a/PkmnLibSharp/Battling/ChoiceTurn/MoveTurnChoice.cs +++ b/PkmnLibSharp/Battling/ChoiceTurn/MoveTurnChoice.cs @@ -20,7 +20,7 @@ namespace PkmnLibSharp.Battling.ChoiceTurn var ptr = Creaturelib.Generated.AttackTurnChoice.GetAttack(Ptr); if (TryResolvePointer(ptr, out _move)) return _move!; - _move = new LearnedMove(ptr); + _move = Constructor.Active.ConstructLearnedMove(ptr)!; return _move; } }