mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Fixed unnecessary spam of RoomUserDanceComposer packets
This commit is contained in:
parent
9b25c37525
commit
f8d0893c13
@ -4272,6 +4272,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
}
|
||||
|
||||
public void dance(RoomUnit unit, DanceType danceType) {
|
||||
if(unit.getDanceType() != danceType) {
|
||||
boolean isDancing = !unit.getDanceType().equals(DanceType.NONE);
|
||||
unit.setDanceType(danceType);
|
||||
this.sendComposer(new RoomUserDanceComposer(unit).compose());
|
||||
@ -4282,6 +4283,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
WiredHandler.handle(WiredTriggerType.STARTS_DANCING, unit, this, new Object[]{unit});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addToWordFilter(String word) {
|
||||
synchronized (this.wordFilterWords) {
|
||||
|
@ -308,7 +308,7 @@ public abstract class HabboItem implements Runnable, IEventTriggers {
|
||||
|
||||
WiredHandler.handle(WiredTriggerType.WALKS_ON_FURNI, roomUnit, room, new Object[]{this});
|
||||
|
||||
if ((this.getBaseItem().allowSit() || this.getBaseItem().allowLay()) && roomUnit.getDanceType() != DanceType.NONE) {
|
||||
if ((this.getBaseItem().allowSit() || this.getBaseItem().allowLay()) && !roomUnit.getDanceType().equals(DanceType.NONE)) {
|
||||
roomUnit.setDanceType(DanceType.NONE);
|
||||
room.sendComposer(new RoomUserDanceComposer(roomUnit).compose());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user