Refactor move selection prevention to use interface
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user