HasSpell() public static method

Checks if the Player has the spell.
public static HasSpell ( string s ) : bool
s string The Spell Name
return bool
Esempio n. 1
0
        /// <summary>
        /// Called when the Game is finished loading
        /// </summary>
        /// <param name="args"></param>
        private static void Loading_OnLoadingComplete(System.EventArgs args)
        {
            if (Player.Instance.Hero != Champion.Leblanc)
            {
                return;
            }

            Q = new Spell.Targeted(SpellSlot.Q, 720);

            W = new Spell.Skillshot(SpellSlot.W, 600, SkillShotType.Circular, 0, 1450, 220)
            {
                AllowedCollisionCount = -1
            };

            WReturn = new Spell.Active(SpellSlot.W);

            RReturn = new Spell.Active(SpellSlot.R);

            E = new Spell.Skillshot(SpellSlot.E, 900, SkillShotType.Linear, 0, 1750, 55)
            {
                AllowedCollisionCount = 0
            };

            QUltimate = new Spell.Targeted(SpellSlot.R, 720);

            WUltimate = new Spell.Skillshot(SpellSlot.R, 600, SkillShotType.Circular, 0, 1450, 220)
            {
                AllowedCollisionCount = -1
            };

            EUltimate = new Spell.Skillshot(SpellSlot.R, 900, SkillShotType.Linear, 0, 1750, 55)
            {
                AllowedCollisionCount = 0
            };

            if (Extension.HasSpell("summonerdot"))
            {
                Ignite = new Spell.Targeted(ObjectManager.Player.GetSpellSlotFromName("summonerdot"), 600);
                Chat.Print("LelBlanc: Ignite Loaded", System.Drawing.Color.Red);
            }

            Chat.Print("LelBlanc: Addon Loaded", System.Drawing.Color.Blue);

            // Methods
            Config.Initialize();

            // Constructors
            Picker = new ColorPicker(Config.DrawingMenu, "draw_", System.Drawing.Color.FromArgb(255, 255, 0, 0),
                                     "Color Settings for Damage Indicator");
            Indicator = new DamageIndicator();

            // Events
            Game.OnUpdate                  += Game_OnUpdate;
            GameObject.OnCreate            += GameObject_OnCreate;
            GameObject.OnDelete            += GameObject_OnDelete;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            Obj_AI_Base.OnSpellCast        += Obj_AI_Base_OnSpellCast;
            Obj_AI_Base.OnNewPath          += Obj_AI_Base_OnNewPath;
            Drawing.OnDraw                 += OnDraw.DrawRange;
        }
Esempio n. 2
0
        /// <summary>
        /// Called when the Game is finished loading
        /// </summary>
        /// <param name="args"></param>
        private static void Loading_OnLoadingComplete(System.EventArgs args)
        {
            if (Player.Instance.Hero != Champion.Leblanc)
            {
                return;
            }

            Q = new Spell.Targeted(SpellSlot.Q, 700);

            W = new Spell.Skillshot(SpellSlot.W, 600, SkillShotType.Circular, 0, 1450, 250)
            {
                AllowedCollisionCount = -1
            };

            WReturn = new Spell.Active(SpellSlot.W);

            RReturn = new Spell.Active(SpellSlot.R);

            E = new Spell.Skillshot(SpellSlot.E, 950, SkillShotType.Linear, 0, 1750, 55)
            {
                AllowedCollisionCount = 0
            };

            QUltimate = new Spell.Targeted(SpellSlot.R, 700);

            WUltimate = new Spell.Skillshot(SpellSlot.R, 600, SkillShotType.Circular, 0, 1450, 250)
            {
                AllowedCollisionCount = -1
            };

            EUltimate = new Spell.Skillshot(SpellSlot.R, 950, SkillShotType.Linear, 0, 1750, 55)
            {
                AllowedCollisionCount = 0
            };

            if (Extension.HasSpell("summonerdot"))
            {
                Ignite = new Spell.Targeted(ObjectManager.Player.GetSpellSlotFromName("summonerdot"), 600);
                Chat.Print("LeBlanc: Ignite Loaded", System.Drawing.Color.Red);
            }

            Chat.Print("LeBlanc: Addon Loaded", System.Drawing.Color.Blue);

            // Methods
            Config.Initialize();

//            Indicator = new DamageIndicator();

            // Events
            Game.OnTick                    += Game_OnTick;
            GameObject.OnCreate            += GameObject_OnCreate;
            GameObject.OnDelete            += GameObject_OnDelete;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            Obj_AI_Base.OnNewPath          += Obj_AI_Base_OnNewPath;
            Drawing.OnDraw                 += OnDraw.DrawRange;

//            AIHeroClient.OnBuffGain += AIHeroClient_OnBuffGain;
//            AIHeroClient.OnBuffLose += AIHeroClient_OnBuffLose;
        }