// ------------------------------------------------------------------------------- // PlayerCastSpell (Post Selection) // ------------------------------------------------------------------------------- public void PlayerCastSpell(InstanceSkill instance, CharacterBase[] targets) { Finder.ui.ActivateBattleCommands(false); if (targets != null) { Finder.ui.PopState(); Finder.ui.ActivateBattleCommands(false); if (currentCharacter.CommandCastSpell(instance, targets)) { if (instance.template.getCharacterActionType == CharacterActionType.PlayerExitBattle) { ForceEndBattle(); } else { currentCharacter.BattleTurnFinished = true; } } } else { PlayerCancel(); } }