/// <summary>
        ///     Adds the spells to menu.
        /// </summary>
        /// <param name="rootMenu">The root menu.</param>
        /// <param name="name">The name.</param>
        private static void AddSpellsToMenu(Menu rootMenu, string name)
        {
            var menu = rootMenu.AddSubMenu(new Menu("Spells", name + "Spells"));

            SpellLoader.GetUsableSpells()
            .ForEach(x => menu.AddItem(new MenuItem(name + x.Slot, "Use " + x.Slot)).SetValue(true).DontSave());
        }
Beispiel #2
0
        /// <summary>
        ///     Loads Snitched.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public void Load(EventArgs args)
        {
            Config.Instance.CreateMenu();

            HealthPrediction.Load();

            ObjectTracker.OnObjectiveCreated += (sender, type) => HealthPrediction.TrackObject((Obj_AI_Base)sender);
            ObjectTracker.OnObjectiveDead    += (sender, type) => HealthPrediction.UntrackObject((Obj_AI_Base)sender);
            ObjectTracker.Load();

            this.Spells = SpellLoader.GetUsableSpells();

            Game.OnUpdate += this.Game_OnUpdate;
        }
        /// <summary>
        ///     Loads Snitched.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public void Load(EventArgs args)
        {
            Config.Instance.CreateMenu();

            HealthPrediction.Load();

            ObjectTracker.OnObjectiveCreated += (sender, type) => HealthPrediction.TrackObject((Obj_AI_Base)sender);
            ObjectTracker.OnObjectiveDead += (sender, type) => HealthPrediction.UntrackObject((Obj_AI_Base)sender);
            ObjectTracker.Load();

            this.Spells = SpellLoader.GetUsableSpells();

            Game.OnUpdate += this.Game_OnUpdate;

            Game.PrintChat(
                "<b><font color=\"#00AAFF\">S</font><font color=\"#f06DBD\">nitched</font> <font color=\"#00AAFF\">3.0</font></b> "
                + "by <font color=\"#9400D3\"><b>ChewyMoon</b></font> Loaded!");
        }
Beispiel #4
0
 /// <summary>
 ///     Adds the spells to menu.
 /// </summary>
 /// <param name="rootMenu">The root menu.</param>
 /// <param name="name">The name.</param>
 private static void AddSpellsToMenu(Menu rootMenu, string name)
 {
     SpellLoader.GetUsableSpells().ForEach(x => rootMenu.Add(name + x.Slot, new CheckBox("Use " + x.Slot)));
 }