mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Fixed Issue 1997
This commit is contained in:
parent
88c4e0b288
commit
a871e91cfc
@ -148,9 +148,14 @@ public class WiredHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean handle(InteractionWiredTrigger trigger, final RoomUnit roomUnit, final Room room, final Object[] stuff, final THashSet<InteractionWiredEffect> effectsToExecute) {
|
public static boolean handle(InteractionWiredTrigger trigger, final RoomUnit roomUnit, final Room room, final Object[] stuff, final THashSet<InteractionWiredEffect> effectsToExecute) {
|
||||||
|
if(!Emulator.isReady) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
long millis = System.currentTimeMillis();
|
long millis = System.currentTimeMillis();
|
||||||
int roomUnitId = roomUnit != null ? roomUnit.getId() : -1;
|
int roomUnitId = roomUnit != null ? roomUnit.getId() : -1;
|
||||||
if (Emulator.isReady && ((Emulator.getConfig().getBoolean("wired.custom.enabled", false) && (trigger.canExecute(millis) || roomUnitId > -1) && trigger.userCanExecute(roomUnitId, millis)) || (!Emulator.getConfig().getBoolean("wired.custom.enabled", false) && trigger.canExecute(millis))) && trigger.execute(roomUnit, room, stuff)) {
|
if (((Emulator.getConfig().getBoolean("wired.custom.enabled", false) && (trigger.canExecute(millis) || roomUnitId > -1) && trigger.userCanExecute(roomUnitId, millis)) || (!Emulator.getConfig().getBoolean("wired.custom.enabled", false) && trigger.canExecute(millis))) && trigger.execute(roomUnit, room, stuff)) {
|
||||||
|
//DUNNO IF YOU HAVE TO SET EXTRADATA TO 1 IN HERE (In case of Repeaters)
|
||||||
trigger.activateBox(room, roomUnit, millis);
|
trigger.activateBox(room, roomUnit, millis);
|
||||||
|
|
||||||
THashSet<InteractionWiredCondition> conditions = room.getRoomSpecialTypes().getConditions(trigger.getX(), trigger.getY());
|
THashSet<InteractionWiredCondition> conditions = room.getRoomSpecialTypes().getConditions(trigger.getX(), trigger.getY());
|
||||||
|
@ -56,10 +56,6 @@ public class UseFurnitureEvent extends MessageHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
item.onClick(this.client, room, new Object[]{state});
|
item.onClick(this.client, room, new Object[]{state});
|
||||||
|
|
||||||
if (item instanceof InteractionWired) {
|
|
||||||
this.client.getHabbo().getRoomUnit().setGoalLocation(this.client.getHabbo().getRoomUnit().getCurrentLocation());
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Caught exception", e);
|
log.error("Caught exception", e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user