Exemple #1
0
        static Draven()
        {
            Q = new Spell.Active(SpellSlot.Q);
            W = new Spell.Active(SpellSlot.W);
            E = new Spell.Skillshot(SpellSlot.E, 950, SkillShotType.Linear, 250, 1400, 130)
            {
                AllowedCollisionCount = -1
            };
            R = new Spell.Skillshot(SpellSlot.R, 30000, SkillShotType.Linear, 500, 2000, 160)
            {
                AllowedCollisionCount = int.MaxValue
            };

            ColorPicker    = new ColorPicker[2];
            ColorPicker[0] = new ColorPicker("DravenE", new ColorBGRA(114, 171, 160, 255));
            ColorPicker[1] = new ColorPicker("DravenCatchRange", new ColorBGRA(231, 237, 160, 255));

            Text = new Text("", new Font("calibri", 15, FontStyle.Regular));

            Game.OnTick            += Game_OnTick;
            GameObject.OnCreate    += GameObject_OnCreate;
            GameObject.OnDelete    += GameObject_OnDelete;
            Orbwalker.OnPreAttack  += Orbwalker_OnPreAttack;
            Orbwalker.OnPostAttack += Orbwalker_OnPostAttack;
        }
Exemple #2
0
        static Ashe()
        {
            Q = new Spell.Active(SpellSlot.Q);
            W = new Spell.Skillshot(SpellSlot.W, 1250, SkillShotType.Cone)
            {
                AllowedCollisionCount = 0,
                CastDelay             = 250,
                ConeAngleDegrees      = (int)(Math.PI / 180 * 40),
                Speed = 1500,
                Range = 1250,
                Width = 20
            };
            E = new Spell.Skillshot(SpellSlot.E, 30000, SkillShotType.Linear);
            R = new Spell.Skillshot(SpellSlot.R, 30000, SkillShotType.Linear, 250, 1600, 130)
            {
                AllowedCollisionCount = 0
            };

            CachedWPrediction             = StaticCacheProvider.Cache.Resolve <CustomCache <int, PredictionResult> >();
            CachedWPrediction.RefreshRate = 500;

            ColorPicker = new ColorPicker[2];

            ColorPicker[0] = new ColorPicker("AsheW", new ColorBGRA(10, 106, 138, 255));
            ColorPicker[1] = new ColorPicker("AsheR", new ColorBGRA(177, 67, 191, 255));

            ChampionTracker.Initialize(ChampionTrackerFlags.VisibilityTracker);

            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (sender.IsMe && args.Slot == SpellSlot.Q)
                {
                    Orbwalker.ResetAutoAttack();
                }
            };

            Orbwalker.OnPreAttack  += (a, b) => IsPreAttack = true;
            Orbwalker.OnPostAttack += (a, b) => { IsPreAttack = false; IsAfterAttack = true; };
            Game.OnPostTick        += args => IsAfterAttack = false;
        }