Hello, WRobot method "IsSpellUsable" check if spell is not gray in action bar (mana, cooldown, usable on target, ...: https://wow.gamepedia.com/API_IsUsableSpell and https://wow.gamepedia.com/API_GetSpellCooldown ).
if it is not a spell at cast on self, you need to check if target is in "line of sight" and target distance:
var notInLineOfSight = TraceLine.TraceLineGo(ObjectManager.ObjectManager.Target.Position);
var isGoodDistance = spell.IsDistanceGood;