public DebugSpellCasting(FFACE fface) { InitializeComponent(); this._fface = fface; this._XITools = XITools.GetInstance(fface); this.DataContext = new CastingViewModel(fface); }
/// <summary> /// Casts spell using spell name /// </summary> /// <returns></returns> public bool CastSpell() { bool success = false; var ability = _ftools.AbilityService.CreateAbility(_spellName); if (ability.IsValidName) { bool valid = XITools.GetInstance(_fface).AbilityExecutor.IsActionValid(ability); success = _ftools.AbilityExecutor.UseAbility(ability, Constants.SPELL_CAST_LATENCY, Constants.GLOBAL_SPELL_COOLDOWN); } return(success); }