From 611090ec07f500bf7f3d7b93835a0b1db3a80526 Mon Sep 17 00:00:00 2001 From: Chomp Date: Wed, 1 Sep 2021 18:22:55 +0100 Subject: [PATCH] Fix bug --- Common/Extensions/EnumExtensions.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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); } } }