示例#1
0
        static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            double incomingDmg = 0;

            if (sender.Type == GameObjectType.obj_AI_Hero && sender.IsEnemy && args.Target.Type == GameObjectType.obj_AI_Hero && args.Target.IsMe)
            {
                Obj_AI_Hero attacker = ObjectManager.Get <Obj_AI_Hero>().First(hero => hero.NetworkId == sender.NetworkId);
                Obj_AI_Hero attacked = ObjectManager.Get <Obj_AI_Hero>().First(hero => hero.NetworkId == args.Target.NetworkId);

                SpellDataInst spellData = attacker.Spellbook.Spells.FirstOrDefault(hero => args.SData.Name.Contains(hero.SData.Name));
                SpellSlot     spellSlot = spellData == null ? SpellSlot.Unknown : spellData.Slot;

                if (spellSlot == SpellSlot.Q || spellSlot == SpellSlot.W || spellSlot == SpellSlot.E || spellSlot == SpellSlot.R)
                {
                    incomingDmg = Damage.GetSpellDamage(attacker, attacked, spellSlot);
                }
            }
            else if (sender.Type == GameObjectType.obj_AI_Turret && sender.IsEnemy && args.Target.Type == GameObjectType.obj_AI_Hero && args.Target.IsMe)
            {
                incomingDmg = sender.BaseAttackDamage;
            }
            if (incomingDmg > 0)
            {
                UseDefensiveItemsIfInDanger(incomingDmg);
                SpellManager.UseHealIfInDanger(incomingDmg);
            }
        }
示例#2
0
        static void Game_OnGameUpdate(EventArgs args)
        {
            HealIfNeeded();
            SpellManager.IgniteIfPossible();
            SpellManager.UseHealIfInDanger(0);
            ItemManager.CleanseCC();

            switch (Config.Orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                ItemManager.UseOffensiveItems();
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                Harass();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                LaneClear();
                JungleClear();
                break;
            }
        }