Fixed issue with achievement badges
parent
b5fbeb7852
commit
ce30ee601b
|
@ -72,10 +72,11 @@ public class AchievementManager : IAchievementManager
|
||||||
Habbo = session.Habbo,
|
Habbo = session.Habbo,
|
||||||
Code = $"{achievement.Badge}1"
|
Code = $"{achievement.Badge}1"
|
||||||
};
|
};
|
||||||
|
session.Habbo.Badges.Add(badge);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var currentBadge =
|
var currentBadge =
|
||||||
session.Habbo.Badges.SingleOrDefault(b =>
|
session.Habbo.Badges.SingleOrDefault(b =>
|
||||||
b.Code == $"{achievement.Badge}{habboAchievement.Level - 1}");
|
b.Code == $"{achievement.Badge}{habboAchievement.Level - 1}");
|
||||||
|
|
||||||
|
@ -91,10 +92,9 @@ public class AchievementManager : IAchievementManager
|
||||||
Habbo = session.Habbo,
|
Habbo = session.Habbo,
|
||||||
Code = $"{achievement.Badge}1"
|
Code = $"{achievement.Badge}1"
|
||||||
};
|
};
|
||||||
|
session.Habbo.Badges.Add(badge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_badgesRepository.SaveAsync(badge);
|
|
||||||
|
|
||||||
session.Habbo.AchievementScore += achievementLevel.Points;
|
session.Habbo.AchievementScore += achievementLevel.Points;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue