private static void OnGameLoad(EventArgs args) { _menuMap = new Dictionary<MenuItem, int>(); _menu = new Menu("【红叶推介】自动加点", "UniversalLeveler" + ObjectManager.Player.ChampionName, true); foreach (var entry in DefaultSpellSlotPriorities) { MenuItem menuItem = MakeSlider( entry.Key.ToString(), entry.Key.ToString(), entry.Value, 1, DefaultSpellSlotPriorities.Count); menuItem.ValueChanged += menuItem_ValueChanged; _menu.AddItem(menuItem); var subMenu = new Menu(entry.Key + " Extra", entry.Key + "extra"); subMenu.AddItem(MakeSlider(entry.Key + "extra", "Level after X (inclusive) ?", 1, 1, 18)); _menu.AddSubMenu(subMenu); } _activate = new MenuItem("activate", "Start at level?").SetValue(new StringList(new[] { "2", "3", "4" })); _delay = new MenuItem("delay", "LevelUp Delay (ms)").SetValue(new Slider(0, 0, 2000)); _menu.AddItem(_activate); _menu.AddItem(_delay); _menu.AddToMainMenu(); foreach (var entry in DefaultSpellSlotPriorities) { MenuItem item = _menu.GetSlider(entry.Key.ToString()); _menuMap[item] = item.GetValue<Slider>().Value; } ParseMenu(); _levelStrategy = new DefaultLevelStrategy(); if (LevelStrategyByChampion.ContainsKey(ObjectManager.Player.ChampionName)) { _levelStrategy = LevelStrategyByChampion[ObjectManager.Player.ChampionName]; } _level = ObjectManager.Player.Level; //CustomEvents.Unit.OnLevelUp += UnitOnOnLevelUp; Game.OnUpdate += Game_OnUpdate; Print("Loaded!"); }