コード例 #1
0
        static SummonerManager()
        {
            try
            {
                // ReSharper disable once StringLiteralTypo
                BlueSmite = new SummonerSpell
                {
                    Name = "s5_summonersmiteplayerganker",
                    CastType = CastType.Target,
                    Range = 750f
                };
                RedSmite = new SummonerSpell
                {
                    Name = "s5_summonersmiteSingle",
                    CastType = CastType.Target,
                    Range = 750f
                };
                Ghost = new SummonerSpell { Name = "SummonerHaste", CastType = CastType.Self, Range = float.MaxValue };
                Clarity = new SummonerSpell { Name = "SummonerMana", CastType = CastType.Self, Range = 600f };
                Heal = new SummonerSpell { Name = "SummonerHeal", CastType = CastType.Self, Range = 850f };
                Barrier = new SummonerSpell
                {
                    Name = "SummonerBarrier",
                    CastType = CastType.Self,
                    Range = float.MaxValue
                };
                Exhaust = new SummonerSpell { Name = "SummonerExhaust", CastType = CastType.Target, Range = 650f };
                Cleanse = new SummonerSpell { Name = "SummonerBoost", CastType = CastType.Self, Range = float.MaxValue };
                Flash = new SummonerSpell { Name = "SummonerFlash", CastType = CastType.Position, Range = 425f };
                Ignite = new SummonerSpell { Name = "SummonerDot", CastType = CastType.Target, Range = 600f };
                Smite = new SummonerSpell { Name = "SummonerSmite", CastType = CastType.Target, Range = 750f };

                SummonerSpells = new List<SummonerSpell>
                {
                    Ghost,
                    Clarity,
                    Heal,
                    Barrier,
                    Exhaust,
                    Cleanse,
                    Flash,
                    Ignite,
                    Smite,
                    BlueSmite,
                    RedSmite
                };

                MaxRange = SummonerSpells.Max(s => s.Range);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
コード例 #2
0
 public static void Cast(this SummonerSpell spell, Vector3 position)
 {
     ObjectManager.Player.Spellbook.CastSpell(spell.Slot, position);
 }
コード例 #3
0
        static SummonerManager()
        {
            try
            {
                // ReSharper disable once StringLiteralTypo
                BlueSmite = new SummonerSpell
                {
                    Name     = "s5_summonersmiteplayerganker",
                    CastType = CastType.Target,
                    Range    = 750f
                };
                RedSmite = new SummonerSpell {
                    Name = "s5_summonersmiteduel", CastType = CastType.Target, Range = 750f
                };
                Ghost = new SummonerSpell {
                    Name = "SummonerHaste", CastType = CastType.Self, Range = float.MaxValue
                };
                Clarity = new SummonerSpell {
                    Name = "SummonerMana", CastType = CastType.Self, Range = 600f
                };
                Heal = new SummonerSpell {
                    Name = "SummonerHeal", CastType = CastType.Self, Range = 850f
                };
                Barrier = new SummonerSpell
                {
                    Name     = "SummonerBarrier",
                    CastType = CastType.Self,
                    Range    = float.MaxValue
                };
                Exhaust = new SummonerSpell {
                    Name = "SummonerExhaust", CastType = CastType.Target, Range = 650f
                };
                Cleanse = new SummonerSpell {
                    Name = "SummonerBoost", CastType = CastType.Self, Range = float.MaxValue
                };
                Flash = new SummonerSpell {
                    Name = "SummonerFlash", CastType = CastType.Position, Range = 425f
                };
                Ignite = new SummonerSpell {
                    Name = "SummonerDot", CastType = CastType.Target, Range = 600f
                };
                Smite = new SummonerSpell {
                    Name = "SummonerSmite", CastType = CastType.Target, Range = 750f
                };

                SummonerSpells = new List <SummonerSpell>
                {
                    Ghost,
                    Clarity,
                    Heal,
                    Barrier,
                    Exhaust,
                    Cleanse,
                    Flash,
                    Ignite,
                    Smite,
                    BlueSmite,
                    RedSmite
                };

                MaxRange = SummonerSpells.Max(s => s.Range);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
コード例 #4
0
 public static void Cast(this SummonerSpell spell)
 {
     ObjectManager.Player.Spellbook.CastSpell(spell.Slot);
 }
コード例 #5
0
 public static void Cast(this SummonerSpell spell, Obj_AI_Hero target)
 {
     ObjectManager.Player.Spellbook.CastSpell(spell.Slot, target);
 }
コード例 #6
0
 public static bool IsReady(this SummonerSpell spell)
 {
     return(spell.Slot != SpellSlot.Unknown && spell.Slot.IsReady());
 }
コード例 #7
0
 public static bool Exists(this SummonerSpell spell)
 {
     return(spell.Slot != SpellSlot.Unknown);
 }
コード例 #8
0
 public static void Cast(this SummonerSpell spell, Vector3 position, Obj_AI_Hero sender = null)
 {
     (sender ?? ObjectManager.Player).Spellbook.CastSpell(
         spell.GetSlot(sender ?? ObjectManager.Player), position);
 }
コード例 #9
0
 // ReSharper disable once MethodOverloadWithOptionalParameter
 public static void Cast(this SummonerSpell spell, Obj_AI_Hero target, Obj_AI_Hero sender = null)
 {
     (sender ?? ObjectManager.Player).Spellbook.CastSpell(spell.GetSlot(sender ?? ObjectManager.Player), target);
 }
コード例 #10
0
        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));
        }
コード例 #11
0
 public static bool Exists(this SummonerSpell spell, Obj_AI_Hero sender = null)
 {
     return(spell.GetSlot(sender ?? ObjectManager.Player) != SpellSlot.Unknown);
 }
コード例 #12
0
 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());
 }