Fixed wired state changed trigger on vending machines

This commit is contained in:
Beny 2020-11-15 22:30:34 +01:00
parent accf00d93b
commit 912d06b44b

View File

@ -7,6 +7,8 @@ import com.eu.habbo.habbohotel.rooms.*;
import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.habbohotel.users.HabboGender;
import com.eu.habbo.habbohotel.users.HabboItem;
import com.eu.habbo.habbohotel.wired.WiredHandler;
import com.eu.habbo.habbohotel.wired.WiredTriggerType;
import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.rooms.items.FloorItemUpdateComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
@ -75,6 +77,8 @@ public class InteractionVendingMachine extends HabboItem {
this.setExtradata("1");
room.updateItem(this);
WiredHandler.handle(WiredTriggerType.STATE_CHANGED, client.getHabbo().getRoomUnit(), room, new Object[]{ this });
if(!unit.isWalking() && !unit.hasStatus(RoomUnitStatus.SIT) && !unit.hasStatus(RoomUnitStatus.LAY)) {
this.rotateToMachine(room, unit);
}