From 2af52de0ca6a0c3eb1ee9eeeb10371f9df5f1b0f Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Sun, 7 Jun 2020 15:44:57 +0300 Subject: [PATCH] Remove horse items properly when used --- .../messages/incoming/rooms/pets/PetUseItemEvent.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/pets/PetUseItemEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/pets/PetUseItemEvent.java index 7ec34b79..ff31e8e0 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/pets/PetUseItemEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/pets/PetUseItemEvent.java @@ -82,8 +82,11 @@ public class PetUseItemEvent extends MessageHandler { if (((HorsePet) pet).needsUpdate) { Emulator.getThreading().run(pet); this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomPetHorseFigureComposer((HorsePet) pet).compose()); - this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RemoveFloorItemComposer(item).compose()); - Emulator.getThreading().run(new QueryDeleteHabboItem(item.getId())); + + room.removeHabboItem(item); + room.sendComposer(new RemoveFloorItemComposer(item, true).compose()); + item.setRoomId(0); + Emulator.getGameEnvironment().getItemManager().deleteItem(item); } } else if (pet instanceof MonsterplantPet) { if (item.getBaseItem().getName().equalsIgnoreCase("mnstr_revival")) {