private bool IsEnabledType(LootEventType lootEventType) { switch (lootEventType) { case LootEventType.Add: return(Plugin.Configuration.AddEnabled); case LootEventType.Cast: return(Plugin.Configuration.CastEnabled); case LootEventType.Craft: return(Plugin.Configuration.CraftEnabled); case LootEventType.Desynth: return(Plugin.Configuration.DesynthEnabled); case LootEventType.Discard: return(Plugin.Configuration.DiscardEnabled); case LootEventType.Gather: return(Plugin.Configuration.GatherEnabled); case LootEventType.Greed: return(Plugin.Configuration.GreedEnabled); case LootEventType.Lost: return(Plugin.Configuration.LostEnabled); case LootEventType.Need: return(Plugin.Configuration.NeedEnabled); case LootEventType.Obtain: return(Plugin.Configuration.ObtainEnabled); case LootEventType.Purchase: return(Plugin.Configuration.PurchaseEnabled); case LootEventType.Search: return(Plugin.Configuration.SearchEnabled); case LootEventType.Sell: return(Plugin.Configuration.SellEnabled); case LootEventType.Use: return(Plugin.Configuration.UseEnabled); default: throw new ArgumentOutOfRangeException(); } }
private bool IsEnabledType(LootEventType lootEventType) { return(lootEventType switch { LootEventType.Add => this.Plugin.Configuration.AddEnabled, LootEventType.Cast => this.Plugin.Configuration.CastEnabled, LootEventType.Craft => this.Plugin.Configuration.CraftEnabled, LootEventType.Desynth => this.Plugin.Configuration.DesynthEnabled, LootEventType.Discard => this.Plugin.Configuration.DiscardEnabled, LootEventType.Gather => this.Plugin.Configuration.GatherEnabled, LootEventType.Greed => this.Plugin.Configuration.GreedEnabled, LootEventType.Lost => this.Plugin.Configuration.LostEnabled, LootEventType.Need => this.Plugin.Configuration.NeedEnabled, LootEventType.Obtain => this.Plugin.Configuration.ObtainEnabled, LootEventType.Purchase => this.Plugin.Configuration.PurchaseEnabled, LootEventType.Search => this.Plugin.Configuration.SearchEnabled, LootEventType.Sell => this.Plugin.Configuration.SellEnabled, LootEventType.Use => this.Plugin.Configuration.UseEnabled, _ => throw new ArgumentOutOfRangeException(), });