This commit is contained in:
Snaiker 2022-04-13 05:47:03 +01:00
parent fedc19c726
commit 850f5a3e12

View File

@ -148,14 +148,14 @@ public class AchievementManager {
String newBadgCode = "ACH_" + achievement.name + newLevel.level; String newBadgCode = "ACH_" + achievement.name + newLevel.level;
if (habbo.getInventory().getBadgesComponent().hasBadge(newBadgCode))
return;
if (badge != null) { if (badge != null) {
badge.setCode(newBadgCode); badge.setCode(newBadgCode);
badge.needsInsert(false); badge.needsInsert(false);
badge.needsUpdate(true); badge.needsUpdate(true);
} else { } else {
if (habbo.getInventory().getBadgesComponent().hasBadge(newBadgCode))
return;
badge = new HabboBadge(0, newBadgCode, 0, habbo); badge = new HabboBadge(0, newBadgCode, 0, habbo);
habbo.getClient().sendResponse(new AddUserBadgeComposer(badge)); habbo.getClient().sendResponse(new AddUserBadgeComposer(badge));
badge.needsInsert(true); badge.needsInsert(true);