From 1306e177b529b0ab6c98ab326373f051010083ca Mon Sep 17 00:00:00 2001 From: versx Date: Fri, 4 Jun 2021 19:25:19 -0700 Subject: [PATCH] Check for Weather.None --- src/Net/Models/PokemonData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Net/Models/PokemonData.cs b/src/Net/Models/PokemonData.cs index acb8d60b..0a737c3d 100644 --- a/src/Net/Models/PokemonData.cs +++ b/src/Net/Models/PokemonData.cs @@ -486,7 +486,7 @@ private IReadOnlyDictionary GetProperties(MessageProperties prop var weather = Weather?.ToString(); var hasWeather = Weather.HasValue && Weather != WeatherCondition.None; var isWeatherBoosted = pkmnInfo?.IsWeatherBoosted(Weather ?? WeatherCondition.None); - var weatherEmoji = (Weather ?? WeatherCondition.None).GetEmojiIcon("weather", false); + var weatherEmoji = Weather != WeatherCondition.None ? Weather.GetEmojiIcon("weather", false) : null; var move1 = int.TryParse(FastMove, out var fastMoveId) ? Translator.Instance.GetMoveName(fastMoveId) : "Unknown"; var move2 = int.TryParse(ChargeMove, out var chargeMoveId) ? Translator.Instance.GetMoveName(chargeMoveId) : "Unknown"; var type1 = pkmnInfo?.Types?[0];