public static void Cast(this SummonerSpell spell, Vector3 position, Obj_AI_Hero sender = null) { if (sender == null) { sender = ObjectManager.Player; } sender.Spellbook.CastSpell(spell.GetSlot(sender), position); }
// ReSharper disable once MethodOverloadWithOptionalParameter public static void Cast(this SummonerSpell spell, Obj_AI_Hero target, Obj_AI_Hero sender = null) { if (sender == null) { sender = ObjectManager.Player; } sender.Spellbook.CastSpell(spell.GetSlot(sender), target); }
public static void Cast(this SummonerSpell spell, Obj_AI_Hero target) { ObjectManager.Player.Spellbook.CastSpell(spell.GetSlot(ObjectManager.Player), target); }
public static SpellDataInst GetSpell(this SummonerSpell spell, Obj_AI_Hero sender = null) { var slot = spell.GetSlot(sender ?? ObjectManager.Player); return(slot == SpellSlot.Unknown ? null : (sender ?? ObjectManager.Player).Spellbook.GetSpell(slot)); }
public static bool Exists(this SummonerSpell spell, Obj_AI_Hero sender = null) { return(spell.GetSlot(sender ?? ObjectManager.Player) != SpellSlot.Unknown); }
public static bool IsReady(this SummonerSpell spell, Obj_AI_Hero sender = null) { return(spell.GetSlot(sender ?? ObjectManager.Player) != SpellSlot.Unknown && spell.GetSlot(sender ?? ObjectManager.Player).IsReady()); }