diff --git a/Common/Extensions/EnumExtensions.cs b/Common/Extensions/EnumExtensions.cs index 535ab13..1422df2 100644 --- a/Common/Extensions/EnumExtensions.cs +++ b/Common/Extensions/EnumExtensions.cs @@ -1,15 +1,22 @@ using Common.Models; +using System.Collections.Generic; namespace Common.Extensions { public static class EnumExtensions { - /// - /// Add a string to a list only if it doesnt already exist - /// + private static readonly List bossTypes = new List(){ + BotType.bossbully, + BotType.bossgluhar, + BotType.bosskilla, + BotType.bosskojaniy, + BotType.bosssanitar, + BotType.bosstagilla + }; + public static bool IsBoss(this BotType self) { - return self.HasFlag(BotType.bossbully | BotType.bossgluhar | BotType.bosskilla | BotType.bosskojaniy | BotType.bosssanitar); + return bossTypes.Contains(self); } } }