コード例 #1
0
        public static void RemoveOldItem(AbilityId item)
        {
            var name = item.ToString();

            Menu.Item("itemHeroEnable").GetValue <AbilityToggler>().Remove(name);
            Menu.Item("itemTempestEnable").GetValue <AbilityToggler>().Remove(name);
            Menu.Item("itemHero").GetValue <PriorityChanger>().Remove(name);
            Menu.Item("itemTempest").GetValue <PriorityChanger>().Remove(name);
            Printer.Log($"Remove old item -> {item}");
        }
コード例 #2
0
        public static void AddNewItem(AbilityId item)
        {
            var name = item.ToString();

            Menu.Item("itemHeroEnable").GetValue <AbilityToggler>().Add(name);
            Menu.Item("itemTempestEnable").GetValue <AbilityToggler>().Add(name);
            Menu.Item("itemHero").GetValue <PriorityChanger>().Add(name);
            Menu.Item("itemTempest").GetValue <PriorityChanger>().Add(name);
            Printer.Log($"Add new item -> {item}");
        }
コード例 #3
0
 public static bool IsAbilityEnabledTempest(AbilityId id) => GetToggle("spellTempest", id.ToString());
コード例 #4
0
 private static uint GetPriority(string name, AbilityId item)
 {
     return(Menu.Item(name).GetValue <PriorityChanger>().GetPriority(item.ToString()));
 }
コード例 #5
0
 private static bool GetToggle(string name, AbilityId item)
 {
     return(Menu.Item(name).GetValue <AbilityToggler>().IsEnabled(item.ToString()));
 }
コード例 #6
0
 public static bool IsItemEnabled(AbilityId id) => GetToggle("itemHeroEnable", id.ToString());
コード例 #7
0
        /*public static bool IsItemEnabledTempest(ItemId id) =>
         *  GetToggle("itemTempestEnable",
         *      id == ItemId.item_necronomicon_2 || id == ItemId.item_necronomicon_3
         *          ? ItemId.item_necronomicon.ToString()
         *          : id == ItemId.item_dagon_2 || id == ItemId.item_dagon_3 || id == ItemId.item_dagon_4 ||
         *            id == ItemId.item_dagon_5
         *              ? ItemId.item_dagon.ToString()
         *              : id == ItemId.item_diffusal_blade_2 ? ItemId.item_diffusal_blade.ToString() : id.ToString());*/

        public static bool IsItemEnabledTempest(AbilityId id) => GetToggle("itemTempestEnable", id.ToString());
コード例 #8
0
 public static bool IsAbilityEnabled(AbilityId id) => GetToggle("spellHero", id.ToString());