From ce30ee601bccd1d223fc8f0da623577b10ba36d8 Mon Sep 17 00:00:00 2001 From: Tiger Date: Sat, 21 Oct 2023 17:07:07 +0200 Subject: [PATCH] Fixed issue with achievement badges --- Game/Achievements/AchievementManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Game/Achievements/AchievementManager.cs b/Game/Achievements/AchievementManager.cs index a47c73f..a4e6008 100644 --- a/Game/Achievements/AchievementManager.cs +++ b/Game/Achievements/AchievementManager.cs @@ -72,10 +72,11 @@ public class AchievementManager : IAchievementManager Habbo = session.Habbo, Code = $"{achievement.Badge}1" }; + session.Habbo.Badges.Add(badge); } else { - var currentBadge = + var currentBadge = session.Habbo.Badges.SingleOrDefault(b => b.Code == $"{achievement.Badge}{habboAchievement.Level - 1}"); @@ -91,10 +92,9 @@ public class AchievementManager : IAchievementManager Habbo = session.Habbo, Code = $"{achievement.Badge}1" }; + session.Habbo.Badges.Add(badge); } } - - _badgesRepository.SaveAsync(badge); session.Habbo.AchievementScore += achievementLevel.Points;