Added "Atcg" Achievement on crafting

This commit is contained in:
Harmonic 2022-04-10 10:45:23 -07:00
parent 52be0b45a0
commit 37abd2aadb

View File

@ -54,17 +54,16 @@ public class CraftingCraftItemEvent extends MessageHandler {
if (!recipe.getAchievement().isEmpty()) { if (!recipe.getAchievement().isEmpty()) {
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement(recipe.getAchievement())); AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement(recipe.getAchievement()));
} }
this.client.sendResponse(new CraftingResultComposer(recipe)); this.client.sendResponse(new CraftingResultComposer(recipe));
this.client.getHabbo().getInventory().getItemsComponent().addItem(rewardItem); this.client.getHabbo().getInventory().getItemsComponent().addItem(rewardItem);
this.client.sendResponse(new AddHabboItemComposer(rewardItem)); this.client.sendResponse(new AddHabboItemComposer(rewardItem));
toRemove.forEachValue(new TObjectProcedure<HabboItem>() { AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("Atcg"));
@Override toRemove.forEachValue(object -> {
public boolean execute(HabboItem object) {
CraftingCraftItemEvent.this.client.sendResponse(new RemoveHabboItemComposer(object.getGiftAdjustedId())); CraftingCraftItemEvent.this.client.sendResponse(new RemoveHabboItemComposer(object.getGiftAdjustedId()));
return true; return true;
}
}); });
this.client.sendResponse(new InventoryRefreshComposer()); this.client.sendResponse(new InventoryRefreshComposer());