From 516560f6032240999c9dbac5bb1c6615ae6422c2 Mon Sep 17 00:00:00 2001 From: brenoepic <59066707+brenoepics@users.noreply.github.com> Date: Fri, 8 Apr 2022 00:02:30 -0300 Subject: [PATCH] Fix ActionSit --- .../habbo/habbohotel/pets/actions/ActionSit.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSit.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSit.java index 52ef037f..918530a0 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSit.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSit.java @@ -1,5 +1,6 @@ package com.eu.habbo.habbohotel.pets.actions; +import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.pets.Pet; import com.eu.habbo.habbohotel.pets.PetAction; import com.eu.habbo.habbohotel.pets.PetTasks; @@ -10,12 +11,23 @@ import com.eu.habbo.habbohotel.users.Habbo; public class ActionSit extends PetAction { public ActionSit() { super(PetTasks.SIT, true); + this.statusToRemove.add(RoomUnitStatus.BEG); + this.statusToRemove.add(RoomUnitStatus.MOVE); + this.statusToRemove.add(RoomUnitStatus.LAY); + this.statusToRemove.add(RoomUnitStatus.DEAD); + this.statusToRemove.add(RoomUnitStatus.LAY); } @Override public boolean apply(Pet pet, Habbo habbo, String[] data) { if (pet.getTask() != PetTasks.SIT && !pet.getRoomUnit().hasStatus(RoomUnitStatus.SIT)) { - pet.getRoomUnit().setStatus(RoomUnitStatus.SIT, pet.getRoom().getStackHeight(pet.getRoomUnit().getX(), pet.getRoomUnit().getY(), false) - 0.50 + ""); + pet.getRoomUnit().cmdSit = true; + pet.getRoomUnit().setStatus(RoomUnitStatus.SIT, pet.getRoomUnit().getCurrentLocation().getStackHeight() + ""); + + Emulator.getThreading().run(() -> { + pet.getRoomUnit().cmdSit = false; + pet.clearPosture(); + }, 4000); if (pet.getHappyness() > 75) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL));