mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-31 12:22:36 +01:00
Refactored all outgoing composer names beginning with D
This commit is contained in:
parent
a97a7d5ae2
commit
9e5877d9c4
@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.gameclients.GameClient;
|
|||||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||||
import com.eu.habbo.habbohotel.users.DanceType;
|
import com.eu.habbo.habbohotel.users.DanceType;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDanceComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.DanceMessageComposer;
|
||||||
|
|
||||||
public class RoomDanceCommand extends Command {
|
public class RoomDanceCommand extends Command {
|
||||||
public RoomDanceCommand() {
|
public RoomDanceCommand() {
|
||||||
@ -31,7 +31,7 @@ public class RoomDanceCommand extends Command {
|
|||||||
|
|
||||||
for (Habbo habbo : gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbos()) {
|
for (Habbo habbo : gameClient.getHabbo().getHabboInfo().getCurrentRoom().getHabbos()) {
|
||||||
habbo.getRoomUnit().setDanceType(DanceType.values()[danceId]);
|
habbo.getRoomUnit().setDanceType(DanceType.values()[danceId]);
|
||||||
habbo.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDanceComposer(habbo.getRoomUnit()).compose());
|
habbo.getHabboInfo().getCurrentRoom().sendComposer(new DanceMessageComposer(habbo.getRoomUnit()).compose());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_danceall.no_dance"), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_danceall.no_dance"), RoomChatMessageBubbles.ALERT);
|
||||||
|
@ -10,8 +10,7 @@ import com.eu.habbo.habbohotel.users.HabboItem;
|
|||||||
import com.eu.habbo.habbohotel.wired.WiredHandler;
|
import com.eu.habbo.habbohotel.wired.WiredHandler;
|
||||||
import com.eu.habbo.habbohotel.wired.WiredTriggerType;
|
import com.eu.habbo.habbohotel.wired.WiredTriggerType;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.incoming.rooms.users.RoomUserWalkEvent;
|
import com.eu.habbo.messages.outgoing.rooms.items.DiceValueMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.ItemIntStateComposer;
|
|
||||||
import com.eu.habbo.threading.runnables.RoomUnitWalkToLocation;
|
import com.eu.habbo.threading.runnables.RoomUnitWalkToLocation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -100,7 +99,7 @@ public class InteractionOneWayGate extends HabboItem {
|
|||||||
unit.setCanLeaveRoomByDoor(true);
|
unit.setCanLeaveRoomByDoor(true);
|
||||||
walkable = this.getBaseItem().allowWalk();
|
walkable = this.getBaseItem().allowWalk();
|
||||||
room.updateTile(currentLocation);
|
room.updateTile(currentLocation);
|
||||||
room.sendComposer(new ItemIntStateComposer(this.getId(), 0).compose());
|
room.sendComposer(new DiceValueMessageComposer(this.getId(), 0).compose());
|
||||||
unit.removeOverrideTile(currentLocation);
|
unit.removeOverrideTile(currentLocation);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -109,7 +108,7 @@ public class InteractionOneWayGate extends HabboItem {
|
|||||||
unit.addOverrideTile(currentLocation);
|
unit.addOverrideTile(currentLocation);
|
||||||
unit.setGoalLocation(currentLocation);
|
unit.setGoalLocation(currentLocation);
|
||||||
Emulator.getThreading().run(new RoomUnitWalkToLocation(unit, currentLocation, room, onSuccess, onFail));
|
Emulator.getThreading().run(new RoomUnitWalkToLocation(unit, currentLocation, room, onSuccess, onFail));
|
||||||
room.sendComposer(new ItemIntStateComposer(this.getId(), 1).compose());
|
room.sendComposer(new DiceValueMessageComposer(this.getId(), 1).compose());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
room.scheduledTasks.add(new Runnable()
|
room.scheduledTasks.add(new Runnable()
|
||||||
@ -130,7 +129,7 @@ public class InteractionOneWayGate extends HabboItem {
|
|||||||
|
|
||||||
private void refresh(Room room) {
|
private void refresh(Room room) {
|
||||||
this.setExtradata("0");
|
this.setExtradata("0");
|
||||||
room.sendComposer(new ItemIntStateComposer(this.getId(), 0).compose());
|
room.sendComposer(new DiceValueMessageComposer(this.getId(), 0).compose());
|
||||||
room.updateTile(room.getLayout().getTile(this.getX(), this.getY()));
|
room.updateTile(room.getLayout().getTile(this.getX(), this.getY()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4350,7 +4350,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
if (unit.getDanceType() != danceType) {
|
if (unit.getDanceType() != danceType) {
|
||||||
boolean isDancing = !unit.getDanceType().equals(DanceType.NONE);
|
boolean isDancing = !unit.getDanceType().equals(DanceType.NONE);
|
||||||
unit.setDanceType(danceType);
|
unit.setDanceType(danceType);
|
||||||
this.sendComposer(new RoomUserDanceComposer(unit).compose());
|
this.sendComposer(new DanceMessageComposer(unit).compose());
|
||||||
|
|
||||||
if (danceType.equals(DanceType.NONE) && isDancing) {
|
if (danceType.equals(DanceType.NONE) && isDancing) {
|
||||||
WiredHandler.handle(WiredTriggerType.STOPS_DANCING, unit, this, new Object[]{unit});
|
WiredHandler.handle(WiredTriggerType.STOPS_DANCING, unit, this, new Object[]{unit});
|
||||||
|
@ -540,7 +540,7 @@ public class RoomManager {
|
|||||||
synchronized (room.roomUnitLock) {
|
synchronized (room.roomUnitLock) {
|
||||||
for (Habbo current : room.getHabbos()) {
|
for (Habbo current : room.getHabbos()) {
|
||||||
if (room.hasRights(current) || current.getHabboInfo().getId() == room.getOwnerId() || (room.hasGuild() && room.getGuildRightLevel(current).isEqualOrGreaterThan(RoomRightLevels.GUILD_RIGHTS))) {
|
if (room.hasRights(current) || current.getHabboInfo().getId() == room.getOwnerId() || (room.hasGuild() && room.getGuildRightLevel(current).isEqualOrGreaterThan(RoomRightLevels.GUILD_RIGHTS))) {
|
||||||
current.getClient().sendResponse(new DoorbellAddUserComposer(habbo.getHabboInfo().getUsername()));
|
current.getClient().sendResponse(new DoorbellMessageComposer(habbo.getHabboInfo().getUsername()));
|
||||||
rightsFound = true;
|
rightsFound = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -554,7 +554,7 @@ public class RoomManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
habbo.getHabboInfo().setRoomQueueId(roomId);
|
habbo.getHabboInfo().setRoomQueueId(roomId);
|
||||||
habbo.getClient().sendResponse(new DoorbellAddUserComposer(""));
|
habbo.getClient().sendResponse(new DoorbellMessageComposer(""));
|
||||||
room.addToQueue(habbo);
|
room.addToQueue(habbo);
|
||||||
} else if (room.getState() == RoomState.PASSWORD) {
|
} else if (room.getState() == RoomState.PASSWORD) {
|
||||||
if (room.getPassword().equalsIgnoreCase(password))
|
if (room.getPassword().equalsIgnoreCase(password))
|
||||||
@ -772,7 +772,7 @@ public class RoomManager {
|
|||||||
}
|
}
|
||||||
Bot bot = botIterator.value();
|
Bot bot = botIterator.value();
|
||||||
if (!bot.getRoomUnit().getDanceType().equals(DanceType.NONE)) {
|
if (!bot.getRoomUnit().getDanceType().equals(DanceType.NONE)) {
|
||||||
habbo.getClient().sendResponse(new RoomUserDanceComposer(bot.getRoomUnit()));
|
habbo.getClient().sendResponse(new DanceMessageComposer(bot.getRoomUnit()));
|
||||||
}
|
}
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new RoomUserStatusComposer(bot.getRoomUnit(), bot.getRoomUnit().getZ()));
|
habbo.getClient().sendResponse(new RoomUserStatusComposer(bot.getRoomUnit(), bot.getRoomUnit().getZ()));
|
||||||
@ -839,7 +839,7 @@ public class RoomManager {
|
|||||||
for (Habbo roomHabbo : habbos) {
|
for (Habbo roomHabbo : habbos) {
|
||||||
{
|
{
|
||||||
if (roomHabbo.getRoomUnit().getDanceType().getType() > 0) {
|
if (roomHabbo.getRoomUnit().getDanceType().getType() > 0) {
|
||||||
habbo.getClient().sendResponse(new RoomUserDanceComposer(roomHabbo.getRoomUnit()));
|
habbo.getClient().sendResponse(new DanceMessageComposer(roomHabbo.getRoomUnit()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roomHabbo.getRoomUnit().getHandItem() > 0) {
|
if (roomHabbo.getRoomUnit().getHandItem() > 0) {
|
||||||
@ -888,7 +888,7 @@ public class RoomManager {
|
|||||||
if (room.hasRights(habbo) || (room.hasGuild() && room.getGuildRightLevel(habbo).isEqualOrGreaterThan(RoomRightLevels.GUILD_RIGHTS))) {
|
if (room.hasRights(habbo) || (room.hasGuild() && room.getGuildRightLevel(habbo).isEqualOrGreaterThan(RoomRightLevels.GUILD_RIGHTS))) {
|
||||||
if (!room.getHabboQueue().isEmpty()) {
|
if (!room.getHabboQueue().isEmpty()) {
|
||||||
for (Habbo waiting : room.getHabboQueue().valueCollection()) {
|
for (Habbo waiting : room.getHabboQueue().valueCollection()) {
|
||||||
habbo.getClient().sendResponse(new DoorbellAddUserComposer(waiting.getHabboInfo().getUsername()));
|
habbo.getClient().sendResponse(new DoorbellMessageComposer(waiting.getHabboInfo().getUsername()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import com.eu.habbo.habbohotel.wired.WiredEffectType;
|
|||||||
import com.eu.habbo.habbohotel.wired.WiredHandler;
|
import com.eu.habbo.habbohotel.wired.WiredHandler;
|
||||||
import com.eu.habbo.habbohotel.wired.WiredTriggerType;
|
import com.eu.habbo.habbohotel.wired.WiredTriggerType;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDanceComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.DanceMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer;
|
||||||
import com.eu.habbo.messages.outgoing.users.UpdateUserLookComposer;
|
import com.eu.habbo.messages.outgoing.users.UpdateUserLookComposer;
|
||||||
import gnu.trove.set.hash.THashSet;
|
import gnu.trove.set.hash.THashSet;
|
||||||
@ -310,7 +310,7 @@ public abstract class HabboItem implements Runnable, IEventTriggers {
|
|||||||
|
|
||||||
if ((this.getBaseItem().allowSit() || this.getBaseItem().allowLay()) && !roomUnit.getDanceType().equals(DanceType.NONE)) {
|
if ((this.getBaseItem().allowSit() || this.getBaseItem().allowLay()) && !roomUnit.getDanceType().equals(DanceType.NONE)) {
|
||||||
roomUnit.setDanceType(DanceType.NONE);
|
roomUnit.setDanceType(DanceType.NONE);
|
||||||
room.sendComposer(new RoomUserDanceComposer(roomUnit).compose());
|
room.sendComposer(new DanceMessageComposer(roomUnit).compose());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.getBaseItem().getClothingOnWalk().isEmpty() && roomUnit.getPreviousLocation() != roomUnit.getGoal() && roomUnit.getGoal() == room.getLayout().getTile(this.x, this.y)) {
|
if (!this.getBaseItem().getClothingOnWalk().isEmpty() && roomUnit.getPreviousLocation() != roomUnit.getGoal() && roomUnit.getGoal() == room.getLayout().getTile(this.x, this.y)) {
|
||||||
|
@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
|||||||
import com.eu.habbo.habbohotel.users.DanceType;
|
import com.eu.habbo.habbohotel.users.DanceType;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BotErrorComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BotErrorComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDanceComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.DanceMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserNameChangedComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserNameChangedComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersComposer;
|
||||||
import com.eu.habbo.plugin.events.bots.BotSavedChatEvent;
|
import com.eu.habbo.plugin.events.bots.BotSavedChatEvent;
|
||||||
@ -123,7 +123,7 @@ public class BotSaveSettingsEvent extends MessageHandler {
|
|||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
bot.getRoomUnit().setDanceType(DanceType.values()[(bot.getRoomUnit().getDanceType().getType() + 1) % DanceType.values().length]);
|
bot.getRoomUnit().setDanceType(DanceType.values()[(bot.getRoomUnit().getDanceType().getType() + 1) % DanceType.values().length]);
|
||||||
room.sendComposer(new RoomUserDanceComposer(bot.getRoomUnit()).compose());
|
room.sendComposer(new DanceMessageComposer(bot.getRoomUnit()).compose());
|
||||||
bot.needsUpdate(true);
|
bot.needsUpdate(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
|
|||||||
import com.eu.habbo.habbohotel.users.DanceType;
|
import com.eu.habbo.habbohotel.users.DanceType;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDanceComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.DanceMessageComposer;
|
||||||
import com.eu.habbo.plugin.events.users.UserIdleEvent;
|
import com.eu.habbo.plugin.events.users.UserIdleEvent;
|
||||||
|
|
||||||
public class RoomUserDanceEvent extends MessageHandler {
|
public class RoomUserDanceEvent extends MessageHandler {
|
||||||
@ -40,7 +40,7 @@ public class RoomUserDanceEvent extends MessageHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDanceComposer(habbo.getRoomUnit()).compose());
|
this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new DanceMessageComposer(habbo.getRoomUnit()).compose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,10 @@ import com.eu.habbo.messages.ServerMessage;
|
|||||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||||
|
|
||||||
public class DoorbellAddUserComposer extends MessageComposer {
|
public class DoorbellMessageComposer extends MessageComposer {
|
||||||
private final String habbo;
|
private final String habbo;
|
||||||
|
|
||||||
public DoorbellAddUserComposer(String habbo) {
|
public DoorbellMessageComposer(String habbo) {
|
||||||
this.habbo = habbo;
|
this.habbo = habbo;
|
||||||
}
|
}
|
||||||
|
|
@ -4,11 +4,11 @@ import com.eu.habbo.messages.ServerMessage;
|
|||||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||||
|
|
||||||
public class ItemIntStateComposer extends MessageComposer {
|
public class DiceValueMessageComposer extends MessageComposer {
|
||||||
private final int id;
|
private final int id;
|
||||||
private final int value;
|
private final int value;
|
||||||
|
|
||||||
public ItemIntStateComposer(int id, int value) {
|
public DiceValueMessageComposer(int id, int value) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
@ -5,10 +5,10 @@ import com.eu.habbo.messages.ServerMessage;
|
|||||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||||
|
|
||||||
public class RoomUserDanceComposer extends MessageComposer {
|
public class DanceMessageComposer extends MessageComposer {
|
||||||
private final RoomUnit roomUnit;
|
private final RoomUnit roomUnit;
|
||||||
|
|
||||||
public RoomUserDanceComposer(RoomUnit roomUnit) {
|
public DanceMessageComposer(RoomUnit roomUnit) {
|
||||||
this.roomUnit = roomUnit;
|
this.roomUnit = roomUnit;
|
||||||
}
|
}
|
||||||
|
|
@ -4,10 +4,10 @@ import com.eu.habbo.messages.ServerMessage;
|
|||||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||||
|
|
||||||
public class ErrorLoginComposer extends MessageComposer {
|
public class DisconnectReasonComposer extends MessageComposer {
|
||||||
private final int errorCode;
|
private final int errorCode;
|
||||||
|
|
||||||
public ErrorLoginComposer(int errorCode) {
|
public DisconnectReasonComposer(int errorCode) {
|
||||||
this.errorCode = errorCode;
|
this.errorCode = errorCode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user