public static bool TryToCast(this Spell.Active spell, Obj_AI_Base target, Menu m) { if (target == null) { return(false); } return(target.CanCast(spell, m) && spell.Cast()); }
public static bool TryToCast(this Spell.Skillshot spell, Obj_AI_Base target, Menu m, int percent = 75) { if (target == null) { return(false); } return(target.CanCast(spell, m, percent) && spell.Cast(target)); }
/// <summary> /// It will only cast the spell if it can /// </summary> /// <param name="spell">Active Spell</param> /// <param name="target">Target to cast the spell</param> public static bool TryCast(this Spell.Ranged spell, Obj_AI_Base target) { if (spell != null) { if (target.CanCast(spell)) { return(spell.Cast(target)); } } return(false); }
/// <summary> /// It will only cast the spell if it can /// </summary> /// <param name="spell">Active Spell</param> /// <param name="target">Target to cast the spell</param> public static bool TryCast(this Spell.SpellBase spell, Obj_AI_Base target) { if (spell != null) { var spellSlot = spell.Slot.ToString()[spell.Slot.ToString().Length - 1]; if (target.CanCast(spell) && !OKTR_Core.OKTRSpellTargetSelectorMenu.GetCheckBoxValue(OKTR_Core.OKTRSpellTargetSelectorMenuID + spellSlot + target.BaseSkinName)) { return(spell.Cast(target)); } } return(false); }
public static bool CanCast(this Obj_AI_Base target, Spell.Targeted spell, Menu m) { var asBase = spell as Spell.SpellBase; return(target.CanCast(asBase, m)); }
public static bool CanCast(this Obj_AI_Base target, Spell.Ranged spell) { var asBase = spell as Spell.SpellBase; return(target.CanCast(asBase)); }
public static bool TryToCast(this Spell.Ranged spell, Obj_AI_Base target, Menu m) { if (target == null) return false; return target.CanCast(spell, m) && spell.Cast(target); }
public static bool TryToCast(this Spell.Skillshot spell, Obj_AI_Base target, Menu m, int percent = 75) { if (target == null) return false; return target.CanCast(spell, m, percent) && spell.Cast(target); }