Esempio n. 1
0
        private static void UnitOnOnLevelUp(Obj_AI_Base sender, CustomEvents.Unit.OnLevelUpEventArgs args)
        {
            if (!sender.IsValid || !sender.IsMe || _priority == null ||
                TotalLeveled() - _levelStrategy.LevelOneSkills == 0)
            {
                return;
            }

            foreach (SpellSlot spellSlot in _priority)
            {
                if (ObjectManager.Player.Spellbook.GetSpell(spellSlot).Level == 0 &&
                    args.NewLevel >= GetMinLevel(spellSlot) && args.NewLevel > _levelStrategy.MinimumLevel(spellSlot) &&
                    _levelStrategy.CanLevel(args.NewLevel, spellSlot))
                {
                    Level(spellSlot);
                    return;
                }
            }


            var sl = _activate.GetValue<StringList>();
            if (args.NewLevel >= Int32.Parse(sl.SList[sl.SelectedIndex]))
            {
                SpellSlot spellSlot = _levelStrategy.GetSpellSlotToLevel(args.NewLevel, _priority, false);
                if (spellSlot != SpellSlot.Unknown)
                {
                    Level(spellSlot);
                }
                else
                {
                    SpellSlot spellSlotIgnoreBaseLevel = _levelStrategy.GetSpellSlotToLevel(args.NewLevel, _priority, true);
                    if (spellSlotIgnoreBaseLevel != SpellSlot.Unknown)
                    {
                        Level(spellSlotIgnoreBaseLevel);
                    }
                }
            }
        }
Esempio n. 2
0
 private void onLevelUpEvent(Obj_AI_Base champ, CustomEvents.Unit.OnLevelUpEventArgs evt)
 {
     // se for eu que evolui de level
     if (champ.IsMe && Config.Item("autoUpSkill").GetValue<bool>())
     {
         int order = Config.Item("autoSkillOrder").GetValue<StringList>().SelectedIndex;
         masterYi.autoUpSkill(order, evt.NewLevel);
     }
 }
Esempio n. 3
0
 public void levelUp(Obj_AI_Base sender, CustomEvents.Unit.OnLevelUpEventArgs args)
 {
     if (sender.NetworkId == player.NetworkId)
     {
             sBook.LevelUpSpell(levelUpSeq[args.NewLevel - 1].Slot);
     }
 }
Esempio n. 4
0
 private static void OnLevelUp(Obj_AI_Base sender, CustomEvents.Unit.OnLevelUpEventArgs args)
 {
     if (Config.Item("autoLVL").GetValue<bool>())
         JungleClearer.jungler.levelUp(sender,args);
 }
Esempio n. 5
0
        private void OnLevelUp(Obj_AI_Base sender, CustomEvents.Unit.OnLevelUpEventArgs args)
        {
            try
            {
                if (!Enabled)
                    return;

                if (!sender.IsValid || !sender.IsMe)
                    return;

                Utility.Map.MapType map = Utility.Map.GetMap()._MapType;
                var points = args.RemainingPoints;

                if ((map == Utility.Map.MapType.SummonersRift || map == Utility.Map.MapType.TwistedTreeline) &&
                    args.NewLevel <= 1)
                    return;

                if ((map == Utility.Map.MapType.CrystalScar || map == Utility.Map.MapType.HowlingAbyss) &&
                    args.NewLevel <= 3)
                    return;

                if (args.NewLevel == 6 || args.NewLevel == 11 || args.NewLevel == 16)
                {
                    ObjectManager.Player.Spellbook.LevelUpSpell(SpellSlot.R);
                    points--;
                }

                if (Menu.Item(Name + "OnlyR").GetValue<bool>())
                    return;

                var patternIndex = Menu.Item(Name + "PatternEarly").GetValue<StringList>().SelectedIndex;
                MenuInfo mf = null;
                switch (args.NewLevel)
                {
                    case 2:
                        switch (patternIndex)
                        {
                            case 0:
                            case 1:
                                mf = GetMenuInfoByPriority(2);
                                break;
                            case 2:
                            case 3:
                                mf = GetMenuInfoByPriority(1);
                                break;
                        }
                        break;
                    case 3:
                        switch (patternIndex)
                        {
                            case 0:
                            case 2:
                                mf = GetMenuInfoByPriority(3);
                                break;
                            case 1:
                                mf = GetMenuInfoByPriority(1);
                                break;
                            case 3:
                                mf = GetMenuInfoByPriority(2);
                                break;
                        }
                        break;
                    case 4:
                        switch (patternIndex)
                        {
                            case 0:
                                mf = GetMenuInfoByPriority(1);
                                break;
                        }
                        break;
                }
                if (mf != null && points > 0)
                {
                    ObjectManager.Player.Spellbook.LevelUpSpell(mf.Slot);
                    points--;
                }
                foreach (MenuInfo mi in GetOrderedList())
                {
                    if (points > 0)
                    {
                        ObjectManager.Player.Spellbook.LevelUpSpell(mi.Slot);
                        points--;
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.WriteBlock(ex.Message, ex.ToString());
            }
        }
Esempio n. 6
0
        public static void CustomEvents_Unit_OnLevelUp(Obj_AI_Base sender, CustomEvents.Unit.OnLevelUpEventArgs args)
        {
            if (sender.NetworkId != Player.NetworkId)
                return;

            if (!Config.Item("AutoLevelUp").GetValue<bool>())
                return;

            Player.Spellbook.LevelUpSpell(smiteSlot != SpellSlot.Unknown
                ? junglerLevel[args.NewLevel - 1].Slot
                : topLanerLevel[args.NewLevel - 1].Slot);
        }
Esempio n. 7
0
 public static void OnLevelUp(Obj_AI_Base sender, CustomEvents.Unit.OnLevelUpEventArgs args)
 {
     if (!sender.IsValid || !sender.IsMe)
         return;
     if (args.NewLevel == 11)
         R = new Spell(SpellSlot.R, 700);
     if (args.NewLevel == 16)
         R = new Spell(SpellSlot.R, 850);
 }