Refactor move selection prevention to use interface

This commit is contained in:
Deukhoofd committed 2025-06-28 10:36:43 +02:00
1 parent 04cf585f5a
commit 2319160b52
12 files changed
+59 -27

No files matched your search

+2 -1
View File
@@ -331,7 +331,8 @@ public class BattleImpl : ScriptSource, IBattle
moveChoice.ChosenMove.MoveData.Target, moveChoice.User))
return false;
var preventMove = false;
choice.RunScriptHook(script => script.PreventMoveSelection(moveChoice, ref preventMove));
choice.RunScriptHookInterface<IScriptPreventMoveSelection>(script =>
script.PreventMoveSelection(moveChoice, ref preventMove));
if (preventMove)
return false;
}