mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-19 07:56:26 +01:00
Yet another refactoring commit.
This commit is contained in:
parent
8c28bfd85a
commit
88e294dd65
@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.users.Habbo;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboInfo;
|
import com.eu.habbo.habbohotel.users.HabboInfo;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BotErrorComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BotErrorComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.BotAddedToInventoryComposer;
|
import com.eu.habbo.messages.outgoing.inventory.BotAddedToInventoryComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.BotRemovedFromInventoryComposer;
|
import com.eu.habbo.messages.outgoing.inventory.BotRemovedFromInventoryComposer;
|
||||||
@ -156,7 +156,7 @@ public class BotManager {
|
|||||||
|
|
||||||
bot.cycle(false);
|
bot.cycle(false);
|
||||||
} else {
|
} else {
|
||||||
habbo.getClient().sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
habbo.getClient().sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,11 @@ import com.eu.habbo.habbohotel.users.HabboBadge;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboGender;
|
import com.eu.habbo.habbohotel.users.HabboGender;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.outgoing.catalog.*;
|
import com.eu.habbo.messages.outgoing.catalog.*;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.BotAddedToInventoryComposer;
|
import com.eu.habbo.messages.outgoing.inventory.BotAddedToInventoryComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.AddPetComposer;
|
import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import com.eu.habbo.messages.outgoing.modtool.IssueCloseNotificationMessageComposer;
|
import com.eu.habbo.messages.outgoing.modtool.IssueCloseNotificationMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||||
@ -965,8 +965,8 @@ public class CatalogManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
habbo.getClient().getHabbo().getInventory().getPetsComponent().addPet(pet);
|
habbo.getClient().getHabbo().getInventory().getPetsComponent().addPet(pet);
|
||||||
habbo.getClient().sendResponse(new AddPetComposer(pet));
|
habbo.getClient().sendResponse(new PetAddedToInventoryComposer(pet));
|
||||||
habbo.getClient().sendResponse(new PetBoughtNotificationComposer(pet, false));
|
habbo.getClient().sendResponse(new PetReceivedMessageComposer(pet, false));
|
||||||
|
|
||||||
AchievementManager.progressAchievement(habbo.getClient().getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetLover"));
|
AchievementManager.progressAchievement(habbo.getClient().getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetLover"));
|
||||||
|
|
||||||
@ -1108,7 +1108,7 @@ public class CatalogManager {
|
|||||||
keys.put("display", "BUBBLE");
|
keys.put("display", "BUBBLE");
|
||||||
keys.put("image", "${image.library.url}album1584/" + badge.getCode() + ".gif");
|
keys.put("image", "${image.library.url}album1584/" + badge.getCode() + ".gif");
|
||||||
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
||||||
habbo.getClient().sendResponse(new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
habbo.getClient().sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
||||||
unseenItems.get(AddHabboItemComposer.AddHabboItemCategory.BADGE).add(badge.getId());
|
unseenItems.get(AddHabboItemComposer.AddHabboItemCategory.BADGE).add(badge.getId());
|
||||||
}
|
}
|
||||||
habbo.getClient().getHabbo().getHabboStats().addPurchase(purchasedEvent.catalogItem);
|
habbo.getClient().getHabbo().getHabboStats().addPurchase(purchasedEvent.catalogItem);
|
||||||
|
@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
|||||||
import com.eu.habbo.habbohotel.rooms.RoomManager;
|
import com.eu.habbo.habbohotel.rooms.RoomManager;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.navigator.CanCreateRoomComposer;
|
import com.eu.habbo.messages.outgoing.navigator.CanCreateRoomComposer;
|
||||||
import gnu.trove.map.TIntObjectMap;
|
import gnu.trove.map.TIntObjectMap;
|
||||||
@ -241,7 +241,7 @@ public class RoomBundleLayout extends SingleBundle {
|
|||||||
keys.put("image", "${image.library.url}/notifications/room_bundle_" + this.getId() + ".png");
|
keys.put("image", "${image.library.url}/notifications/room_bundle_" + this.getId() + ".png");
|
||||||
|
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
habbo.getClient().sendResponse(new BubbleAlertComposer(BubbleAlertKeys.PURCHASING_ROOM.key, keys));
|
habbo.getClient().sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.PURCHASING_ROOM.key, keys));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import com.eu.habbo.habbohotel.permissions.Permission;
|
|||||||
import com.eu.habbo.habbohotel.pets.Pet;
|
import com.eu.habbo.habbohotel.pets.Pet;
|
||||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.InventoryPetsComposer;
|
import com.eu.habbo.messages.outgoing.inventory.PetInventoryComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import gnu.trove.map.hash.TIntObjectHashMap;
|
import gnu.trove.map.hash.TIntObjectHashMap;
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ public class EmptyPetsInventoryCommand extends Command {
|
|||||||
});
|
});
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new FurniListInvalidateComposer());
|
habbo.getClient().sendResponse(new FurniListInvalidateComposer());
|
||||||
habbo.getClient().sendResponse(new InventoryPetsComposer(habbo));
|
habbo.getClient().sendResponse(new PetInventoryComposer(habbo));
|
||||||
|
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_empty_pets.cleared").replace("%username%", habbo.getHabboInfo().getUsername()), RoomChatMessageBubbles.ALERT);
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_empty_pets.cleared").replace("%username%", habbo.getHabboInfo().getUsername()), RoomChatMessageBubbles.ALERT);
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
|
|||||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -33,7 +33,7 @@ public class EventCommand extends Command {
|
|||||||
codes.put("TIME", Emulator.getDate().toString());
|
codes.put("TIME", Emulator.getDate().toString());
|
||||||
codes.put("MESSAGE", message.toString());
|
codes.put("MESSAGE", message.toString());
|
||||||
|
|
||||||
ServerMessage msg = new BubbleAlertComposer("hotel.event", codes).compose();
|
ServerMessage msg = new NotificationDialogMessageComposer("hotel.event", codes).compose();
|
||||||
|
|
||||||
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
||||||
Habbo habbo = set.getValue();
|
Habbo habbo = set.getValue();
|
||||||
|
@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.users.Habbo;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboInfo;
|
import com.eu.habbo.habbohotel.users.HabboInfo;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.habbohotel.users.HabboManager;
|
import com.eu.habbo.habbohotel.users.HabboManager;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
@ -80,7 +80,7 @@ public class GiftCommand extends Command {
|
|||||||
keys.put("display", "BUBBLE");
|
keys.put("display", "BUBBLE");
|
||||||
keys.put("image", "${image.library.url}notifications/gift.gif");
|
keys.put("image", "${image.library.url}notifications/gift.gif");
|
||||||
keys.put("message", Emulator.getTexts().getValue("generic.gift.received.anonymous"));
|
keys.put("message", Emulator.getTexts().getValue("generic.gift.received.anonymous"));
|
||||||
habbo.getClient().sendResponse(new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
habbo.getClient().sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.users.Habbo;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboBadge;
|
import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||||
import com.eu.habbo.habbohotel.users.inventory.BadgesComponent;
|
import com.eu.habbo.habbohotel.users.inventory.BadgesComponent;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
@ -31,7 +31,7 @@ public class MassBadgeCommand extends Command {
|
|||||||
keys.put("display", "BUBBLE");
|
keys.put("display", "BUBBLE");
|
||||||
keys.put("image", "${image.library.url}album1584/" + badge + ".gif");
|
keys.put("image", "${image.library.url}album1584/" + badge + ".gif");
|
||||||
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
||||||
ServerMessage message = new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys).compose();
|
ServerMessage message = new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys).compose();
|
||||||
|
|
||||||
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
||||||
Habbo habbo = set.getValue();
|
Habbo habbo = set.getValue();
|
||||||
|
@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
|||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
@ -57,7 +57,7 @@ public class MassGiftCommand extends Command {
|
|||||||
keys.put("display", "BUBBLE");
|
keys.put("display", "BUBBLE");
|
||||||
keys.put("image", "${image.library.url}notifications/gift.gif");
|
keys.put("image", "${image.library.url}notifications/gift.gif");
|
||||||
keys.put("message", Emulator.getTexts().getValue("generic.gift.received.anonymous"));
|
keys.put("message", Emulator.getTexts().getValue("generic.gift.received.anonymous"));
|
||||||
ServerMessage giftNotificiationMessage = new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys).compose();
|
ServerMessage giftNotificiationMessage = new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys).compose();
|
||||||
|
|
||||||
Emulator.getThreading().run(() -> {
|
Emulator.getThreading().run(() -> {
|
||||||
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
||||||
|
@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.users.Habbo;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboBadge;
|
import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||||
import com.eu.habbo.habbohotel.users.inventory.BadgesComponent;
|
import com.eu.habbo.habbohotel.users.inventory.BadgesComponent;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
@ -32,7 +32,7 @@ public class RoomBadgeCommand extends Command {
|
|||||||
keys.put("display", "BUBBLE");
|
keys.put("display", "BUBBLE");
|
||||||
keys.put("image", "${image.library.url}album1584/" + badge + ".gif");
|
keys.put("image", "${image.library.url}album1584/" + badge + ".gif");
|
||||||
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
||||||
ServerMessage message = new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys).compose();
|
ServerMessage message = new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys).compose();
|
||||||
|
|
||||||
for (Habbo habbo : gameClient.getHabbo().getRoomUnit().getRoom().getHabbos()) {
|
for (Habbo habbo : gameClient.getHabbo().getRoomUnit().getRoom().getHabbos()) {
|
||||||
if (habbo.isOnline()) {
|
if (habbo.isOnline()) {
|
||||||
|
@ -11,7 +11,7 @@ import com.eu.habbo.habbohotel.users.HabboInfo;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.habbohotel.users.HabboManager;
|
import com.eu.habbo.habbohotel.users.HabboManager;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RoomFloorItemsComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.ObjectsMessageComposer;
|
||||||
import gnu.trove.TCollections;
|
import gnu.trove.TCollections;
|
||||||
import gnu.trove.map.TIntObjectMap;
|
import gnu.trove.map.TIntObjectMap;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
@ -238,7 +238,7 @@ public class InteractionBuildArea extends InteractionCustomValues {
|
|||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
client.sendResponse(new RoomFloorItemsComposer(ownerNames, items));
|
client.sendResponse(new ObjectsMessageComposer(ownerNames, items));
|
||||||
Emulator.getThreading().run(() -> {
|
Emulator.getThreading().run(() -> {
|
||||||
for(HabboItem item : items) {
|
for(HabboItem item : items) {
|
||||||
client.sendResponse(new RemoveFloorItemComposer(item, true));
|
client.sendResponse(new RemoveFloorItemComposer(item, true));
|
||||||
|
@ -1,21 +1,10 @@
|
|||||||
package com.eu.habbo.habbohotel.items.interactions;
|
package com.eu.habbo.habbohotel.items.interactions;
|
||||||
|
|
||||||
import com.eu.habbo.Emulator;
|
|
||||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
|
||||||
import com.eu.habbo.habbohotel.items.Item;
|
import com.eu.habbo.habbohotel.items.Item;
|
||||||
import com.eu.habbo.habbohotel.rooms.*;
|
import com.eu.habbo.habbohotel.rooms.*;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.FloorItemUpdateComposer;
|
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
|
|
||||||
import com.eu.habbo.threading.runnables.RoomUnitVendingMachineAction;
|
|
||||||
import com.eu.habbo.threading.runnables.RoomUnitWalkToLocation;
|
|
||||||
import com.eu.habbo.util.pathfinding.Rotation;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class InteractionEffectVendingMachine extends InteractionVendingMachine {
|
public class InteractionEffectVendingMachine extends InteractionVendingMachine {
|
||||||
public InteractionEffectVendingMachine(ResultSet set, Item baseItem) throws SQLException {
|
public InteractionEffectVendingMachine(ResultSet set, Item baseItem) throws SQLException {
|
||||||
|
@ -8,9 +8,9 @@ import com.eu.habbo.habbohotel.rooms.RoomTile;
|
|||||||
import com.eu.habbo.habbohotel.rooms.RoomTileState;
|
import com.eu.habbo.habbohotel.rooms.RoomTileState;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.habbohotel.wired.WiredEffectType;
|
import com.eu.habbo.habbohotel.wired.WiredEffectType;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.ItemExtraDataComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.ObjectDataUpdateMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RoomFloorItemsComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.ObjectsMessageComposer;
|
||||||
import gnu.trove.TCollections;
|
import gnu.trove.TCollections;
|
||||||
import gnu.trove.map.TIntObjectMap;
|
import gnu.trove.map.TIntObjectMap;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
@ -61,7 +61,7 @@ public class InteractionMuteArea extends InteractionCustomValues {
|
|||||||
|
|
||||||
if((objects.length >= 2 && objects[1] instanceof WiredEffectType) || (client != null && room.hasRights(client.getHabbo()))) {
|
if((objects.length >= 2 && objects[1] instanceof WiredEffectType) || (client != null && room.hasRights(client.getHabbo()))) {
|
||||||
this.values.put("state", this.values.get("state").equals("0") ? "1" : "0");
|
this.values.put("state", this.values.get("state").equals("0") ? "1" : "0");
|
||||||
room.sendComposer(new ItemExtraDataComposer(this).compose());
|
room.sendComposer(new ObjectDataUpdateMessageComposer(this).compose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ public class InteractionMuteArea extends InteractionCustomValues {
|
|||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
client.sendResponse(new RoomFloorItemsComposer(ownerNames, items));
|
client.sendResponse(new ObjectsMessageComposer(ownerNames, items));
|
||||||
Emulator.getThreading().run(() -> {
|
Emulator.getThreading().run(() -> {
|
||||||
for(HabboItem item : items) {
|
for(HabboItem item : items) {
|
||||||
client.sendResponse(new RemoveFloorItemComposer(item, true));
|
client.sendResponse(new RemoveFloorItemComposer(item, true));
|
||||||
|
@ -6,9 +6,6 @@ import com.eu.habbo.habbohotel.items.Item;
|
|||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
||||||
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.ItemStateComposer;
|
|
||||||
import gnu.trove.set.hash.THashSet;
|
import gnu.trove.set.hash.THashSet;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
@ -4,14 +4,9 @@ import com.eu.habbo.Emulator;
|
|||||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||||
import com.eu.habbo.habbohotel.items.Item;
|
import com.eu.habbo.habbohotel.items.Item;
|
||||||
import com.eu.habbo.habbohotel.rooms.*;
|
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.HabboGender;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
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.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.FloorItemUpdateComposer;
|
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
|
|
||||||
import com.eu.habbo.threading.runnables.RoomUnitGiveHanditem;
|
import com.eu.habbo.threading.runnables.RoomUnitGiveHanditem;
|
||||||
import com.eu.habbo.threading.runnables.RoomUnitWalkToLocation;
|
import com.eu.habbo.threading.runnables.RoomUnitWalkToLocation;
|
||||||
import com.eu.habbo.util.pathfinding.Rotation;
|
import com.eu.habbo.util.pathfinding.Rotation;
|
||||||
@ -21,8 +16,6 @@ import java.sql.ResultSet;
|
|||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.ExecutionException;
|
|
||||||
import java.util.concurrent.ScheduledFuture;
|
|
||||||
|
|
||||||
public class InteractionVendingMachine extends HabboItem {
|
public class InteractionVendingMachine extends HabboItem {
|
||||||
public InteractionVendingMachine(ResultSet set, Item baseItem) throws SQLException {
|
public InteractionVendingMachine(ResultSet set, Item baseItem) throws SQLException {
|
||||||
|
@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
|||||||
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
||||||
import com.eu.habbo.messages.ClientMessage;
|
import com.eu.habbo.messages.ClientMessage;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.ItemStateComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.OneWayDoorStatusMessageComposer;
|
||||||
import gnu.trove.map.hash.TLongLongHashMap;
|
import gnu.trove.map.hash.TLongLongHashMap;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -77,7 +77,7 @@ public abstract class InteractionWired extends InteractionDefault {
|
|||||||
|
|
||||||
public void activateBox(Room room, RoomUnit roomUnit, long millis) {
|
public void activateBox(Room room, RoomUnit roomUnit, long millis) {
|
||||||
this.setExtradata(this.getExtradata().equals("1") ? "0" : "1");
|
this.setExtradata(this.getExtradata().equals("1") ? "0" : "1");
|
||||||
room.sendComposer(new ItemStateComposer(this).compose());
|
room.sendComposer(new OneWayDoorStatusMessageComposer(this).compose());
|
||||||
if (roomUnit != null) {
|
if (roomUnit != null) {
|
||||||
this.addUserExecutionCache(roomUnit.getId(), millis);
|
this.addUserExecutionCache(roomUnit.getId(), millis);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.items.interactions.games.InteractionGameTeamItem;
|
|||||||
import com.eu.habbo.habbohotel.items.interactions.games.football.goals.InteractionFootballGoal;
|
import com.eu.habbo.habbohotel.items.interactions.games.football.goals.InteractionFootballGoal;
|
||||||
import com.eu.habbo.habbohotel.rooms.*;
|
import com.eu.habbo.habbohotel.rooms.*;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.ItemStateComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.OneWayDoorStatusMessageComposer;
|
||||||
import com.eu.habbo.util.pathfinding.Rotation;
|
import com.eu.habbo.util.pathfinding.Rotation;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -228,7 +228,7 @@ public class InteractionFootball extends InteractionPushable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setExtradata(Math.abs(currentStep - (totalSteps + 1)) + "");
|
this.setExtradata(Math.abs(currentStep - (totalSteps + 1)) + "");
|
||||||
room.sendComposer(new ItemStateComposer(this).compose());
|
room.sendComposer(new OneWayDoorStatusMessageComposer(this).compose());
|
||||||
|
|
||||||
/*this.setExtradata(nextRoll <= 200 ? "8" : (nextRoll <= 250 ? "7" : (nextRoll <= 300 ? "6" : (nextRoll <= 350 ? "5" : (nextRoll <= 400 ? "4" : (nextRoll <= 450 ? "3" : (nextRoll <= 500 ? "2" : "1")))))));
|
/*this.setExtradata(nextRoll <= 200 ? "8" : (nextRoll <= 250 ? "7" : (nextRoll <= 300 ? "6" : (nextRoll <= 350 ? "5" : (nextRoll <= 400 ? "4" : (nextRoll <= 450 ? "3" : (nextRoll <= 500 ? "2" : "1")))))));
|
||||||
room.sendComposer(new ItemStateComposer(this).compose());*/
|
room.sendComposer(new ItemStateComposer(this).compose());*/
|
||||||
@ -242,7 +242,7 @@ public class InteractionFootball extends InteractionPushable {
|
|||||||
@Override
|
@Override
|
||||||
public void onStop(Room room, RoomUnit kicker, int currentStep, int totalSteps) {
|
public void onStop(Room room, RoomUnit kicker, int currentStep, int totalSteps) {
|
||||||
this.setExtradata("0");
|
this.setExtradata("0");
|
||||||
room.sendComposer(new ItemStateComposer(this).compose());
|
room.sendComposer(new OneWayDoorStatusMessageComposer(this).compose());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,7 +11,7 @@ import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
|||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.PetPackageNameValidationComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PerkAllowancesComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.breeding.NestBreedingSuccessComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.breeding.NestBreedingSuccessComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.breeding.ConfirmBreedingRequestComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.breeding.ConfirmBreedingRequestComposer;
|
||||||
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
|
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
|
||||||
@ -114,12 +114,12 @@ public class InteractionPetBreedingNest extends HabboItem {
|
|||||||
habbo.getHabboInfo().getCurrentRoom().updateItem(this);
|
habbo.getHabboInfo().getCurrentRoom().updateItem(this);
|
||||||
|
|
||||||
if (this.petOne != null) {
|
if (this.petOne != null) {
|
||||||
habbo.getClient().sendResponse(new PetPackageNameValidationComposer(this.getId(), PetPackageNameValidationComposer.CLOSE_WIDGET, ""));
|
habbo.getClient().sendResponse(new PerkAllowancesComposer(this.getId(), PerkAllowancesComposer.CLOSE_WIDGET, ""));
|
||||||
}
|
}
|
||||||
if (this.petTwo.getUserId() != habbo.getHabboInfo().getId()) {
|
if (this.petTwo.getUserId() != habbo.getHabboInfo().getId()) {
|
||||||
Habbo owner = this.petTwo.getRoom().getHabbo(this.petTwo.getUserId());
|
Habbo owner = this.petTwo.getRoom().getHabbo(this.petTwo.getUserId());
|
||||||
if (owner != null) {
|
if (owner != null) {
|
||||||
owner.getClient().sendResponse(new PetPackageNameValidationComposer(this.getId(), PetPackageNameValidationComposer.CLOSE_WIDGET, ""));
|
owner.getClient().sendResponse(new PerkAllowancesComposer(this.getId(), PerkAllowancesComposer.CLOSE_WIDGET, ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import com.eu.habbo.messages.ServerMessage;
|
|||||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.PetStatusUpdateComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetStatusUpdateComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetRespectComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetRespectNotificationComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
|
||||||
import org.apache.commons.math3.util.Pair;
|
import org.apache.commons.math3.util.Pair;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -388,7 +388,7 @@ public class MonsterplantPet extends Pet implements IPetLook {
|
|||||||
this.addHappyness(10);
|
this.addHappyness(10);
|
||||||
this.addExperience(10);
|
this.addExperience(10);
|
||||||
this.room.sendComposer(new PetStatusUpdateComposer(this).compose());
|
this.room.sendComposer(new PetStatusUpdateComposer(this).compose());
|
||||||
this.room.sendComposer(new RoomPetRespectComposer(this, RoomPetRespectComposer.PET_TREATED).compose());
|
this.room.sendComposer(new PetRespectNotificationComposer(this, PetRespectNotificationComposer.PET_TREATED).compose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ import com.eu.habbo.habbohotel.users.HabboItem;
|
|||||||
import com.eu.habbo.messages.ISerialize;
|
import com.eu.habbo.messages.ISerialize;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.PetLevelUpdatedComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetLevelUpdatedComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetExperienceComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetExperienceComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetRespectComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetRespectNotificationComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserRemoveComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserRemoveComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.ChatMessageComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.ChatMessageComposer;
|
||||||
import com.eu.habbo.plugin.events.pets.PetTalkEvent;
|
import com.eu.habbo.plugin.events.pets.PetTalkEvent;
|
||||||
@ -517,7 +517,7 @@ public class Pet implements ISerialize, Runnable {
|
|||||||
this.experience += amount;
|
this.experience += amount;
|
||||||
|
|
||||||
if (this.room != null) {
|
if (this.room != null) {
|
||||||
this.room.sendComposer(new RoomPetExperienceComposer(this, amount).compose());
|
this.room.sendComposer(new PetExperienceComposer(this, amount).compose());
|
||||||
|
|
||||||
if(this.level < PetManager.experiences.length + 1 && this.experience >= PetManager.experiences[this.level - 1]) {
|
if(this.level < PetManager.experiences.length + 1 && this.experience >= PetManager.experiences[this.level - 1]) {
|
||||||
this.levelUp();
|
this.levelUp();
|
||||||
@ -582,7 +582,7 @@ public class Pet implements ISerialize, Runnable {
|
|||||||
|
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
habbo.getHabboStats().petRespectPointsToGive--;
|
habbo.getHabboStats().petRespectPointsToGive--;
|
||||||
habbo.getHabboInfo().getCurrentRoom().sendComposer(new RoomPetRespectComposer(this).compose());
|
habbo.getHabboInfo().getCurrentRoom().sendComposer(new PetRespectNotificationComposer(this).compose());
|
||||||
|
|
||||||
AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetRespectGiver"));
|
AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetRespectGiver"));
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ import com.eu.habbo.messages.outgoing.generic.alerts.GenericErrorComposer;
|
|||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
||||||
import com.eu.habbo.messages.outgoing.hotelview.CloseConnectionMessageComposer;
|
import com.eu.habbo.messages.outgoing.hotelview.CloseConnectionMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.AddPetComposer;
|
import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollAnswerComposer;
|
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollAnswerComposer;
|
||||||
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollStartComposer;
|
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollStartComposer;
|
||||||
@ -844,7 +844,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
pet.removeFromRoom();
|
pet.removeFromRoom();
|
||||||
Emulator.getThreading().run(pet);
|
Emulator.getThreading().run(pet);
|
||||||
habbo.getInventory().getPetsComponent().addPet(pet);
|
habbo.getInventory().getPetsComponent().addPet(pet);
|
||||||
habbo.getClient().sendResponse(new AddPetComposer(pet));
|
habbo.getClient().sendResponse(new PetAddedToInventoryComposer(pet));
|
||||||
this.currentPets.remove(pet.getId());
|
this.currentPets.remove(pet.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2061,7 +2061,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(pet.getUserId());
|
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(pet.getUserId());
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
habbo.getInventory().getPetsComponent().addPet(pet);
|
habbo.getInventory().getPetsComponent().addPet(pet);
|
||||||
habbo.getClient().sendResponse(new AddPetComposer(pet));
|
habbo.getClient().sendResponse(new PetAddedToInventoryComposer(pet));
|
||||||
}
|
}
|
||||||
|
|
||||||
pet.needsUpdate = true;
|
pet.needsUpdate = true;
|
||||||
@ -4157,7 +4157,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
if (item != null && item.getRoomId() == this.id) {
|
if (item != null && item.getRoomId() == this.id) {
|
||||||
if (item.getBaseItem() != null) {
|
if (item.getBaseItem() != null) {
|
||||||
if (item.getBaseItem().getType() == FurnitureType.FLOOR) {
|
if (item.getBaseItem().getType() == FurnitureType.FLOOR) {
|
||||||
this.sendComposer(new FloorItemUpdateComposer(item).compose());
|
this.sendComposer(new ObjectUpdateMessageComposer(item).compose());
|
||||||
this.updateTiles(this.getLayout().getTilesAt(this.layout.getTile(item.getX(), item.getY()), item.getBaseItem().getWidth(), item.getBaseItem().getLength(), item.getRotation()));
|
this.updateTiles(this.getLayout().getTilesAt(this.layout.getTile(item.getX(), item.getY()), item.getBaseItem().getWidth(), item.getBaseItem().getLength(), item.getRotation()));
|
||||||
} else if (item.getBaseItem().getType() == FurnitureType.WALL) {
|
} else if (item.getBaseItem().getType() == FurnitureType.WALL) {
|
||||||
this.sendComposer(new ItemUpdateMessageComposer(item).compose());
|
this.sendComposer(new ItemUpdateMessageComposer(item).compose());
|
||||||
@ -4169,9 +4169,9 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
|
|
||||||
public void updateItemState(HabboItem item) {
|
public void updateItemState(HabboItem item) {
|
||||||
if (!item.isLimited()) {
|
if (!item.isLimited()) {
|
||||||
this.sendComposer(new ItemStateComposer(item).compose());
|
this.sendComposer(new OneWayDoorStatusMessageComposer(item).compose());
|
||||||
} else {
|
} else {
|
||||||
this.sendComposer(new FloorItemUpdateComposer(item).compose());
|
this.sendComposer(new ObjectUpdateMessageComposer(item).compose());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.getBaseItem().getType() == FurnitureType.FLOOR) {
|
if (item.getBaseItem().getType() == FurnitureType.FLOOR) {
|
||||||
@ -4467,10 +4467,10 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
this.sendComposer(new RemoveFloorItemComposer(item).compose());
|
this.sendComposer(new RemoveFloorItemComposer(item).compose());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.sendComposer(new RoomFloorItemsComposer(this.furniOwnerNames, this.roomSpecialTypes.getTriggers()).compose());
|
this.sendComposer(new ObjectsMessageComposer(this.furniOwnerNames, this.roomSpecialTypes.getTriggers()).compose());
|
||||||
this.sendComposer(new RoomFloorItemsComposer(this.furniOwnerNames, this.roomSpecialTypes.getEffects()).compose());
|
this.sendComposer(new ObjectsMessageComposer(this.furniOwnerNames, this.roomSpecialTypes.getEffects()).compose());
|
||||||
this.sendComposer(new RoomFloorItemsComposer(this.furniOwnerNames, this.roomSpecialTypes.getConditions()).compose());
|
this.sendComposer(new ObjectsMessageComposer(this.furniOwnerNames, this.roomSpecialTypes.getConditions()).compose());
|
||||||
this.sendComposer(new RoomFloorItemsComposer(this.furniOwnerNames, this.roomSpecialTypes.getExtras()).compose());
|
this.sendComposer(new ObjectsMessageComposer(this.furniOwnerNames, this.roomSpecialTypes.getExtras()).compose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4602,7 +4602,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
item.setRoomId(this.id);
|
item.setRoomId(this.id);
|
||||||
item.onPlace(this);
|
item.onPlace(this);
|
||||||
this.updateTiles(occupiedTiles);
|
this.updateTiles(occupiedTiles);
|
||||||
this.sendComposer(new AddFloorItemComposer(item, this.getFurniOwnerName(item.getUserId())).compose());
|
this.sendComposer(new ObjectAddMessageComposer(item, this.getFurniOwnerName(item.getUserId())).compose());
|
||||||
|
|
||||||
for (RoomTile t : occupiedTiles) {
|
for (RoomTile t : occupiedTiles) {
|
||||||
this.updateHabbosAt(t.x, t.y);
|
this.updateHabbosAt(t.x, t.y);
|
||||||
@ -4768,7 +4768,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
Emulator.getThreading().run(item);
|
Emulator.getThreading().run(item);
|
||||||
|
|
||||||
if (sendUpdates) {
|
if (sendUpdates) {
|
||||||
this.sendComposer(new FloorItemUpdateComposer(item).compose());
|
this.sendComposer(new ObjectUpdateMessageComposer(item).compose());
|
||||||
}
|
}
|
||||||
|
|
||||||
//Update old & new tiles
|
//Update old & new tiles
|
||||||
|
@ -31,11 +31,11 @@ import com.eu.habbo.habbohotel.wired.WiredTriggerType;
|
|||||||
import com.eu.habbo.messages.incoming.users.UserNuxEvent;
|
import com.eu.habbo.messages.incoming.users.UserNuxEvent;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.GenericErrorComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.GenericErrorComposer;
|
||||||
import com.eu.habbo.messages.outgoing.hotelview.CloseConnectionMessageComposer;
|
import com.eu.habbo.messages.outgoing.hotelview.CloseConnectionMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.polls.PollStartComposer;
|
import com.eu.habbo.messages.outgoing.polls.PollOfferComposer;
|
||||||
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollAnswersComposer;
|
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollAnswersComposer;
|
||||||
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollStartComposer;
|
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollStartComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.*;
|
import com.eu.habbo.messages.outgoing.rooms.*;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RoomFloorItemsComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.ObjectsMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.ItemsComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.ItemsComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.promotions.RoomPromotionMessageComposer;
|
import com.eu.habbo.messages.outgoing.rooms.promotions.RoomPromotionMessageComposer;
|
||||||
@ -633,7 +633,7 @@ public class RoomManager {
|
|||||||
habbo.getRoomUnit().clearStatus();
|
habbo.getRoomUnit().clearStatus();
|
||||||
habbo.getRoomUnit().cmdTeleport = false;
|
habbo.getRoomUnit().cmdTeleport = false;
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new RoomOpenComposer());
|
habbo.getClient().sendResponse(new OpenConnectionMessageComposer());
|
||||||
|
|
||||||
habbo.getRoomUnit().setInRoom(true);
|
habbo.getRoomUnit().setInRoom(true);
|
||||||
if (habbo.getHabboInfo().getCurrentRoom() != room && habbo.getHabboInfo().getCurrentRoom() != null) {
|
if (habbo.getHabboInfo().getCurrentRoom() != room && habbo.getHabboInfo().getCurrentRoom() != null) {
|
||||||
@ -806,7 +806,7 @@ public class RoomManager {
|
|||||||
|
|
||||||
floorItems.add(object);
|
floorItems.add(object);
|
||||||
if (floorItems.size() == 250) {
|
if (floorItems.size() == 250) {
|
||||||
habbo.getClient().sendResponse(new RoomFloorItemsComposer(room.getFurniOwnerNames(), floorItems));
|
habbo.getClient().sendResponse(new ObjectsMessageComposer(room.getFurniOwnerNames(), floorItems));
|
||||||
floorItems.clear();
|
floorItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -814,7 +814,7 @@ public class RoomManager {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new RoomFloorItemsComposer(room.getFurniOwnerNames(), floorItems));
|
habbo.getClient().sendResponse(new ObjectsMessageComposer(room.getFurniOwnerNames(), floorItems));
|
||||||
floorItems.clear();
|
floorItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -898,7 +898,7 @@ public class RoomManager {
|
|||||||
Poll poll = Emulator.getGameEnvironment().getPollManager().getPoll(room.getPollId());
|
Poll poll = Emulator.getGameEnvironment().getPollManager().getPoll(room.getPollId());
|
||||||
|
|
||||||
if (poll != null) {
|
if (poll != null) {
|
||||||
habbo.getClient().sendResponse(new PollStartComposer(poll));
|
habbo.getClient().sendResponse(new PollOfferComposer(poll));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,12 @@ import com.eu.habbo.habbohotel.items.interactions.InteractionMusicDisc;
|
|||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListRemoveComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListRemoveComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeBoxMySongsComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeBoxMySongsComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeBoxNowPlayingMessageComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.NowPlayingMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeboxSongDisksMessageComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeboxSongDisksMessageComposer;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -210,7 +210,7 @@ public class TraxManager implements Disposable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.room.sendComposer(new JukeBoxNowPlayingMessageComposer(Emulator.getGameEnvironment().getItemManager().getSoundTrack(this.currentlyPlaying.getSongId()), this.playingIndex, 0).compose());
|
this.room.sendComposer(new NowPlayingMessageComposer(Emulator.getGameEnvironment().getItemManager().getSoundTrack(this.currentlyPlaying.getSongId()), this.playingIndex, 0).compose());
|
||||||
} else {
|
} else {
|
||||||
this.stop();
|
this.stop();
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ public class TraxManager implements Disposable {
|
|||||||
this.jukeBox.setExtradata("0");
|
this.jukeBox.setExtradata("0");
|
||||||
this.room.updateItem(this.jukeBox);
|
this.room.updateItem(this.jukeBox);
|
||||||
|
|
||||||
this.room.sendComposer(new JukeBoxNowPlayingMessageComposer(null, -1, 0).compose());
|
this.room.sendComposer(new NowPlayingMessageComposer(null, -1, 0).compose());
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoundTrack currentSong() {
|
public SoundTrack currentSong() {
|
||||||
@ -247,7 +247,7 @@ public class TraxManager implements Disposable {
|
|||||||
if(this.songsLimit < this.songs.size() + 1)
|
if(this.songsLimit < this.songs.size() + 1)
|
||||||
{
|
{
|
||||||
THashMap<String, String> codes = new THashMap<>();
|
THashMap<String, String> codes = new THashMap<>();
|
||||||
ServerMessage msg = new BubbleAlertComposer("${playlist.editor.alert.playlist.full.title}", "${playlist.editor.alert.playlist.full}").compose();
|
ServerMessage msg = new NotificationDialogMessageComposer("${playlist.editor.alert.playlist.full.title}", "${playlist.editor.alert.playlist.full}").compose();
|
||||||
habbo.getClient().sendResponse(msg);
|
habbo.getClient().sendResponse(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -393,9 +393,9 @@ public class TraxManager implements Disposable {
|
|||||||
|
|
||||||
public void updateCurrentPlayingSong(Habbo habbo) {
|
public void updateCurrentPlayingSong(Habbo habbo) {
|
||||||
if (this.isPlaying()) {
|
if (this.isPlaying()) {
|
||||||
habbo.getClient().sendResponse(new JukeBoxNowPlayingMessageComposer(Emulator.getGameEnvironment().getItemManager().getSoundTrack(this.currentlyPlaying.getSongId()), this.playingIndex, 1000 * (Emulator.getIntUnixTimestamp() - this.startedTimestamp)));
|
habbo.getClient().sendResponse(new NowPlayingMessageComposer(Emulator.getGameEnvironment().getItemManager().getSoundTrack(this.currentlyPlaying.getSongId()), this.playingIndex, 1000 * (Emulator.getIntUnixTimestamp() - this.startedTimestamp)));
|
||||||
} else {
|
} else {
|
||||||
habbo.getClient().sendResponse(new JukeBoxNowPlayingMessageComposer(null, -1, 0));
|
habbo.getClient().sendResponse(new NowPlayingMessageComposer(null, -1, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,13 +370,13 @@ public class Habbo implements Runnable {
|
|||||||
|
|
||||||
public void addPet(Pet pet) {
|
public void addPet(Pet pet) {
|
||||||
this.habboInventory.getPetsComponent().addPet(pet);
|
this.habboInventory.getPetsComponent().addPet(pet);
|
||||||
this.client.sendResponse(new AddPetComposer(pet));
|
this.client.sendResponse(new PetAddedToInventoryComposer(pet));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void removePet(Pet pet) {
|
public void removePet(Pet pet) {
|
||||||
this.habboInventory.getPetsComponent().removePet(pet);
|
this.habboInventory.getPetsComponent().removePet(pet);
|
||||||
this.client.sendResponse(new RemovePetComposer(pet));
|
this.client.sendResponse(new PetRemovedFromInventoryComposer(pet));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ public class Habbo implements Runnable {
|
|||||||
keys.put("display", "BUBBLE");
|
keys.put("display", "BUBBLE");
|
||||||
keys.put("image", "${image.library.url}album1584/" + badge.getCode() + ".gif");
|
keys.put("image", "${image.library.url}album1584/" + badge.getCode() + ".gif");
|
||||||
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.modtool.ScripterManager;
|
|||||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||||
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.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.plugin.events.support.SupportUserAlertedEvent;
|
import com.eu.habbo.plugin.events.support.SupportUserAlertedEvent;
|
||||||
import com.eu.habbo.plugin.events.support.SupportUserAlertedReason;
|
import com.eu.habbo.plugin.events.support.SupportUserAlertedReason;
|
||||||
|
|
||||||
@ -29,6 +29,6 @@ public class AmbassadorAlertCommandEvent extends MessageHandler {
|
|||||||
if (Emulator.getPluginManager().fireEvent(alertedEvent).isCancelled())
|
if (Emulator.getPluginManager().fireEvent(alertedEvent).isCancelled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new BubbleAlertComposer("ambassador.alert.warning"));
|
habbo.getClient().sendResponse(new NotificationDialogMessageComposer("ambassador.alert.warning"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
|
|||||||
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.camera.CameraPublishStatusMessageComposer;
|
import com.eu.habbo.messages.outgoing.camera.CameraPublishStatusMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.catalog.NotEnoughPointsTypeComposer;
|
import com.eu.habbo.messages.outgoing.catalog.NotEnoughBalanceMessageComposer;
|
||||||
import com.eu.habbo.plugin.events.users.UserPublishPictureEvent;
|
import com.eu.habbo.plugin.events.users.UserPublishPictureEvent;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -29,7 +29,7 @@ public class CameraPublishToWebEvent extends MessageHandler {
|
|||||||
if (!habbo.getHabboInfo().getPhotoJSON().contains(habbo.getHabboInfo().getPhotoTimestamp() + "")) return;
|
if (!habbo.getHabboInfo().getPhotoJSON().contains(habbo.getHabboInfo().getPhotoTimestamp() + "")) return;
|
||||||
|
|
||||||
if (habbo.getHabboInfo().getCurrencyAmount(CameraPublishToWebEvent.CAMERA_PUBLISH_POINTS_TYPE) < CameraPublishToWebEvent.CAMERA_PUBLISH_POINTS) {
|
if (habbo.getHabboInfo().getCurrencyAmount(CameraPublishToWebEvent.CAMERA_PUBLISH_POINTS_TYPE) < CameraPublishToWebEvent.CAMERA_PUBLISH_POINTS) {
|
||||||
this.client.sendResponse(new NotEnoughPointsTypeComposer(false, true, CameraPublishToWebEvent.CAMERA_PUBLISH_POINTS));
|
this.client.sendResponse(new NotEnoughBalanceMessageComposer(false, true, CameraPublishToWebEvent.CAMERA_PUBLISH_POINTS));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.achievements.AchievementManager;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.camera.CameraPurchaseOKMessageComposer;
|
import com.eu.habbo.messages.outgoing.camera.CameraPurchaseOKMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.catalog.NotEnoughPointsTypeComposer;
|
import com.eu.habbo.messages.outgoing.catalog.NotEnoughBalanceMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import com.eu.habbo.plugin.events.users.UserPurchasePictureEvent;
|
import com.eu.habbo.plugin.events.users.UserPurchasePictureEvent;
|
||||||
@ -18,12 +18,12 @@ public class CameraPurchaseEvent extends MessageHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void handle() throws Exception {
|
public void handle() throws Exception {
|
||||||
if (this.client.getHabbo().getHabboInfo().getCredits() < CameraPurchaseEvent.CAMERA_PURCHASE_CREDITS) {
|
if (this.client.getHabbo().getHabboInfo().getCredits() < CameraPurchaseEvent.CAMERA_PURCHASE_CREDITS) {
|
||||||
this.client.sendResponse(new NotEnoughPointsTypeComposer(true, false, 0));
|
this.client.sendResponse(new NotEnoughBalanceMessageComposer(true, false, 0));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.client.getHabbo().getHabboInfo().getCurrencyAmount(CameraPurchaseEvent.CAMERA_PURCHASE_POINTS_TYPE) < CameraPurchaseEvent.CAMERA_PURCHASE_POINTS) {
|
if (this.client.getHabbo().getHabboInfo().getCurrencyAmount(CameraPurchaseEvent.CAMERA_PURCHASE_POINTS_TYPE) < CameraPurchaseEvent.CAMERA_PURCHASE_POINTS) {
|
||||||
this.client.sendResponse(new NotEnoughPointsTypeComposer(false, true, CameraPurchaseEvent.CAMERA_PURCHASE_POINTS_TYPE));
|
this.client.sendResponse(new NotEnoughBalanceMessageComposer(false, true, CameraPurchaseEvent.CAMERA_PURCHASE_POINTS_TYPE));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ import com.eu.habbo.habbohotel.users.HabboBadge;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.catalog.*;
|
import com.eu.habbo.messages.outgoing.catalog.*;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.HotelWillCloseInMinutesComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.HotelWillCloseInMinutesComposer;
|
||||||
@ -344,7 +344,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
|||||||
if (showName) {
|
if (showName) {
|
||||||
keys.put("message", Emulator.getTexts().getValue("generic.gift.received").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()));
|
keys.put("message", Emulator.getTexts().getValue("generic.gift.received").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()));
|
||||||
}
|
}
|
||||||
habbo.getClient().sendResponse(new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
habbo.getClient().sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.client.getHabbo().getHabboInfo().getId() != userId) {
|
if (this.client.getHabbo().getHabboInfo().getId() != userId) {
|
||||||
|
@ -15,7 +15,7 @@ import com.eu.habbo.messages.incoming.MessageHandler;
|
|||||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseUnavailableComposer;
|
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseUnavailableComposer;
|
||||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.HotelWillCloseInMinutesComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.HotelWillCloseInMinutesComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
@ -126,7 +126,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
|||||||
keys.put("display", "BUBBLE");
|
keys.put("display", "BUBBLE");
|
||||||
keys.put("image", "${image.library.url}album1584/" + badge.getCode() + ".gif");
|
keys.put("image", "${image.library.url}album1584/" + badge.getCode() + ".gif");
|
||||||
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
keys.put("message", Emulator.getTexts().getValue("commands.generic.cmd_badge.received"));
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys)); //:test 1992 s:npc.gift.received i:2 s:npc_name s:Admin s:image s:${image.library.url}album1584/ADM.gif);
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys)); //:test 1992 s:npc.gift.received i:2 s:npc_name s:Admin s:image s:${image.library.url}album1584/ADM.gif);
|
||||||
} else {
|
} else {
|
||||||
badgeFound[0] = true;
|
badgeFound[0] = true;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package com.eu.habbo.messages.incoming.catalog;
|
|||||||
import com.eu.habbo.Emulator;
|
import com.eu.habbo.Emulator;
|
||||||
import com.eu.habbo.habbohotel.items.SoundTrack;
|
import com.eu.habbo.habbohotel.items.SoundTrack;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeBoxTrackCodeComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.OfficialSongIdMessageComposer;
|
||||||
|
|
||||||
public class JukeBoxRequestTrackCodeEvent extends MessageHandler {
|
public class JukeBoxRequestTrackCodeEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
@ -13,7 +13,7 @@ public class JukeBoxRequestTrackCodeEvent extends MessageHandler {
|
|||||||
final SoundTrack track = Emulator.getGameEnvironment().getItemManager().getSoundTrack(songName);
|
final SoundTrack track = Emulator.getGameEnvironment().getItemManager().getSoundTrack(songName);
|
||||||
|
|
||||||
if (track != null) {
|
if (track != null) {
|
||||||
this.client.sendResponse(new JukeBoxTrackCodeComposer(track));
|
this.client.sendResponse(new OfficialSongIdMessageComposer(track));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import com.eu.habbo.habbohotel.rooms.*;
|
|||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer;
|
import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer;
|
||||||
@ -59,7 +59,7 @@ public class FloorPlanEditorSaveEvent extends MessageHandler {
|
|||||||
else if (Arrays.stream(mapRows).anyMatch(l -> l.length() > 64 || l.length() == 0)) errors.add("${notification.floorplan_editor.error.message.too_large_width}");
|
else if (Arrays.stream(mapRows).anyMatch(l -> l.length() > 64 || l.length() == 0)) errors.add("${notification.floorplan_editor.error.message.too_large_width}");
|
||||||
|
|
||||||
if (errors.length() > 0) {
|
if (errors.length() > 0) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FLOORPLAN_EDITOR_ERROR.key, errors.toString()));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FLOORPLAN_EDITOR_ERROR.key, errors.toString()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ public class FloorPlanEditorSaveEvent extends MessageHandler {
|
|||||||
|
|
||||||
|
|
||||||
if (errors.length() > 0) {
|
if (errors.length() > 0) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FLOORPLAN_EDITOR_ERROR.key, errors.toString()));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FLOORPLAN_EDITOR_ERROR.key, errors.toString()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.guilds.forums.ForumThreadComment;
|
|||||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState;
|
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState;
|
||||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.PostUpdateMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.PostUpdateMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
|
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
|
||||||
@ -66,10 +66,10 @@ public class GuildForumModerateMessageEvent extends MessageHandler {
|
|||||||
switch (state) {
|
switch (state) {
|
||||||
case 10:
|
case 10:
|
||||||
case 20:
|
case 20:
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FORUMS_MESSAGE_HIDDEN.key).compose());
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_MESSAGE_HIDDEN.key).compose());
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FORUMS_MESSAGE_RESTORED.key).compose());
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_MESSAGE_RESTORED.key).compose());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
|||||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState;
|
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState;
|
||||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadMessagesComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadMessagesComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadsComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadsComposer;
|
||||||
@ -52,10 +52,10 @@ public class GuildForumModerateThreadEvent extends MessageHandler {
|
|||||||
switch (state) {
|
switch (state) {
|
||||||
case 10:
|
case 10:
|
||||||
case 20:
|
case 20:
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FORUMS_THREAD_HIDDEN.key).compose());
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_THREAD_HIDDEN.key).compose());
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FORUMS_THREAD_RESTORED.key).compose());
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_THREAD_RESTORED.key).compose());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.guilds.SettingsState;
|
|||||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
||||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadsComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadsComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.ThreadUpdatedMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.ThreadUpdatedMessageComposer;
|
||||||
@ -47,11 +47,11 @@ public class GuildForumThreadUpdateEvent extends MessageHandler {
|
|||||||
|
|
||||||
boolean pinChanged = isPinned != thread.isPinned();
|
boolean pinChanged = isPinned != thread.isPinned();
|
||||||
if (pinChanged) {
|
if (pinChanged) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(isPinned ? BubbleAlertKeys.FORUMS_THREAD_PINNED.key : BubbleAlertKeys.FORUMS_THREAD_UNPINNED.key).compose());
|
this.client.sendResponse(new NotificationDialogMessageComposer(isPinned ? BubbleAlertKeys.FORUMS_THREAD_PINNED.key : BubbleAlertKeys.FORUMS_THREAD_UNPINNED.key).compose());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLocked != thread.isLocked()) {
|
if (isLocked != thread.isLocked()) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(isLocked ? BubbleAlertKeys.FORUMS_THREAD_LOCKED.key : BubbleAlertKeys.FORUMS_THREAD_UNLOCKED.key).compose());
|
this.client.sendResponse(new NotificationDialogMessageComposer(isLocked ? BubbleAlertKeys.FORUMS_THREAD_LOCKED.key : BubbleAlertKeys.FORUMS_THREAD_UNLOCKED.key).compose());
|
||||||
}
|
}
|
||||||
|
|
||||||
thread.setPinned(isPinned);
|
thread.setPinned(isPinned);
|
||||||
|
@ -10,7 +10,6 @@ import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState;
|
|||||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumCommentsComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumCommentsComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.ForumDataMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.ForumDataMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
|
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
|
||||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
|
|||||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||||
import com.eu.habbo.habbohotel.guilds.SettingsState;
|
import com.eu.habbo.habbohotel.guilds.SettingsState;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.ForumDataMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.ForumDataMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
|
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
|
||||||
@ -39,7 +39,7 @@ public class GuildForumUpdateSettingsEvent extends MessageHandler {
|
|||||||
|
|
||||||
Emulator.getThreading().run(guild);
|
Emulator.getThreading().run(guild);
|
||||||
|
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FORUMS_FORUM_SETTINGS_UPDATED.key).compose());
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_FORUM_SETTINGS_UPDATED.key).compose());
|
||||||
|
|
||||||
this.client.sendResponse(new ForumDataMessageComposer(guild, this.client.getHabbo()));
|
this.client.sendResponse(new ForumDataMessageComposer(guild, this.client.getHabbo()));
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ import com.eu.habbo.messages.outgoing.habboway.nux.InClientLinkMessageComposer;
|
|||||||
import com.eu.habbo.messages.outgoing.handshake.EnableNotificationsComposer;
|
import com.eu.habbo.messages.outgoing.handshake.EnableNotificationsComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.AuthenticationOKMessageComposer;
|
import com.eu.habbo.messages.outgoing.handshake.AuthenticationOKMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.AvailabilityStatusMessageComposer;
|
import com.eu.habbo.messages.outgoing.handshake.AvailabilityStatusMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.PingComposer;
|
import com.eu.habbo.messages.outgoing.handshake.PingMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.BadgePointLimitsComposer;
|
import com.eu.habbo.messages.outgoing.inventory.BadgePointLimitsComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.AvatarEffectsMessageComposer;
|
import com.eu.habbo.messages.outgoing.inventory.AvatarEffectsMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.modtool.CfhTopicsInitComposer;
|
import com.eu.habbo.messages.outgoing.modtool.CfhTopicsInitComposer;
|
||||||
@ -206,7 +206,7 @@ public class SecureLoginEvent extends MessageHandler {
|
|||||||
messages.add(new NoobnessLevelMessageComposer(habbo).compose());
|
messages.add(new NoobnessLevelMessageComposer(habbo).compose());
|
||||||
messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose());
|
messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose());
|
||||||
messages.add(new AvailabilityStatusMessageComposer(true, false, true).compose());
|
messages.add(new AvailabilityStatusMessageComposer(true, false, true).compose());
|
||||||
messages.add(new PingComposer().compose());
|
messages.add(new PingMessageComposer().compose());
|
||||||
messages.add(new EnableNotificationsComposer(Emulator.getConfig().getBoolean("bubblealerts.enabled", true)).compose());
|
messages.add(new EnableNotificationsComposer(Emulator.getConfig().getBoolean("bubblealerts.enabled", true)).compose());
|
||||||
messages.add(new AchievementsScoreComposer(this.client.getHabbo()).compose());
|
messages.add(new AchievementsScoreComposer(this.client.getHabbo()).compose());
|
||||||
messages.add(new IsFirstLoginOfDayComposer(true).compose());
|
messages.add(new IsFirstLoginOfDayComposer(true).compose());
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.eu.habbo.messages.incoming.inventory;
|
package com.eu.habbo.messages.incoming.inventory;
|
||||||
|
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.InventoryPetsComposer;
|
import com.eu.habbo.messages.outgoing.inventory.PetInventoryComposer;
|
||||||
|
|
||||||
public class RequestInventoryPetsEvent extends MessageHandler {
|
public class RequestInventoryPetsEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
public void handle() throws Exception {
|
public void handle() throws Exception {
|
||||||
this.client.sendResponse(new InventoryPetsComposer(this.client.getHabbo()));
|
this.client.sendResponse(new PetInventoryComposer(this.client.getHabbo()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.pets.RideablePet;
|
|||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
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.inventory.AddPetComposer;
|
import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer;
|
||||||
import com.eu.habbo.plugin.events.navigator.NavigatorRoomDeletedEvent;
|
import com.eu.habbo.plugin.events.navigator.NavigatorRoomDeletedEvent;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -62,7 +62,7 @@ public class RequestDeleteRoomEvent extends MessageHandler {
|
|||||||
Habbo owner = Emulator.getGameEnvironment().getHabboManager().getHabbo(pet.getUserId());
|
Habbo owner = Emulator.getGameEnvironment().getHabboManager().getHabbo(pet.getUserId());
|
||||||
|
|
||||||
if (owner != null) {
|
if (owner != null) {
|
||||||
owner.getClient().sendResponse(new AddPetComposer(pet));
|
owner.getClient().sendResponse(new PetAddedToInventoryComposer(pet));
|
||||||
owner.getInventory().getPetsComponent().addPet(pet);
|
owner.getInventory().getPetsComponent().addPet(pet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package com.eu.habbo.messages.incoming.polls;
|
|||||||
import com.eu.habbo.Emulator;
|
import com.eu.habbo.Emulator;
|
||||||
import com.eu.habbo.habbohotel.polls.Poll;
|
import com.eu.habbo.habbohotel.polls.Poll;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.polls.PollQuestionsComposer;
|
import com.eu.habbo.messages.outgoing.polls.PollContentsComposer;
|
||||||
|
|
||||||
public class GetPollDataEvent extends MessageHandler {
|
public class GetPollDataEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
@ -13,7 +13,7 @@ public class GetPollDataEvent extends MessageHandler {
|
|||||||
Poll poll = Emulator.getGameEnvironment().getPollManager().getPoll(pollId);
|
Poll poll = Emulator.getGameEnvironment().getPollManager().getPoll(pollId);
|
||||||
|
|
||||||
if (poll != null) {
|
if (poll != null) {
|
||||||
this.client.sendResponse(new PollQuestionsComposer(poll));
|
this.client.sendResponse(new PollContentsComposer(poll));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
|||||||
import com.eu.habbo.habbohotel.rooms.RoomRightLevels;
|
import com.eu.habbo.habbohotel.rooms.RoomRightLevels;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
|
|
||||||
public class MoveWallItemEvent extends MessageHandler {
|
public class MoveWallItemEvent extends MessageHandler {
|
||||||
@ -18,7 +18,7 @@ public class MoveWallItemEvent extends MessageHandler {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!room.hasRights(this.client.getHabbo()) && !this.client.getHabbo().hasPermission(Permission.ACC_PLACEFURNI) && !(room.getGuildId() > 0 && room.getGuildRightLevel(this.client.getHabbo()).isEqualOrGreaterThan(RoomRightLevels.GUILD_RIGHTS))) {
|
if (!room.hasRights(this.client.getHabbo()) && !this.client.getHabbo().hasPermission(Permission.ACC_PLACEFURNI) && !(room.getGuildId() > 0 && room.getGuildRightLevel(this.client.getHabbo()).isEqualOrGreaterThan(RoomRightLevels.GUILD_RIGHTS))) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.rooms.FurnitureMovementError;
|
|||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListRemoveComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListRemoveComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.ItemAddMessageComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.ItemAddMessageComposer;
|
||||||
@ -46,7 +46,7 @@ public class PostItPlaceEvent extends MessageHandler {
|
|||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.MAX_STICKIES.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.MAX_STICKIES.errorCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
//this.client.sendResponse(new PostItStickyPoleOpenComposer(item));
|
//this.client.sendResponse(new PostItStickyPoleOpenComposer(item));
|
||||||
|
@ -6,7 +6,7 @@ import com.eu.habbo.habbohotel.items.interactions.InteractionClothing;
|
|||||||
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.HeightMapUpdateMessageComposer;
|
import com.eu.habbo.messages.outgoing.rooms.HeightMapUpdateMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
||||||
@ -55,10 +55,10 @@ public class RedeemClothingEvent extends MessageHandler {
|
|||||||
this.client.getHabbo().getInventory().getWardrobeComponent().getClothing().add(clothing.id);
|
this.client.getHabbo().getInventory().getWardrobeComponent().getClothing().add(clothing.id);
|
||||||
this.client.getHabbo().getInventory().getWardrobeComponent().getClothingSets().addAll(clothing.setId);
|
this.client.getHabbo().getInventory().getWardrobeComponent().getClothingSets().addAll(clothing.setId);
|
||||||
this.client.sendResponse(new FigureSetIdsComposer(this.client.getHabbo()));
|
this.client.sendResponse(new FigureSetIdsComposer(this.client.getHabbo()));
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FIGURESET_REDEEMED.key));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FIGURESET_REDEEMED.key));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FIGURESET_OWNED_ALREADY.key));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FIGURESET_OWNED_ALREADY.key));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOGGER.error("[Catalog] No definition in catalog_clothing found for clothing name " + item.getBaseItem().getName() + ". Could not redeem clothing!");
|
LOGGER.error("[Catalog] No definition in catalog_clothing found for clothing name " + item.getBaseItem().getName() + ". Could not redeem clothing!");
|
||||||
|
@ -6,7 +6,7 @@ import com.eu.habbo.habbohotel.modtool.ScripterManager;
|
|||||||
import com.eu.habbo.habbohotel.rooms.*;
|
import com.eu.habbo.habbohotel.rooms.*;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListRemoveComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListRemoveComposer;
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ public class RoomPlaceItemEvent extends MessageHandler {
|
|||||||
if (values.length != 0) itemId = Integer.parseInt(values[0]);
|
if (values.length != 0) itemId = Integer.parseInt(values[0]);
|
||||||
|
|
||||||
if (!this.client.getHabbo().getRoomUnit().isInRoom()) {
|
if (!this.client.getHabbo().getRoomUnit().isInRoom()) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,11 +44,11 @@ public class RoomPlaceItemEvent extends MessageHandler {
|
|||||||
|
|
||||||
//TODO move this to canStackAt() though find a way to handle the different bubble alert keys
|
//TODO move this to canStackAt() though find a way to handle the different bubble alert keys
|
||||||
if (item instanceof InteractionMoodLight && !room.getRoomSpecialTypes().getItemsOfType(InteractionMoodLight.class).isEmpty()) {
|
if (item instanceof InteractionMoodLight && !room.getRoomSpecialTypes().getItemsOfType(InteractionMoodLight.class).isEmpty()) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.MAX_DIMMERS.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.MAX_DIMMERS.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (item instanceof InteractionJukeBox && !room.getRoomSpecialTypes().getItemsOfType(InteractionJukeBox.class).isEmpty()) {
|
if (item instanceof InteractionJukeBox && !room.getRoomSpecialTypes().getItemsOfType(InteractionJukeBox.class).isEmpty()) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.MAX_SOUNDFURNI.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.MAX_SOUNDFURNI.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,30 +83,30 @@ public class RoomPlaceItemEvent extends MessageHandler {
|
|||||||
item instanceof InteractionCannon ||
|
item instanceof InteractionCannon ||
|
||||||
item instanceof InteractionPuzzleBox ||
|
item instanceof InteractionPuzzleBox ||
|
||||||
item.getBaseItem().getType() == FurnitureType.WALL) {
|
item.getBaseItem().getType() == FurnitureType.WALL) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (rentSpace != null && !RoomLayout.squareInSquare(RoomLayout.getRectangle(rentSpace.getX(), rentSpace.getY(), rentSpace.getBaseItem().getWidth(), rentSpace.getBaseItem().getLength(), rentSpace.getRotation()), RoomLayout.getRectangle(x, y, item.getBaseItem().getWidth(), item.getBaseItem().getLength(), rotation))) {
|
if (rentSpace != null && !RoomLayout.squareInSquare(RoomLayout.getRectangle(rentSpace.getX(), rentSpace.getY(), rentSpace.getBaseItem().getWidth(), rentSpace.getBaseItem().getLength(), rentSpace.getRotation()), RoomLayout.getRectangle(x, y, item.getBaseItem().getWidth(), item.getBaseItem().getLength(), rotation))) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FurnitureMovementError error = room.canPlaceFurnitureAt(item, this.client.getHabbo(), tile, rotation);
|
FurnitureMovementError error = room.canPlaceFurnitureAt(item, this.client.getHabbo(), tile, rotation);
|
||||||
|
|
||||||
if (!error.equals(FurnitureMovementError.NONE)) {
|
if (!error.equals(FurnitureMovementError.NONE)) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
error = room.placeFloorFurniAt(item, tile, rotation, this.client.getHabbo());
|
error = room.placeFloorFurniAt(item, tile, rotation, this.client.getHabbo());
|
||||||
if (!error.equals(FurnitureMovementError.NONE)) {
|
if (!error.equals(FurnitureMovementError.NONE)) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FurnitureMovementError error = room.placeWallFurniAt(item, values[1] + " " + values[2] + " " + values[3], this.client.getHabbo());
|
FurnitureMovementError error = room.placeWallFurniAt(item, values[1] + " " + values[2] + " " + values[3], this.client.getHabbo());
|
||||||
if (!error.equals(FurnitureMovementError.NONE)) {
|
if (!error.equals(FurnitureMovementError.NONE)) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,9 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
|||||||
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.FloorItemUpdateComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.ObjectUpdateMessageComposer;
|
||||||
|
|
||||||
public class RotateMoveItemEvent extends MessageHandler {
|
public class RotateMoveItemEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
@ -28,15 +28,15 @@ public class RotateMoveItemEvent extends MessageHandler {
|
|||||||
|
|
||||||
FurnitureMovementError error = room.canPlaceFurnitureAt(item, this.client.getHabbo(), tile, rotation);
|
FurnitureMovementError error = room.canPlaceFurnitureAt(item, this.client.getHabbo(), tile, rotation);
|
||||||
if (!error.equals(FurnitureMovementError.NONE)) {
|
if (!error.equals(FurnitureMovementError.NONE)) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
||||||
this.client.sendResponse(new FloorItemUpdateComposer(item));
|
this.client.sendResponse(new ObjectUpdateMessageComposer(item));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
error = room.moveFurniTo(item, tile, rotation, this.client.getHabbo());
|
error = room.moveFurniTo(item, tile, rotation, this.client.getHabbo());
|
||||||
if (!error.equals(FurnitureMovementError.NONE)) {
|
if (!error.equals(FurnitureMovementError.NONE)) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, error.errorCode));
|
||||||
this.client.sendResponse(new FloorItemUpdateComposer(item));
|
this.client.sendResponse(new ObjectUpdateMessageComposer(item));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,10 +9,9 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.PetPackageComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.OpenPetPackageRequestedMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
|
||||||
import com.eu.habbo.plugin.Event;
|
import com.eu.habbo.plugin.Event;
|
||||||
import com.eu.habbo.plugin.events.furniture.FurniturePickedUpEvent;
|
|
||||||
import com.eu.habbo.plugin.events.furniture.FurnitureToggleEvent;
|
import com.eu.habbo.plugin.events.furniture.FurnitureToggleEvent;
|
||||||
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
|
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -123,7 +122,7 @@ public class ToggleFloorItemEvent extends MessageHandler {
|
|||||||
item.getBaseItem().getName().equalsIgnoreCase("velociraptor_egg") ||
|
item.getBaseItem().getName().equalsIgnoreCase("velociraptor_egg") ||
|
||||||
item.getBaseItem().getName().equalsIgnoreCase("pterosaur_egg") ||
|
item.getBaseItem().getName().equalsIgnoreCase("pterosaur_egg") ||
|
||||||
item.getBaseItem().getName().equalsIgnoreCase("petbox_epic")) && room.getCurrentPets().size() < Room.MAXIMUM_PETS) {
|
item.getBaseItem().getName().equalsIgnoreCase("petbox_epic")) && room.getCurrentPets().size() < Room.MAXIMUM_PETS) {
|
||||||
this.client.sendResponse(new PetPackageComposer(item));
|
this.client.sendResponse(new OpenPetPackageRequestedMessageComposer(item));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.pets.Pet;
|
|||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.AddFloorItemComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.ObjectAddMessageComposer;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ public class CompostMonsterplantEvent extends MessageHandler {
|
|||||||
compost.setZ(pet.getRoomUnit().getZ());
|
compost.setZ(pet.getRoomUnit().getZ());
|
||||||
compost.setRotation(pet.getRoomUnit().getBodyRotation().getValue());
|
compost.setRotation(pet.getRoomUnit().getBodyRotation().getValue());
|
||||||
room.addHabboItem(compost);
|
room.addHabboItem(compost);
|
||||||
room.sendComposer(new AddFloorItemComposer(compost, this.client.getHabbo().getHabboInfo().getUsername()).compose());
|
room.sendComposer(new ObjectAddMessageComposer(compost, this.client.getHabbo().getHabboInfo().getUsername()).compose());
|
||||||
}
|
}
|
||||||
|
|
||||||
pet.removeFromRoom();
|
pet.removeFromRoom();
|
||||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.users.HabboItem;
|
|||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetHorseFigureComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetFigureUpdateComposer;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ public class HorseRemoveSaddleEvent extends MessageHandler {
|
|||||||
horse.hasSaddle(false);
|
horse.hasSaddle(false);
|
||||||
horse.needsUpdate = true;
|
horse.needsUpdate = true;
|
||||||
Emulator.getThreading().run(pet);
|
Emulator.getThreading().run(pet);
|
||||||
this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomPetHorseFigureComposer(horse).compose());
|
this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new PetFigureUpdateComposer(horse).compose());
|
||||||
|
|
||||||
HabboItem saddle = Emulator.getGameEnvironment().getItemManager().createItem(this.client.getHabbo().getHabboInfo().getId(), saddleItem, 0, 0, "");
|
HabboItem saddle = Emulator.getGameEnvironment().getItemManager().createItem(this.client.getHabbo().getHabboInfo().getId(), saddleItem, 0, 0, "");
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.messages.incoming.MessageHandler;
|
|||||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.HeightMapUpdateMessageComposer;
|
import com.eu.habbo.messages.outgoing.rooms.HeightMapUpdateMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.PetPackageNameValidationComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PerkAllowancesComposer;
|
||||||
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
|
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
|
||||||
|
|
||||||
public class PetPackageNameEvent extends MessageHandler {
|
public class PetPackageNameEvent extends MessageHandler {
|
||||||
@ -68,7 +68,7 @@ public class PetPackageNameEvent extends MessageHandler {
|
|||||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.client.sendResponse(new PetPackageNameValidationComposer(itemId, PetPackageNameValidationComposer.CONTAINS_INVALID_CHARS, name.replaceAll("^[a-zA-Z0-9]*$", "")));
|
this.client.sendResponse(new PerkAllowancesComposer(itemId, PerkAllowancesComposer.CONTAINS_INVALID_CHARS, name.replaceAll("^[a-zA-Z0-9]*$", "")));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,6 +76,6 @@ public class PetPackageNameEvent extends MessageHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.client.sendResponse(new PetPackageNameValidationComposer(itemId, PetPackageNameValidationComposer.CLOSE_WIDGET, ""));
|
this.client.sendResponse(new PerkAllowancesComposer(itemId, PerkAllowancesComposer.CLOSE_WIDGET, ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.pets.RideablePet;
|
|||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
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.inventory.AddPetComposer;
|
import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer;
|
||||||
|
|
||||||
public class PetPickupEvent extends MessageHandler {
|
public class PetPickupEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
@ -40,13 +40,13 @@ public class PetPickupEvent extends MessageHandler {
|
|||||||
Emulator.getThreading().run(pet);
|
Emulator.getThreading().run(pet);
|
||||||
|
|
||||||
if (this.client.getHabbo().getHabboInfo().getId() == pet.getUserId()) {
|
if (this.client.getHabbo().getHabboInfo().getId() == pet.getUserId()) {
|
||||||
this.client.sendResponse(new AddPetComposer(pet));
|
this.client.sendResponse(new PetAddedToInventoryComposer(pet));
|
||||||
this.client.getHabbo().getInventory().getPetsComponent().addPet(pet);
|
this.client.getHabbo().getInventory().getPetsComponent().addPet(pet);
|
||||||
} else {
|
} else {
|
||||||
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(pet.getUserId());
|
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(pet.getUserId());
|
||||||
|
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
habbo.getClient().sendResponse(new AddPetComposer(pet));
|
habbo.getClient().sendResponse(new PetAddedToInventoryComposer(pet));
|
||||||
habbo.getInventory().getPetsComponent().addPet(pet);
|
habbo.getInventory().getPetsComponent().addPet(pet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@ import com.eu.habbo.habbohotel.permissions.Permission;
|
|||||||
import com.eu.habbo.habbohotel.pets.Pet;
|
import com.eu.habbo.habbohotel.pets.Pet;
|
||||||
import com.eu.habbo.habbohotel.rooms.*;
|
import com.eu.habbo.habbohotel.rooms.*;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.PetErrorComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.PetPlacingErrorComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.RemovePetComposer;
|
import com.eu.habbo.messages.outgoing.inventory.PetRemovedFromInventoryComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetComposer;
|
||||||
|
|
||||||
public class PetPlaceEvent extends MessageHandler {
|
public class PetPlaceEvent extends MessageHandler {
|
||||||
@ -18,7 +18,7 @@ public class PetPlaceEvent extends MessageHandler {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (this.client.getHabbo().getHabboInfo().getId() != room.getOwnerId() && !room.isAllowPets() && !(this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission(Permission.ACC_PLACEFURNI))) {
|
if (this.client.getHabbo().getHabboInfo().getId() != room.getOwnerId() && !room.isAllowPets() && !(this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission(Permission.ACC_PLACEFURNI))) {
|
||||||
this.client.sendResponse(new PetErrorComposer(PetErrorComposer.ROOM_ERROR_PETS_FORBIDDEN_IN_FLAT));
|
this.client.sendResponse(new PetPlacingErrorComposer(PetPlacingErrorComposer.ROOM_ERROR_PETS_FORBIDDEN_IN_FLAT));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ public class PetPlaceEvent extends MessageHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (room.getCurrentPets().size() >= Room.MAXIMUM_PETS && !this.client.getHabbo().hasPermission(Permission.ACC_UNLIMITED_PETS)) {
|
if (room.getCurrentPets().size() >= Room.MAXIMUM_PETS && !this.client.getHabbo().hasPermission(Permission.ACC_UNLIMITED_PETS)) {
|
||||||
this.client.sendResponse(new PetErrorComposer(PetErrorComposer.ROOM_ERROR_MAX_PETS));
|
this.client.sendResponse(new PetPlacingErrorComposer(PetPlacingErrorComposer.ROOM_ERROR_MAX_PETS));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ public class PetPlaceEvent extends MessageHandler {
|
|||||||
tile = room.getLayout().getTileInFront(this.client.getHabbo().getRoomUnit().getCurrentLocation(), this.client.getHabbo().getRoomUnit().getBodyRotation().getValue());
|
tile = room.getLayout().getTileInFront(this.client.getHabbo().getRoomUnit().getCurrentLocation(), this.client.getHabbo().getRoomUnit().getBodyRotation().getValue());
|
||||||
|
|
||||||
if (tile == null || !tile.isWalkable()) {
|
if (tile == null || !tile.isWalkable()) {
|
||||||
this.client.sendResponse(new PetErrorComposer(PetErrorComposer.ROOM_ERROR_PETS_NO_FREE_TILES));
|
this.client.sendResponse(new PetPlacingErrorComposer(PetPlacingErrorComposer.ROOM_ERROR_PETS_NO_FREE_TILES));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check if tile exists and is walkable. Else place it in the current location the Habbo is standing.
|
//Check if tile exists and is walkable. Else place it in the current location the Habbo is standing.
|
||||||
@ -62,7 +62,7 @@ public class PetPlaceEvent extends MessageHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tile == null || !tile.isWalkable() || !tile.getAllowStack()) {
|
if (tile == null || !tile.isWalkable() || !tile.getAllowStack()) {
|
||||||
this.client.sendResponse(new PetErrorComposer(PetErrorComposer.ROOM_ERROR_PETS_SELECTED_TILE_NOT_FREE));
|
this.client.sendResponse(new PetPlacingErrorComposer(PetPlacingErrorComposer.ROOM_ERROR_PETS_SELECTED_TILE_NOT_FREE));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,6 +88,6 @@ public class PetPlaceEvent extends MessageHandler {
|
|||||||
Emulator.getThreading().run(pet);
|
Emulator.getThreading().run(pet);
|
||||||
room.sendComposer(new RoomPetComposer(pet).compose());
|
room.sendComposer(new RoomPetComposer(pet).compose());
|
||||||
this.client.getHabbo().getInventory().getPetsComponent().removePet(pet);
|
this.client.getHabbo().getInventory().getPetsComponent().removePet(pet);
|
||||||
this.client.sendResponse(new RemovePetComposer(pet));
|
this.client.sendResponse(new PetRemovedFromInventoryComposer(pet));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.habbohotel.pets.HorsePet;
|
|||||||
import com.eu.habbo.habbohotel.pets.Pet;
|
import com.eu.habbo.habbohotel.pets.Pet;
|
||||||
import com.eu.habbo.habbohotel.pets.RideablePet;
|
import com.eu.habbo.habbohotel.pets.RideablePet;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetHorseFigureComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetFigureUpdateComposer;
|
||||||
|
|
||||||
public class PetRideSettingsEvent extends MessageHandler {
|
public class PetRideSettingsEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
@ -29,7 +29,7 @@ public class PetRideSettingsEvent extends MessageHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pet instanceof HorsePet) {
|
if (pet instanceof HorsePet) {
|
||||||
this.client.sendResponse(new RoomPetHorseFigureComposer((HorsePet) pet));
|
this.client.sendResponse(new PetFigureUpdateComposer((HorsePet) pet));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ import com.eu.habbo.habbohotel.users.HabboItem;
|
|||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.PetStatusUpdateComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetStatusUpdateComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetHorseFigureComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetFigureUpdateComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
|
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
|
||||||
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
|
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ public class PetUseItemEvent extends MessageHandler {
|
|||||||
|
|
||||||
if (((HorsePet) pet).needsUpdate) {
|
if (((HorsePet) pet).needsUpdate) {
|
||||||
Emulator.getThreading().run(pet);
|
Emulator.getThreading().run(pet);
|
||||||
this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomPetHorseFigureComposer((HorsePet) pet).compose());
|
this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new PetFigureUpdateComposer((HorsePet) pet).compose());
|
||||||
|
|
||||||
room.removeHabboItem(item);
|
room.removeHabboItem(item);
|
||||||
room.sendComposer(new RemoveFloorItemComposer(item, true).compose());
|
room.sendComposer(new RemoveFloorItemComposer(item, true).compose());
|
||||||
|
@ -3,7 +3,7 @@ package com.eu.habbo.messages.incoming.rooms.pets;
|
|||||||
import com.eu.habbo.habbohotel.pets.Pet;
|
import com.eu.habbo.habbohotel.pets.Pet;
|
||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.pets.PetInformationComposer;
|
import com.eu.habbo.messages.outgoing.rooms.pets.PetInfoMessageComposer;
|
||||||
|
|
||||||
public class RequestPetInformationEvent extends MessageHandler {
|
public class RequestPetInformationEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
@ -18,7 +18,7 @@ public class RequestPetInformationEvent extends MessageHandler {
|
|||||||
Pet pet = room.getPet(petId);
|
Pet pet = room.getPet(petId);
|
||||||
|
|
||||||
if (pet != null) {
|
if (pet != null) {
|
||||||
this.client.sendResponse(new PetInformationComposer(pet, room, this.client.getHabbo()));
|
this.client.sendResponse(new PetInfoMessageComposer(pet, room, this.client.getHabbo()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.rooms.RoomTile;
|
|||||||
import com.eu.habbo.habbohotel.rooms.RoomTileState;
|
import com.eu.habbo.habbohotel.rooms.RoomTileState;
|
||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.FloorItemOnRollerComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.FloorItemOnRollerComposer;
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ public class WiredApplySetConditionsEvent extends MessageHandler {
|
|||||||
|
|
||||||
// Executing Habbo has to be in a Room
|
// Executing Habbo has to be in a Room
|
||||||
if (!this.client.getHabbo().getRoomUnit().isInRoom()) {
|
if (!this.client.getHabbo().getRoomUnit().isInRoom()) {
|
||||||
this.client.sendResponse(new BubbleAlertComposer(
|
this.client.sendResponse(new NotificationDialogMessageComposer(
|
||||||
BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key,
|
BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key,
|
||||||
FurnitureMovementError.NO_RIGHTS.errorCode
|
FurnitureMovementError.NO_RIGHTS.errorCode
|
||||||
));
|
));
|
||||||
|
@ -4,12 +4,12 @@ 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 NotEnoughPointsTypeComposer extends MessageComposer {
|
public class NotEnoughBalanceMessageComposer extends MessageComposer {
|
||||||
private final boolean isCredits;
|
private final boolean isCredits;
|
||||||
private final boolean isPixels;
|
private final boolean isPixels;
|
||||||
private final int pointsType;
|
private final int pointsType;
|
||||||
|
|
||||||
public NotEnoughPointsTypeComposer(boolean isCredits, boolean isPixels, int pointsType) {
|
public NotEnoughBalanceMessageComposer(boolean isCredits, boolean isPixels, int pointsType) {
|
||||||
this.isCredits = isCredits;
|
this.isCredits = isCredits;
|
||||||
this.isPixels = isPixels;
|
this.isPixels = isPixels;
|
||||||
this.pointsType = pointsType;
|
this.pointsType = pointsType;
|
@ -5,11 +5,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 PetBoughtNotificationComposer extends MessageComposer {
|
public class PetReceivedMessageComposer extends MessageComposer {
|
||||||
private final Pet pet;
|
private final Pet pet;
|
||||||
private final boolean gift;
|
private final boolean gift;
|
||||||
|
|
||||||
public PetBoughtNotificationComposer(Pet pet, boolean gift) {
|
public PetReceivedMessageComposer(Pet pet, boolean gift) {
|
||||||
this.pet = pet;
|
this.pet = pet;
|
||||||
this.gift = gift;
|
this.gift = gift;
|
||||||
}
|
}
|
@ -7,22 +7,22 @@ import gnu.trove.map.hash.THashMap;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class BubbleAlertComposer extends MessageComposer {
|
public class NotificationDialogMessageComposer extends MessageComposer {
|
||||||
private final String errorKey;
|
private final String errorKey;
|
||||||
private final THashMap<String, String> keys;
|
private final THashMap<String, String> keys;
|
||||||
|
|
||||||
public BubbleAlertComposer(String errorKey, THashMap<String, String> keys) {
|
public NotificationDialogMessageComposer(String errorKey, THashMap<String, String> keys) {
|
||||||
this.errorKey = errorKey;
|
this.errorKey = errorKey;
|
||||||
this.keys = keys;
|
this.keys = keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BubbleAlertComposer(String errorKey, String message) {
|
public NotificationDialogMessageComposer(String errorKey, String message) {
|
||||||
this.errorKey = errorKey;
|
this.errorKey = errorKey;
|
||||||
this.keys = new THashMap<>();
|
this.keys = new THashMap<>();
|
||||||
this.keys.put("message", message);
|
this.keys.put("message", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BubbleAlertComposer(String errorKey) {
|
public NotificationDialogMessageComposer(String errorKey) {
|
||||||
this.errorKey = errorKey;
|
this.errorKey = errorKey;
|
||||||
this.keys = new THashMap<>();
|
this.keys = new THashMap<>();
|
||||||
}
|
}
|
@ -4,7 +4,7 @@ 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 PetErrorComposer extends MessageComposer {
|
public class PetPlacingErrorComposer extends MessageComposer {
|
||||||
public static final int ROOM_ERROR_PETS_FORBIDDEN_IN_HOTEL = 0;
|
public static final int ROOM_ERROR_PETS_FORBIDDEN_IN_HOTEL = 0;
|
||||||
public static final int ROOM_ERROR_PETS_FORBIDDEN_IN_FLAT = 1;
|
public static final int ROOM_ERROR_PETS_FORBIDDEN_IN_FLAT = 1;
|
||||||
public static final int ROOM_ERROR_MAX_PETS = 2;
|
public static final int ROOM_ERROR_MAX_PETS = 2;
|
||||||
@ -14,7 +14,7 @@ public class PetErrorComposer extends MessageComposer {
|
|||||||
|
|
||||||
private final int errorCode;
|
private final int errorCode;
|
||||||
|
|
||||||
public PetErrorComposer(int errorCode) {
|
public PetPlacingErrorComposer(int errorCode) {
|
||||||
this.errorCode = errorCode;
|
this.errorCode = errorCode;
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ 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 PingComposer extends MessageComposer {
|
public class PingMessageComposer extends MessageComposer {
|
||||||
@Override
|
@Override
|
||||||
protected ServerMessage composeInternal() {
|
protected ServerMessage composeInternal() {
|
||||||
this.response.init(Outgoing.PingMessageComposer);
|
this.response.init(Outgoing.PingMessageComposer);
|
@ -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 AddPetComposer extends MessageComposer {
|
public class PetAddedToInventoryComposer extends MessageComposer {
|
||||||
private final Pet pet;
|
private final Pet pet;
|
||||||
|
|
||||||
public AddPetComposer(Pet pet) {
|
public PetAddedToInventoryComposer(Pet pet) {
|
||||||
this.pet = pet;
|
this.pet = pet;
|
||||||
}
|
}
|
||||||
|
|
@ -9,10 +9,10 @@ import gnu.trove.iterator.TIntObjectIterator;
|
|||||||
|
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
public class InventoryPetsComposer extends MessageComposer {
|
public class PetInventoryComposer extends MessageComposer {
|
||||||
private final Habbo habbo;
|
private final Habbo habbo;
|
||||||
|
|
||||||
public InventoryPetsComposer(Habbo habbo) {
|
public PetInventoryComposer(Habbo habbo) {
|
||||||
this.habbo = habbo;
|
this.habbo = habbo;
|
||||||
}
|
}
|
||||||
|
|
@ -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 RemovePetComposer extends MessageComposer {
|
public class PetRemovedFromInventoryComposer extends MessageComposer {
|
||||||
private final int petId;
|
private final int petId;
|
||||||
|
|
||||||
public RemovePetComposer(Pet pet) {
|
public PetRemovedFromInventoryComposer(Pet pet) {
|
||||||
this.petId = pet.getId();
|
this.petId = pet.getId();
|
||||||
}
|
}
|
||||||
|
|
@ -6,10 +6,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 PollQuestionsComposer extends MessageComposer {
|
public class PollContentsComposer extends MessageComposer {
|
||||||
private final Poll poll;
|
private final Poll poll;
|
||||||
|
|
||||||
public PollQuestionsComposer(Poll poll) {
|
public PollContentsComposer(Poll poll) {
|
||||||
this.poll = poll;
|
this.poll = poll;
|
||||||
}
|
}
|
||||||
|
|
@ -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 PollStartComposer extends MessageComposer {
|
public class PollOfferComposer extends MessageComposer {
|
||||||
private final Poll poll;
|
private final Poll poll;
|
||||||
|
|
||||||
public PollStartComposer(Poll poll) {
|
public PollOfferComposer(Poll poll) {
|
||||||
this.poll = poll;
|
this.poll = poll;
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ 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 RoomOpenComposer extends MessageComposer {
|
public class OpenConnectionMessageComposer extends MessageComposer {
|
||||||
@Override
|
@Override
|
||||||
protected ServerMessage composeInternal() {
|
protected ServerMessage composeInternal() {
|
||||||
this.response.init(Outgoing.OpenConnectionMessageComposer);
|
this.response.init(Outgoing.OpenConnectionMessageComposer);
|
@ -7,11 +7,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 AddFloorItemComposer extends MessageComposer {
|
public class ObjectAddMessageComposer extends MessageComposer {
|
||||||
private final HabboItem item;
|
private final HabboItem item;
|
||||||
private final String itemOwnerName;
|
private final String itemOwnerName;
|
||||||
|
|
||||||
public AddFloorItemComposer(HabboItem item, String itemOwnerName) {
|
public ObjectAddMessageComposer(HabboItem item, String itemOwnerName) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
this.itemOwnerName = itemOwnerName == null ? "" : itemOwnerName;
|
this.itemOwnerName = itemOwnerName == null ? "" : itemOwnerName;
|
||||||
}
|
}
|
@ -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 ItemExtraDataComposer extends MessageComposer {
|
public class ObjectDataUpdateMessageComposer extends MessageComposer {
|
||||||
private final HabboItem item;
|
private final HabboItem item;
|
||||||
|
|
||||||
public ItemExtraDataComposer(HabboItem item) {
|
public ObjectDataUpdateMessageComposer(HabboItem item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
}
|
}
|
||||||
|
|
@ -7,10 +7,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 FloorItemUpdateComposer extends MessageComposer {
|
public class ObjectUpdateMessageComposer extends MessageComposer {
|
||||||
private final HabboItem item;
|
private final HabboItem item;
|
||||||
|
|
||||||
public FloorItemUpdateComposer(HabboItem item) {
|
public ObjectUpdateMessageComposer(HabboItem item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
}
|
}
|
||||||
|
|
@ -12,11 +12,11 @@ import gnu.trove.set.hash.THashSet;
|
|||||||
|
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
public class RoomFloorItemsComposer extends MessageComposer {
|
public class ObjectsMessageComposer extends MessageComposer {
|
||||||
private final TIntObjectMap<String> furniOwnerNames;
|
private final TIntObjectMap<String> furniOwnerNames;
|
||||||
private final THashSet<? extends HabboItem> items;
|
private final THashSet<? extends HabboItem> items;
|
||||||
|
|
||||||
public RoomFloorItemsComposer(TIntObjectMap<String> furniOwnerNames, THashSet<? extends HabboItem> items) {
|
public ObjectsMessageComposer(TIntObjectMap<String> furniOwnerNames, THashSet<? extends HabboItem> items) {
|
||||||
this.furniOwnerNames = furniOwnerNames;
|
this.furniOwnerNames = furniOwnerNames;
|
||||||
this.items = items;
|
this.items = items;
|
||||||
}
|
}
|
@ -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 ItemStateComposer extends MessageComposer {
|
public class OneWayDoorStatusMessageComposer extends MessageComposer {
|
||||||
private final HabboItem item;
|
private final HabboItem item;
|
||||||
|
|
||||||
public ItemStateComposer(HabboItem item) {
|
public OneWayDoorStatusMessageComposer(HabboItem item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
}
|
}
|
||||||
|
|
@ -5,12 +5,12 @@ 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 JukeBoxNowPlayingMessageComposer extends MessageComposer {
|
public class NowPlayingMessageComposer extends MessageComposer {
|
||||||
private final SoundTrack track;
|
private final SoundTrack track;
|
||||||
private final int playListId;
|
private final int playListId;
|
||||||
private final int msPlayed;
|
private final int msPlayed;
|
||||||
|
|
||||||
public JukeBoxNowPlayingMessageComposer(SoundTrack track, int playListId, int msPlayed) {
|
public NowPlayingMessageComposer(SoundTrack track, int playListId, int msPlayed) {
|
||||||
this.track = track;
|
this.track = track;
|
||||||
this.playListId = playListId;
|
this.playListId = playListId;
|
||||||
this.msPlayed = msPlayed;
|
this.msPlayed = msPlayed;
|
@ -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 JukeBoxTrackCodeComposer extends MessageComposer {
|
public class OfficialSongIdMessageComposer extends MessageComposer {
|
||||||
private final SoundTrack track;
|
private final SoundTrack track;
|
||||||
|
|
||||||
public JukeBoxTrackCodeComposer(SoundTrack track) {
|
public OfficialSongIdMessageComposer(SoundTrack track) {
|
||||||
this.track = track;
|
this.track = track;
|
||||||
}
|
}
|
||||||
|
|
@ -6,10 +6,10 @@ import com.eu.habbo.messages.outgoing.MessageComposer;
|
|||||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||||
import gnu.trove.set.hash.THashSet;
|
import gnu.trove.set.hash.THashSet;
|
||||||
|
|
||||||
public class JukeBoxPlayListUpdatedComposer extends MessageComposer {
|
public class PlayListMessageComposer extends MessageComposer {
|
||||||
private final THashSet<SoundTrack> tracks;
|
private final THashSet<SoundTrack> tracks;
|
||||||
|
|
||||||
public JukeBoxPlayListUpdatedComposer(THashSet<SoundTrack> tracks) {
|
public PlayListMessageComposer(THashSet<SoundTrack> tracks) {
|
||||||
this.tracks = tracks;
|
this.tracks = tracks;
|
||||||
}
|
}
|
||||||
|
|
@ -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 JukeBoxPlayListAddSongComposer extends MessageComposer {
|
public class PlayListSongAddedMessageComposer extends MessageComposer {
|
||||||
private final SoundTrack track;
|
private final SoundTrack track;
|
||||||
|
|
||||||
public JukeBoxPlayListAddSongComposer(SoundTrack track) {
|
public PlayListSongAddedMessageComposer(SoundTrack track) {
|
||||||
this.track = track;
|
this.track = track;
|
||||||
}
|
}
|
||||||
|
|
@ -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 PetPackageComposer extends MessageComposer {
|
public class OpenPetPackageRequestedMessageComposer extends MessageComposer {
|
||||||
private final HabboItem item;
|
private final HabboItem item;
|
||||||
|
|
||||||
public PetPackageComposer(HabboItem item) {
|
public OpenPetPackageRequestedMessageComposer(HabboItem item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ 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 PetPackageNameValidationComposer extends MessageComposer {
|
public class PerkAllowancesComposer extends MessageComposer {
|
||||||
public static final int CLOSE_WIDGET = 0;
|
public static final int CLOSE_WIDGET = 0;
|
||||||
public static final int NAME_TOO_SHORT = 1;
|
public static final int NAME_TOO_SHORT = 1;
|
||||||
public static final int NAME_TOO_LONG = 2;
|
public static final int NAME_TOO_LONG = 2;
|
||||||
@ -15,7 +15,7 @@ public class PetPackageNameValidationComposer extends MessageComposer {
|
|||||||
private final int errorCode;
|
private final int errorCode;
|
||||||
private final String errorString;
|
private final String errorString;
|
||||||
|
|
||||||
public PetPackageNameValidationComposer(int itemId, int errorCode, String errorString) {
|
public PerkAllowancesComposer(int itemId, int errorCode, String errorString) {
|
||||||
this.itemId = itemId;
|
this.itemId = itemId;
|
||||||
this.errorCode = errorCode;
|
this.errorCode = errorCode;
|
||||||
this.errorString = errorString;
|
this.errorString = errorString;
|
@ -5,11 +5,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 RoomPetExperienceComposer extends MessageComposer {
|
public class PetExperienceComposer extends MessageComposer {
|
||||||
private final Pet pet;
|
private final Pet pet;
|
||||||
private final int amount;
|
private final int amount;
|
||||||
|
|
||||||
public RoomPetExperienceComposer(Pet pet, int amount) {
|
public PetExperienceComposer(Pet pet, int amount) {
|
||||||
this.pet = pet;
|
this.pet = pet;
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
@ -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 RoomPetHorseFigureComposer extends MessageComposer {
|
public class PetFigureUpdateComposer extends MessageComposer {
|
||||||
private final HorsePet pet;
|
private final HorsePet pet;
|
||||||
|
|
||||||
public RoomPetHorseFigureComposer(HorsePet pet) {
|
public PetFigureUpdateComposer(HorsePet pet) {
|
||||||
this.pet = pet;
|
this.pet = pet;
|
||||||
}
|
}
|
||||||
|
|
@ -11,12 +11,12 @@ 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 PetInformationComposer extends MessageComposer {
|
public class PetInfoMessageComposer extends MessageComposer {
|
||||||
private final Pet pet;
|
private final Pet pet;
|
||||||
private final Room room;
|
private final Room room;
|
||||||
private final Habbo requestingHabbo;
|
private final Habbo requestingHabbo;
|
||||||
|
|
||||||
public PetInformationComposer(Pet pet, Room room, Habbo requestingHabbo) {
|
public PetInfoMessageComposer(Pet pet, Room room, Habbo requestingHabbo) {
|
||||||
this.pet = pet;
|
this.pet = pet;
|
||||||
this.room = room;
|
this.room = room;
|
||||||
this.requestingHabbo = requestingHabbo;
|
this.requestingHabbo = requestingHabbo;
|
@ -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 PetLevelUpComposer extends MessageComposer {
|
public class PetLevelNotificationComposer extends MessageComposer {
|
||||||
private final Pet pet;
|
private final Pet pet;
|
||||||
|
|
||||||
public PetLevelUpComposer(Pet pet) {
|
public PetLevelNotificationComposer(Pet pet) {
|
||||||
this.pet = pet;
|
this.pet = pet;
|
||||||
}
|
}
|
||||||
|
|
@ -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 CantScratchPetNotOldEnoughComposer extends MessageComposer {
|
public class PetRespectFailedComposer extends MessageComposer {
|
||||||
private final int currentAge;
|
private final int currentAge;
|
||||||
private final int requiredAge;
|
private final int requiredAge;
|
||||||
|
|
||||||
public CantScratchPetNotOldEnoughComposer(int currentAge, int requiredAge) {
|
public PetRespectFailedComposer(int currentAge, int requiredAge) {
|
||||||
this.currentAge = currentAge;
|
this.currentAge = currentAge;
|
||||||
this.requiredAge = requiredAge;
|
this.requiredAge = requiredAge;
|
||||||
}
|
}
|
@ -5,19 +5,19 @@ 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 RoomPetRespectComposer extends MessageComposer {
|
public class PetRespectNotificationComposer extends MessageComposer {
|
||||||
public final static int PET_RESPECTED = 1;
|
public final static int PET_RESPECTED = 1;
|
||||||
public final static int PET_TREATED = 2;
|
public final static int PET_TREATED = 2;
|
||||||
|
|
||||||
private final Pet pet;
|
private final Pet pet;
|
||||||
private final int type;
|
private final int type;
|
||||||
|
|
||||||
public RoomPetRespectComposer(Pet pet) {
|
public PetRespectNotificationComposer(Pet pet) {
|
||||||
this.pet = pet;
|
this.pet = pet;
|
||||||
this.type = 1;
|
this.type = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RoomPetRespectComposer(Pet pet, int type) {
|
public PetRespectNotificationComposer(Pet pet, int type) {
|
||||||
this.pet = pet;
|
this.pet = pet;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
@ -4,13 +4,13 @@ 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 PetBreedingStartComposer extends MessageComposer {
|
public class PetBreedingComposer extends MessageComposer {
|
||||||
private final int state;
|
private final int state;
|
||||||
private final int anInt1;
|
private final int anInt1;
|
||||||
private final int anInt2;
|
private final int anInt2;
|
||||||
|
|
||||||
|
|
||||||
public PetBreedingStartComposer(int state, int anInt1, int anInt2) {
|
public PetBreedingComposer(int state, int anInt1, int anInt2) {
|
||||||
this.state = state;
|
this.state = state;
|
||||||
this.anInt1 = anInt1;
|
this.anInt1 = anInt1;
|
||||||
this.anInt2 = anInt2;
|
this.anInt2 = anInt2;
|
@ -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 WatchAndEarnRewardComposer extends MessageComposer {
|
public class OfferRewardDeliveredMessageComposer extends MessageComposer {
|
||||||
private final Item item;
|
private final Item item;
|
||||||
|
|
||||||
public WatchAndEarnRewardComposer(Item item) {
|
public OfferRewardDeliveredMessageComposer(Item item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
}
|
}
|
||||||
|
|
@ -4,12 +4,12 @@ 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 UnknownComposer8 extends MessageComposer {
|
public class PetSupplementedNotificationComposer extends MessageComposer {
|
||||||
private final int unknownInt1;
|
private final int unknownInt1;
|
||||||
private final int userId;
|
private final int userId;
|
||||||
private final int unknownInt2;
|
private final int unknownInt2;
|
||||||
|
|
||||||
public UnknownComposer8(int unknownInt1, int userId, int unknownInt2) {
|
public PetSupplementedNotificationComposer(int unknownInt1, int userId, int unknownInt2) {
|
||||||
this.unknownInt1 = unknownInt1;
|
this.unknownInt1 = unknownInt1;
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
this.unknownInt2 = unknownInt2;
|
this.unknownInt2 = unknownInt2;
|
@ -4,7 +4,7 @@ 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 MostUselessErrorAlertComposer extends MessageComposer {
|
public class PollErrorComposer extends MessageComposer {
|
||||||
@Override
|
@Override
|
||||||
protected ServerMessage composeInternal() {
|
protected ServerMessage composeInternal() {
|
||||||
this.response.init(Outgoing.PollErrorComposer);
|
this.response.init(Outgoing.PollErrorComposer);
|
@ -4,12 +4,12 @@ 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 VerifyMobilePhoneWindowComposer extends MessageComposer {
|
public class PhoneCollectionStateMessageComposer extends MessageComposer {
|
||||||
private final int unknownInt1;
|
private final int unknownInt1;
|
||||||
private final int unknownInt2;
|
private final int unknownInt2;
|
||||||
private final int unknownInt3;
|
private final int unknownInt3;
|
||||||
|
|
||||||
public VerifyMobilePhoneWindowComposer(int unknownInt1, int unknownInt2, int unknownInt3) {
|
public PhoneCollectionStateMessageComposer(int unknownInt1, int unknownInt2, int unknownInt3) {
|
||||||
this.unknownInt1 = unknownInt1;
|
this.unknownInt1 = unknownInt1;
|
||||||
this.unknownInt2 = unknownInt2;
|
this.unknownInt2 = unknownInt2;
|
||||||
this.unknownInt3 = unknownInt3;
|
this.unknownInt3 = unknownInt3;
|
@ -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 WiredOpenComposer extends MessageComposer {
|
public class OpenComposer extends MessageComposer {
|
||||||
private final HabboItem item;
|
private final HabboItem item;
|
||||||
|
|
||||||
public WiredOpenComposer(HabboItem item) {
|
public OpenComposer(HabboItem item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@ package com.eu.habbo.messages.rcon;
|
|||||||
import com.eu.habbo.Emulator;
|
import com.eu.habbo.Emulator;
|
||||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.users.FigureSetIdsComposer;
|
import com.eu.habbo.messages.outgoing.users.FigureSetIdsComposer;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@ -39,7 +39,7 @@ public class GiveUserClothing extends RCONMessage<GiveUserClothing.JSONGiveUserC
|
|||||||
if (client != null) {
|
if (client != null) {
|
||||||
habbo.getInventory().getWardrobeComponent().getClothing().add(object.clothing_id);
|
habbo.getInventory().getWardrobeComponent().getClothing().add(object.clothing_id);
|
||||||
client.sendResponse(new FigureSetIdsComposer(habbo));
|
client.sendResponse(new FigureSetIdsComposer(habbo));
|
||||||
client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FIGURESET_REDEEMED.key));
|
client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FIGURESET_REDEEMED.key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.eu.habbo.messages.rcon;
|
|||||||
|
|
||||||
import com.eu.habbo.Emulator;
|
import com.eu.habbo.Emulator;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ public class ImageAlertUser extends RCONMessage<ImageAlertUser.JSON> {
|
|||||||
keys.put("image", json.image);
|
keys.put("image", json.image);
|
||||||
}
|
}
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new BubbleAlertComposer(json.bubble_key, keys));
|
habbo.getClient().sendResponse(new NotificationDialogMessageComposer(json.bubble_key, keys));
|
||||||
}
|
}
|
||||||
|
|
||||||
static class JSON {
|
static class JSON {
|
||||||
|
@ -3,7 +3,7 @@ package com.eu.habbo.messages.rcon;
|
|||||||
import com.eu.habbo.Emulator;
|
import com.eu.habbo.Emulator;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ public class ImageHotelAlert extends RCONMessage<ImageHotelAlert.JSON> {
|
|||||||
keys.put("image", json.image);
|
keys.put("image", json.image);
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerMessage message = new BubbleAlertComposer(json.bubble_key, keys).compose();
|
ServerMessage message = new NotificationDialogMessageComposer(json.bubble_key, keys).compose();
|
||||||
|
|
||||||
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
||||||
Habbo habbo = set.getValue();
|
Habbo habbo = set.getValue();
|
||||||
|
@ -3,7 +3,7 @@ package com.eu.habbo.networking.gameserver.handlers;
|
|||||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||||
import com.eu.habbo.messages.ClientMessage;
|
import com.eu.habbo.messages.ClientMessage;
|
||||||
import com.eu.habbo.messages.incoming.Incoming;
|
import com.eu.habbo.messages.incoming.Incoming;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.PingComposer;
|
import com.eu.habbo.messages.outgoing.handshake.PingMessageComposer;
|
||||||
import com.eu.habbo.networking.gameserver.GameServerAttributes;
|
import com.eu.habbo.networking.gameserver.GameServerAttributes;
|
||||||
import io.netty.channel.ChannelDuplexHandler;
|
import io.netty.channel.ChannelDuplexHandler;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
@ -127,7 +127,7 @@ public class IdleTimeoutHandler extends ChannelDuplexHandler {
|
|||||||
|
|
||||||
GameClient client = ctx.channel().attr(GameServerAttributes.CLIENT).get();
|
GameClient client = ctx.channel().attr(GameServerAttributes.CLIENT).get();
|
||||||
if (client != null) {
|
if (client != null) {
|
||||||
client.sendResponse(new PingComposer());
|
client.sendResponse(new PingMessageComposer());
|
||||||
}
|
}
|
||||||
|
|
||||||
pingScheduleFuture = ctx.executor().schedule(this, pingScheduleNanos, TimeUnit.NANOSECONDS);
|
pingScheduleFuture = ctx.executor().schedule(this, pingScheduleNanos, TimeUnit.NANOSECONDS);
|
||||||
|
@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
|||||||
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import gnu.trove.map.hash.THashMap;
|
import gnu.trove.map.hash.THashMap;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -36,7 +36,7 @@ public class CannonKickAction implements Runnable {
|
|||||||
int rotation = this.cannon.getRotation();
|
int rotation = this.cannon.getRotation();
|
||||||
List<RoomTile> tiles = this.room.getLayout().getTilesInFront(this.room.getLayout().getTile(this.cannon.getX(), this.cannon.getY()), rotation + 6, 3);
|
List<RoomTile> tiles = this.room.getLayout().getTilesInFront(this.room.getLayout().getTile(this.cannon.getX(), this.cannon.getY()), rotation + 6, 3);
|
||||||
|
|
||||||
ServerMessage message = new BubbleAlertComposer("cannon.png", dater).compose();
|
ServerMessage message = new NotificationDialogMessageComposer("cannon.png", dater).compose();
|
||||||
|
|
||||||
for (RoomTile t : tiles) {
|
for (RoomTile t : tiles) {
|
||||||
for (Habbo habbo : this.room.getHabbosAt(t.x, t.y)) {
|
for (Habbo habbo : this.room.getHabbosAt(t.x, t.y)) {
|
||||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.users.Habbo;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.AddFloorItemComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.ObjectAddMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
||||||
|
|
||||||
public class CrackableExplode implements Runnable {
|
public class CrackableExplode implements Runnable {
|
||||||
@ -64,7 +64,7 @@ public class CrackableExplode implements Runnable {
|
|||||||
newItem.needsUpdate(true);
|
newItem.needsUpdate(true);
|
||||||
this.room.addHabboItem(newItem);
|
this.room.addHabboItem(newItem);
|
||||||
this.room.updateItem(newItem);
|
this.room.updateItem(newItem);
|
||||||
this.room.sendComposer(new AddFloorItemComposer(newItem, this.room.getFurniOwnerNames().get(newItem.getUserId())).compose());
|
this.room.sendComposer(new ObjectAddMessageComposer(newItem, this.room.getFurniOwnerNames().get(newItem.getUserId())).compose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user