Пример #1
0
        public static DiscordColor BuildLureColor(this PokestopLureType lureType, DiscordServerConfig server)
        {
            string color;

            switch (lureType)
            {
            case PokestopLureType.Normal:
                color = server.DiscordEmbedColors.Pokestops.Lures.Normal;
                break;

            case PokestopLureType.Glacial:
                color = server.DiscordEmbedColors.Pokestops.Lures.Glacial;
                break;

            case PokestopLureType.Mossy:
                color = server.DiscordEmbedColors.Pokestops.Lures.Mossy;
                break;

            case PokestopLureType.Magnetic:
                color = server.DiscordEmbedColors.Pokestops.Lures.Magnetic;
                break;

            default:
                return(DiscordColor.White);
            }
            return(new DiscordColor(color));
        }
Пример #2
0
 /// <summary>
 /// Gets user subscriptions from subscribed Pokestop lures
 /// </summary>
 /// <param name="lureType">Pokestop lure type</param>
 /// <returns>Returns list of user subscription objects</returns>
 public List <SubscriptionObject> GetUserSubscriptionsByLureType(PokestopLureType lureType)
 {
     return(_subscriptions?
            .Where(x => x.IsEnabled(NotificationStatusType.Lures) &&
                   x.Lures != null &&
                   x.Lures.Exists(y => lureType == y.LureType))
            .ToList());
 }
Пример #3
0
 public string GetLureIcon(string style, PokestopLureType lureType)
 {
     return(_iconStyles[style] + "reward/2-i" + (int)lureType + "-a1.png");
 }