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}"); }
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}"); }
public static bool IsAbilityEnabledTempest(AbilityId id) => GetToggle("spellTempest", id.ToString());
private static uint GetPriority(string name, AbilityId item) { return(Menu.Item(name).GetValue <PriorityChanger>().GetPriority(item.ToString())); }
private static bool GetToggle(string name, AbilityId item) { return(Menu.Item(name).GetValue <AbilityToggler>().IsEnabled(item.ToString())); }
public static bool IsItemEnabled(AbilityId id) => GetToggle("itemHeroEnable", id.ToString());
/*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());
public static bool IsAbilityEnabled(AbilityId id) => GetToggle("spellHero", id.ToString());