Finished Outgoing (Yay!)

This commit is contained in:
Harmonic 2022-04-17 13:42:31 -07:00 committed by Harmonic
parent bf23a4be67
commit c66b739a78
240 changed files with 654 additions and 682 deletions

View File

@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.messages.incoming.friends.SearchUserEvent; import com.eu.habbo.messages.incoming.friends.SearchUserEvent;
import com.eu.habbo.messages.incoming.navigator.SearchRoomsEvent; import com.eu.habbo.messages.incoming.navigator.SearchRoomsEvent;
import com.eu.habbo.messages.outgoing.users.UserDataComposer; import com.eu.habbo.messages.outgoing.users.UserObjectComposer;
import com.eu.habbo.threading.runnables.AchievementUpdater; import com.eu.habbo.threading.runnables.AchievementUpdater;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -147,7 +147,7 @@ public class CleanerThread implements Runnable {
for (Habbo habbo : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().values()) { for (Habbo habbo : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().values()) {
habbo.getHabboStats().respectPointsToGive = Emulator.getConfig().getInt("hotel.daily.respect"); habbo.getHabboStats().respectPointsToGive = Emulator.getConfig().getInt("hotel.daily.respect");
habbo.getHabboStats().petRespectPointsToGive = Emulator.getConfig().getInt("hotel.daily.respect.pets"); habbo.getHabboStats().petRespectPointsToGive = Emulator.getConfig().getInt("hotel.daily.respect.pets");
habbo.getClient().sendResponse(new UserDataComposer(habbo)); habbo.getClient().sendResponse(new UserObjectComposer(habbo));
} }
} }
} }

View File

@ -4,8 +4,8 @@ import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.rooms.RoomChatMessage; import com.eu.habbo.habbohotel.rooms.RoomChatMessage;
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles; import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserRemoveComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserRemoveMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserWhisperComposer; import com.eu.habbo.messages.outgoing.rooms.users.WhisperMessageComposer;
import com.eu.habbo.plugin.EventHandler; import com.eu.habbo.plugin.EventHandler;
import com.eu.habbo.plugin.events.users.UserSavedMottoEvent; import com.eu.habbo.plugin.events.users.UserSavedMottoEvent;
@ -13,11 +13,11 @@ public class Easter {
@EventHandler @EventHandler
public static void onUserChangeMotto(UserSavedMottoEvent event) { public static void onUserChangeMotto(UserSavedMottoEvent event) {
if (Emulator.getConfig().getBoolean("easter_eggs.enabled") && event.newMotto.equalsIgnoreCase("crickey!")) { if (Emulator.getConfig().getBoolean("easter_eggs.enabled") && event.newMotto.equalsIgnoreCase("crickey!")) {
event.habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(event.newMotto, event.habbo, event.habbo, RoomChatMessageBubbles.ALERT))); event.habbo.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(event.newMotto, event.habbo, event.habbo, RoomChatMessageBubbles.ALERT)));
Room room = event.habbo.getHabboInfo().getCurrentRoom(); Room room = event.habbo.getHabboInfo().getCurrentRoom();
room.sendComposer(new RoomUserRemoveComposer(event.habbo.getRoomUnit()).compose()); room.sendComposer(new UserRemoveMessageComposer(event.habbo.getRoomUnit()).compose());
room.sendComposer(new RoomUserPetComposer(2, 1, "FFFFFF", event.habbo).compose()); room.sendComposer(new RoomUserPetComposer(2, 1, "FFFFFF", event.habbo).compose());
} }

View File

@ -7,10 +7,10 @@ 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.outgoing.achievements.AchievementComposer; import com.eu.habbo.messages.outgoing.achievements.AchievementComposer;
import com.eu.habbo.messages.outgoing.achievements.AchievementUnlockedComposer; import com.eu.habbo.messages.outgoing.achievements.AchievementUnlockedComposer;
import com.eu.habbo.messages.outgoing.achievements.talenttrack.TalentLevelUpdateComposer; import com.eu.habbo.messages.outgoing.achievements.talenttrack.TalentLevelUpComposer;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer; import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserChangeMessageComposer;
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer; import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
import com.eu.habbo.messages.outgoing.users.UserBadgesComposer; import com.eu.habbo.messages.outgoing.users.UserBadgesComposer;
import com.eu.habbo.plugin.Event; import com.eu.habbo.plugin.Event;
@ -171,7 +171,7 @@ public class AchievementManager {
} }
} }
habbo.getClient().sendResponse(new AddHabboItemComposer(badge.getId(), AddHabboItemComposer.AddHabboItemCategory.BADGE)); habbo.getClient().sendResponse(new UnseenItemsComposer(badge.getId(), UnseenItemsComposer.AddHabboItemCategory.BADGE));
habbo.getHabboStats().addAchievementScore(newLevel.points); habbo.getHabboStats().addAchievementScore(newLevel.points);
@ -180,7 +180,7 @@ public class AchievementManager {
} }
if (habbo.getHabboInfo().getCurrentRoom() != null) { if (habbo.getHabboInfo().getCurrentRoom() != null) {
habbo.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDataComposer(habbo).compose()); habbo.getHabboInfo().getCurrentRoom().sendComposer(new UserChangeMessageComposer(habbo).compose());
} }
} }
} }
@ -356,7 +356,7 @@ public class AchievementManager {
for (Item item : level.items) { for (Item item : level.items) {
HabboItem rewardItem = Emulator.getGameEnvironment().getItemManager().createItem(habbo.getHabboInfo().getId(), item, 0, 0, ""); HabboItem rewardItem = Emulator.getGameEnvironment().getItemManager().createItem(habbo.getHabboInfo().getId(), item, 0, 0, "");
habbo.getInventory().getItemsComponent().addItem(rewardItem); habbo.getInventory().getItemsComponent().addItem(rewardItem);
habbo.getClient().sendResponse(new AddHabboItemComposer(rewardItem)); habbo.getClient().sendResponse(new UnseenItemsComposer(rewardItem));
habbo.getClient().sendResponse(new FurniListInvalidateComposer()); habbo.getClient().sendResponse(new FurniListInvalidateComposer());
} }
} }
@ -379,7 +379,7 @@ public class AchievementManager {
} }
} }
} }
habbo.getClient().sendResponse(new TalentLevelUpdateComposer(type, level)); habbo.getClient().sendResponse(new TalentLevelUpComposer(type, level));
} }
} }
} }

View File

@ -232,7 +232,7 @@ public class Bot implements Runnable {
return; return;
this.chatTimestamp = Emulator.getIntUnixTimestamp(); this.chatTimestamp = Emulator.getIntUnixTimestamp();
this.room.botChat(new RoomUserShoutComposer(new RoomChatMessage(event.message, this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId()))).compose()); this.room.botChat(new ShoutMessageComposer(new RoomChatMessage(event.message, this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId()))).compose());
if (message.equals("o/") || message.equals("_o/")) { if (message.equals("o/") || message.equals("_o/")) {
this.room.sendComposer(new ExpressionMessageComposer(this.roomUnit, RoomUserAction.WAVE).compose()); this.room.sendComposer(new ExpressionMessageComposer(this.roomUnit, RoomUserAction.WAVE).compose());
@ -247,7 +247,7 @@ public class Bot implements Runnable {
return; return;
this.chatTimestamp = Emulator.getIntUnixTimestamp(); this.chatTimestamp = Emulator.getIntUnixTimestamp();
event.target.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(event.message, this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId())))); event.target.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(event.message, this.roomUnit, RoomChatMessageBubbles.getBubble(this.getBubbleId()))));
} }
} }

View File

@ -11,7 +11,7 @@ import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageCo
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;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersComposer; import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersComposer;
import com.eu.habbo.plugin.events.bots.BotPickUpEvent; import com.eu.habbo.plugin.events.bots.BotPickUpEvent;
import com.eu.habbo.plugin.events.bots.BotPlacedEvent; import com.eu.habbo.plugin.events.bots.BotPlacedEvent;
@ -139,7 +139,7 @@ public class BotManager {
room.addBot(bot); room.addBot(bot);
Emulator.getThreading().run(bot); Emulator.getThreading().run(bot);
room.sendComposer(new RoomUsersComposer(bot).compose()); room.sendComposer(new RoomUsersComposer(bot).compose());
room.sendComposer(new RoomUserStatusComposer(bot.getRoomUnit()).compose()); room.sendComposer(new UserUpdateComposer(bot.getRoomUnit()).compose());
habbo.getInventory().getBotsComponent().removeBot(bot); habbo.getInventory().getBotsComponent().removeBot(bot);
habbo.getClient().sendResponse(new BotRemovedFromInventoryComposer(bot)); habbo.getClient().sendResponse(new BotRemovedFromInventoryComposer(bot));
bot.onPlace(habbo, room); bot.onPlace(habbo, room);

View File

@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.items.Item;
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.habbohotel.users.subscriptions.SubscriptionHabboClub; import com.eu.habbo.habbohotel.users.subscriptions.SubscriptionHabboClub;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer; import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -78,7 +78,7 @@ public class CalendarRewardObject {
0, 0,
""); "");
habbo.getInventory().getItemsComponent().addItem(habboItem); habbo.getInventory().getItemsComponent().addItem(habboItem);
habbo.getClient().sendResponse(new AddHabboItemComposer(habboItem)); habbo.getClient().sendResponse(new UnseenItemsComposer(habboItem));
habbo.getClient().sendResponse(new FurniListInvalidateComposer()); habbo.getClient().sendResponse(new FurniListInvalidateComposer());
} }
} }

View File

@ -21,7 +21,7 @@ import com.eu.habbo.messages.outgoing.catalog.*;
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer; 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.UnseenItemsComposer;
import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer; 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;
@ -529,12 +529,12 @@ public class CatalogManager {
Voucher voucher = Emulator.getGameEnvironment().getCatalogManager().getVoucher(voucherCode); Voucher voucher = Emulator.getGameEnvironment().getCatalogManager().getVoucher(voucherCode);
if (voucher == null) { if (voucher == null) {
client.sendResponse(new RedeemVoucherErrorComposer(RedeemVoucherErrorComposer.INVALID_CODE)); client.sendResponse(new VoucherRedeemErrorMessageComposer(VoucherRedeemErrorMessageComposer.INVALID_CODE));
return; return;
} }
if (voucher.isExhausted()) { if (voucher.isExhausted()) {
client.sendResponse(new RedeemVoucherErrorComposer(Emulator.getGameEnvironment().getCatalogManager().deleteVoucher(voucher) ? RedeemVoucherErrorComposer.INVALID_CODE : RedeemVoucherErrorComposer.TECHNICAL_ERROR)); client.sendResponse(new VoucherRedeemErrorMessageComposer(Emulator.getGameEnvironment().getCatalogManager().deleteVoucher(voucher) ? VoucherRedeemErrorMessageComposer.INVALID_CODE : VoucherRedeemErrorMessageComposer.TECHNICAL_ERROR));
return; return;
} }
@ -562,7 +562,7 @@ public class CatalogManager {
} }
} }
client.sendResponse(new RedeemVoucherOKComposer()); client.sendResponse(new VoucherRedeemOkMessageComposer());
} }
public boolean deleteVoucher(Voucher voucher) { public boolean deleteVoucher(Voucher voucher) {
@ -894,7 +894,7 @@ public class CatalogManager {
return; return;
List<String> badges = new ArrayList<>(); List<String> badges = new ArrayList<>();
Map<AddHabboItemComposer.AddHabboItemCategory, List<Integer>> unseenItems = new HashMap<>(); Map<UnseenItemsComposer.AddHabboItemCategory, List<Integer>> unseenItems = new HashMap<>();
boolean badgeFound = false; boolean badgeFound = false;
for (int i = 0; i < amount; i++) { for (int i = 0; i < amount; i++) {
@ -925,11 +925,11 @@ public class CatalogManager {
habbo.getClient().getHabbo().getInventory().getBotsComponent().addBot(bot); habbo.getClient().getHabbo().getInventory().getBotsComponent().addBot(bot);
habbo.getClient().sendResponse(new BotAddedToInventoryComposer(bot)); habbo.getClient().sendResponse(new BotAddedToInventoryComposer(bot));
if (!unseenItems.containsKey(AddHabboItemComposer.AddHabboItemCategory.BOT)) { if (!unseenItems.containsKey(UnseenItemsComposer.AddHabboItemCategory.BOT)) {
unseenItems.put(AddHabboItemComposer.AddHabboItemCategory.BOT, new ArrayList<>()); unseenItems.put(UnseenItemsComposer.AddHabboItemCategory.BOT, new ArrayList<>());
} }
unseenItems.get(AddHabboItemComposer.AddHabboItemCategory.BOT).add(bot.getId()); unseenItems.get(UnseenItemsComposer.AddHabboItemCategory.BOT).add(bot.getId());
} else { } else {
throw new Exception("Failed to create bot of type: " + type); throw new Exception("Failed to create bot of type: " + type);
} }
@ -970,11 +970,11 @@ public class CatalogManager {
AchievementManager.progressAchievement(habbo.getClient().getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetLover")); AchievementManager.progressAchievement(habbo.getClient().getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetLover"));
if (!unseenItems.containsKey(AddHabboItemComposer.AddHabboItemCategory.PET)) { if (!unseenItems.containsKey(UnseenItemsComposer.AddHabboItemCategory.PET)) {
unseenItems.put(AddHabboItemComposer.AddHabboItemCategory.PET, new ArrayList<>()); unseenItems.put(UnseenItemsComposer.AddHabboItemCategory.PET, new ArrayList<>());
} }
unseenItems.get(AddHabboItemComposer.AddHabboItemCategory.PET).add(pet.getId()); unseenItems.get(UnseenItemsComposer.AddHabboItemCategory.PET).add(pet.getId());
} else if (baseItem.getType() == FurnitureType.BADGE) { } else if (baseItem.getType() == FurnitureType.BADGE) {
if (!habbo.getInventory().getBadgesComponent().hasBadge(baseItem.getName())) { if (!habbo.getInventory().getBadgesComponent().hasBadge(baseItem.getName())) {
if (!badges.contains(baseItem.getName())) { if (!badges.contains(baseItem.getName())) {
@ -1084,7 +1084,7 @@ public class CatalogManager {
if (purchasedEvent.itemsList != null && !purchasedEvent.itemsList.isEmpty()) { if (purchasedEvent.itemsList != null && !purchasedEvent.itemsList.isEmpty()) {
habbo.getClient().getHabbo().getInventory().getItemsComponent().addItems(purchasedEvent.itemsList); habbo.getClient().getHabbo().getInventory().getItemsComponent().addItems(purchasedEvent.itemsList);
unseenItems.put(AddHabboItemComposer.AddHabboItemCategory.OWNED_FURNI, purchasedEvent.itemsList.stream().map(HabboItem::getId).collect(Collectors.toList())); unseenItems.put(UnseenItemsComposer.AddHabboItemCategory.OWNED_FURNI, purchasedEvent.itemsList.stream().map(HabboItem::getId).collect(Collectors.toList()));
Emulator.getPluginManager().fireEvent(new UserCatalogFurnitureBoughtEvent(habbo, item, purchasedEvent.itemsList)); Emulator.getPluginManager().fireEvent(new UserCatalogFurnitureBoughtEvent(habbo, item, purchasedEvent.itemsList));
@ -1095,8 +1095,8 @@ public class CatalogManager {
} }
} }
if (!purchasedEvent.badges.isEmpty() && !unseenItems.containsKey(AddHabboItemComposer.AddHabboItemCategory.BADGE)) { if (!purchasedEvent.badges.isEmpty() && !unseenItems.containsKey(UnseenItemsComposer.AddHabboItemCategory.BADGE)) {
unseenItems.put(AddHabboItemComposer.AddHabboItemCategory.BADGE, new ArrayList<>()); unseenItems.put(UnseenItemsComposer.AddHabboItemCategory.BADGE, new ArrayList<>());
} }
for (String b : purchasedEvent.badges) { for (String b : purchasedEvent.badges) {
@ -1109,11 +1109,11 @@ public class CatalogManager {
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 NotificationDialogMessageComposer(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(UnseenItemsComposer.AddHabboItemCategory.BADGE).add(badge.getId());
} }
habbo.getClient().getHabbo().getHabboStats().addPurchase(purchasedEvent.catalogItem); habbo.getClient().getHabbo().getHabboStats().addPurchase(purchasedEvent.catalogItem);
habbo.getClient().sendResponse(new AddHabboItemComposer(unseenItems)); habbo.getClient().sendResponse(new UnseenItemsComposer(unseenItems));
habbo.getClient().sendResponse(new PurchaseOKMessageComposer(purchasedEvent.catalogItem)); habbo.getClient().sendResponse(new PurchaseOKMessageComposer(purchasedEvent.catalogItem));
habbo.getClient().sendResponse(new FurniListInvalidateComposer()); habbo.getClient().sendResponse(new FurniListInvalidateComposer());

View File

@ -8,7 +8,7 @@ import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.incoming.catalog.marketplace.RequestOffersEvent; import com.eu.habbo.messages.incoming.catalog.marketplace.RequestOffersEvent;
import com.eu.habbo.messages.outgoing.catalog.marketplace.MarketplaceBuyOfferResultComposer; import com.eu.habbo.messages.outgoing.catalog.marketplace.MarketplaceBuyOfferResultComposer;
import com.eu.habbo.messages.outgoing.catalog.marketplace.MarketplaceCancelOfferResultComposer; import com.eu.habbo.messages.outgoing.catalog.marketplace.MarketplaceCancelOfferResultComposer;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
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.users.CreditBalanceComposer; import com.eu.habbo.messages.outgoing.users.CreditBalanceComposer;
@ -94,7 +94,7 @@ public class MarketPlace {
HabboItem item = Emulator.getGameEnvironment().getItemManager().loadHabboItem(set); HabboItem item = Emulator.getGameEnvironment().getItemManager().loadHabboItem(set);
habbo.getInventory().getItemsComponent().addItem(item); habbo.getInventory().getItemsComponent().addItem(item);
habbo.getClient().sendResponse(new MarketplaceCancelOfferResultComposer(offer, true)); habbo.getClient().sendResponse(new MarketplaceCancelOfferResultComposer(offer, true));
habbo.getClient().sendResponse(new AddHabboItemComposer(item)); habbo.getClient().sendResponse(new UnseenItemsComposer(item));
habbo.getClient().sendResponse(new FurniListInvalidateComposer()); habbo.getClient().sendResponse(new FurniListInvalidateComposer());
} }
} }
@ -285,7 +285,7 @@ public class MarketPlace {
} }
client.sendResponse(new CreditBalanceComposer(client.getHabbo())); client.sendResponse(new CreditBalanceComposer(client.getHabbo()));
client.sendResponse(new AddHabboItemComposer(item)); client.sendResponse(new UnseenItemsComposer(item));
client.sendResponse(new FurniListInvalidateComposer()); client.sendResponse(new FurniListInvalidateComposer());
client.sendResponse(new MarketplaceBuyOfferResultComposer(MarketplaceBuyOfferResultComposer.REFRESH, 0, offerId, price)); client.sendResponse(new MarketplaceBuyOfferResultComposer(MarketplaceBuyOfferResultComposer.REFRESH, 0, offerId, price));

View File

@ -2,7 +2,7 @@ package com.eu.habbo.habbohotel.commands;
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.messages.outgoing.users.UserDataComposer; import com.eu.habbo.messages.outgoing.users.UserObjectComposer;
public class ChangeNameCommand extends Command { public class ChangeNameCommand extends Command {
public ChangeNameCommand() { public ChangeNameCommand() {
@ -12,7 +12,7 @@ public class ChangeNameCommand extends Command {
@Override @Override
public boolean handle(GameClient gameClient, String[] params) throws Exception { public boolean handle(GameClient gameClient, String[] params) throws Exception {
gameClient.getHabbo().getHabboStats().allowNameChange = !gameClient.getHabbo().getHabboStats().allowNameChange; gameClient.getHabbo().getHabboStats().allowNameChange = !gameClient.getHabbo().getHabboStats().allowNameChange;
gameClient.sendResponse(new UserDataComposer(gameClient.getHabbo())); gameClient.sendResponse(new UserObjectComposer(gameClient.getHabbo()));
return true; return true;
} }
} }

View File

@ -11,7 +11,7 @@ import com.eu.habbo.habbohotel.pets.PetVocalsType;
import com.eu.habbo.habbohotel.pets.RideablePet; 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.rooms.RoomRightLevels; import com.eu.habbo.habbohotel.rooms.RoomRightLevels;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserTypingComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserTypingMessageComposer;
import com.eu.habbo.plugin.events.users.UserCommandEvent; import com.eu.habbo.plugin.events.users.UserCommandEvent;
import com.eu.habbo.plugin.events.users.UserExecuteCommandEvent; import com.eu.habbo.plugin.events.users.UserExecuteCommandEvent;
import gnu.trove.iterator.TIntObjectIterator; import gnu.trove.iterator.TIntObjectIterator;
@ -83,7 +83,7 @@ public class CommandHandler {
} }
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null)
gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserTypingComposer(gameClient.getHabbo().getRoomUnit(), false).compose()); gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new UserTypingMessageComposer(gameClient.getHabbo().getRoomUnit(), false).compose());
UserCommandEvent event = new UserCommandEvent(gameClient.getHabbo(), parts, command.handle(gameClient, parts)); UserCommandEvent event = new UserCommandEvent(gameClient.getHabbo(), parts, command.handle(gameClient, parts));
Emulator.getPluginManager().fireEvent(event); Emulator.getPluginManager().fireEvent(event);

View File

@ -2,7 +2,7 @@ package com.eu.habbo.habbohotel.commands;
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.messages.outgoing.rooms.users.RoomUserDataComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserChangeMessageComposer;
import com.eu.habbo.messages.outgoing.users.FigureUpdateComposer; import com.eu.habbo.messages.outgoing.users.FigureUpdateComposer;
@ -31,7 +31,7 @@ public class FacelessCommand extends Command {
gameClient.getHabbo().getHabboInfo().setLook(gameClient.getHabbo().getHabboInfo().getLook().replace(part, newHead)); gameClient.getHabbo().getHabboInfo().setLook(gameClient.getHabbo().getHabboInfo().getLook().replace(part, newHead));
gameClient.sendResponse(new FigureUpdateComposer(gameClient.getHabbo())); gameClient.sendResponse(new FigureUpdateComposer(gameClient.getHabbo()));
gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDataComposer(gameClient.getHabbo()).compose()); gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new UserChangeMessageComposer(gameClient.getHabbo()).compose());
return true; return true;
} }
} }

View File

@ -6,8 +6,8 @@ import com.eu.habbo.habbohotel.rooms.RoomLayout;
import com.eu.habbo.habbohotel.rooms.RoomUnit; import com.eu.habbo.habbohotel.rooms.RoomUnit;
import com.eu.habbo.habbohotel.wired.WiredHandler; import com.eu.habbo.habbohotel.wired.WiredHandler;
import com.eu.habbo.habbohotel.wired.WiredTriggerType; import com.eu.habbo.habbohotel.wired.WiredTriggerType;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserRemoveComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserRemoveMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersComposer; import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersComposer;
import com.eu.habbo.threading.runnables.RoomUnitTeleport; import com.eu.habbo.threading.runnables.RoomUnitTeleport;
@ -29,7 +29,7 @@ public class InvisibleCommand extends Command {
roomUnit.setInRoom(true); roomUnit.setInRoom(true);
roomUnit.getRoom().sendComposer(new RoomUsersComposer(gameClient.getHabbo()).compose()); roomUnit.getRoom().sendComposer(new RoomUsersComposer(gameClient.getHabbo()).compose());
roomUnit.getRoom().sendComposer(new RoomUserStatusComposer(roomUnit).compose()); roomUnit.getRoom().sendComposer(new UserUpdateComposer(roomUnit).compose());
WiredHandler.handle(WiredTriggerType.ENTER_ROOM, roomUnit, roomUnit.getRoom(), null); WiredHandler.handle(WiredTriggerType.ENTER_ROOM, roomUnit, roomUnit.getRoom(), null);
roomUnit.getRoom().habboEntered(gameClient.getHabbo()); roomUnit.getRoom().habboEntered(gameClient.getHabbo());
@ -41,7 +41,7 @@ public class InvisibleCommand extends Command {
roomUnit.setInvisible(true); roomUnit.setInvisible(true);
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_invisible.updated")); gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_invisible.updated"));
gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserRemoveComposer(roomUnit).compose()); gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new UserRemoveMessageComposer(roomUnit).compose());
return true; return true;
} }

View File

@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.gameclients.GameClient;
import com.eu.habbo.habbohotel.rooms.RoomTile; import com.eu.habbo.habbohotel.rooms.RoomTile;
import com.eu.habbo.habbohotel.rooms.RoomUnitStatus; import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
import com.eu.habbo.habbohotel.rooms.RoomUserRotation; import com.eu.habbo.habbohotel.rooms.RoomUserRotation;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
public class LayCommand extends Command { public class LayCommand extends Command {
public LayCommand() { public LayCommand() {
@ -35,7 +35,7 @@ public class LayCommand extends Command {
} }
gameClient.getHabbo().getRoomUnit().setStatus(RoomUnitStatus.LAY, 0.5 + ""); gameClient.getHabbo().getRoomUnit().setStatus(RoomUnitStatus.LAY, 0.5 + "");
gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserStatusComposer(gameClient.getHabbo().getRoomUnit()).compose()); gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new UserUpdateComposer(gameClient.getHabbo().getRoomUnit()).compose());
return true; return true;
} }
} }

View File

@ -7,8 +7,8 @@ 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.HabboGender; import com.eu.habbo.habbohotel.users.HabboGender;
import com.eu.habbo.habbohotel.users.clothingvalidation.ClothingValidationManager; import com.eu.habbo.habbohotel.users.clothingvalidation.ClothingValidationManager;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserChangeMessageComposer;
import com.eu.habbo.messages.outgoing.users.UserDataComposer; import com.eu.habbo.messages.outgoing.users.UserObjectComposer;
import com.eu.habbo.util.figure.FigureUtil; import com.eu.habbo.util.figure.FigureUtil;
public class MimicCommand extends Command { public class MimicCommand extends Command {
@ -38,8 +38,8 @@ public class MimicCommand extends Command {
} else { } else {
gameClient.getHabbo().getHabboInfo().setLook(ClothingValidationManager.VALIDATE_ON_MIMIC ? ClothingValidationManager.validateLook(gameClient.getHabbo(), habbo.getHabboInfo().getLook(), habbo.getHabboInfo().getGender().name()) : habbo.getHabboInfo().getLook()); gameClient.getHabbo().getHabboInfo().setLook(ClothingValidationManager.VALIDATE_ON_MIMIC ? ClothingValidationManager.validateLook(gameClient.getHabbo(), habbo.getHabboInfo().getLook(), habbo.getHabboInfo().getGender().name()) : habbo.getHabboInfo().getLook());
gameClient.getHabbo().getHabboInfo().setGender(habbo.getHabboInfo().getGender()); gameClient.getHabbo().getHabboInfo().setGender(habbo.getHabboInfo().getGender());
gameClient.sendResponse(new UserDataComposer(gameClient.getHabbo())); gameClient.sendResponse(new UserObjectComposer(gameClient.getHabbo()));
gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDataComposer(gameClient.getHabbo()).compose()); gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new UserChangeMessageComposer(gameClient.getHabbo()).compose());
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_mimic.copied").replace("%user%", params[1]).replace("%gender_name%", (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? Emulator.getTexts().getValue("gender.him") : Emulator.getTexts().getValue("gender.her"))), RoomChatMessageBubbles.ALERT); gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_mimic.copied").replace("%user%", params[1]).replace("%gender_name%", (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? Emulator.getTexts().getValue("gender.him") : Emulator.getTexts().getValue("gender.her"))), RoomChatMessageBubbles.ALERT);
return true; return true;
} }

View File

@ -2,7 +2,7 @@ package com.eu.habbo.habbohotel.commands;
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.messages.outgoing.rooms.items.PostItStickyPoleOpenComposer; import com.eu.habbo.messages.outgoing.rooms.items.RequestSpamWallPostItMessageComposer;
public class MultiCommand extends Command { public class MultiCommand extends Command {
public MultiCommand() { public MultiCommand() {
@ -11,7 +11,7 @@ public class MultiCommand extends Command {
@Override @Override
public boolean handle(GameClient gameClient, String[] params) throws Exception { public boolean handle(GameClient gameClient, String[] params) throws Exception {
gameClient.sendResponse(new PostItStickyPoleOpenComposer(null)); gameClient.sendResponse(new RequestSpamWallPostItMessageComposer(null));
return true; return true;
} }
} }

View File

@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.gameclients.GameClient;
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.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer; import com.eu.habbo.messages.outgoing.rooms.RoomForwardMessageComposer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
@ -23,7 +23,7 @@ public class ReloadRoomCommand extends Command {
Collection<Habbo> habbos = new ArrayList<>(room.getHabbos()); Collection<Habbo> habbos = new ArrayList<>(room.getHabbos());
Emulator.getGameEnvironment().getRoomManager().unloadRoom(room); Emulator.getGameEnvironment().getRoomManager().unloadRoom(room);
room = Emulator.getGameEnvironment().getRoomManager().loadRoom(room.getId()); room = Emulator.getGameEnvironment().getRoomManager().loadRoom(room.getId());
ServerMessage message = new ForwardToRoomComposer(room.getId()).compose(); ServerMessage message = new RoomForwardMessageComposer(room.getId()).compose();
for (Habbo habbo : habbos) { for (Habbo habbo : habbos) {
habbo.getClient().sendResponse(message); habbo.getClient().sendResponse(message);
} }

View File

@ -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.outgoing.inventory.FurniListInvalidateComposer; import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
import com.eu.habbo.messages.outgoing.wired.WiredRewardAlertComposer; import com.eu.habbo.messages.outgoing.wired.WiredRewardResultMessageComposer;
public class RoomGiftCommand extends Command { public class RoomGiftCommand extends Command {
public RoomGiftCommand() { public RoomGiftCommand() {
@ -60,7 +60,7 @@ public class RoomGiftCommand extends Command {
habbo.getClient().sendResponse(new FurniListInvalidateComposer()); habbo.getClient().sendResponse(new FurniListInvalidateComposer());
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_RECEIVED_ITEM)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_RECEIVED_ITEM));
} }
return true; return true;

View File

@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.gameclients.GameClient;
import com.eu.habbo.habbohotel.rooms.RoomChatMessage; import com.eu.habbo.habbohotel.rooms.RoomChatMessage;
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.rooms.users.RoomUserShoutComposer; import com.eu.habbo.messages.outgoing.rooms.users.ShoutMessageComposer;
public class ShoutCommand extends Command { public class ShoutCommand extends Command {
private static String idea = "Kudo's To Droppy for this idea!"; private static String idea = "Kudo's To Droppy for this idea!";
@ -40,7 +40,7 @@ public class ShoutCommand extends Command {
} }
} }
target.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserShoutComposer(new RoomChatMessage(message.toString(), target, RoomChatMessageBubbles.NORMAL)).compose()); target.getHabboInfo().getCurrentRoom().sendComposer(new ShoutMessageComposer(new RoomChatMessage(message.toString(), target, RoomChatMessageBubbles.NORMAL)).compose());
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_shout").replace("%user%", params[1]).replace("%message%", message.toString()), RoomChatMessageBubbles.ALERT); gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_shout").replace("%user%", params[1]).replace("%message%", message.toString()), RoomChatMessageBubbles.ALERT);
return true; return true;
} }

View File

@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.gameclients.GameClient;
import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.Room;
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.rooms.ForwardToRoomComposer; import com.eu.habbo.messages.outgoing.rooms.RoomForwardMessageComposer;
public class SummonCommand extends Command { public class SummonCommand extends Command {
public SummonCommand() { public SummonCommand() {
@ -46,7 +46,7 @@ public class SummonCommand extends Command {
Emulator.getGameEnvironment().getRoomManager().enterRoom(habbo, gameClient.getHabbo().getHabboInfo().getCurrentRoom().getId(), "", true); Emulator.getGameEnvironment().getRoomManager().enterRoom(habbo, gameClient.getHabbo().getHabboInfo().getCurrentRoom().getId(), "", true);
habbo.getClient().sendResponse(new ForwardToRoomComposer(gameClient.getHabbo().getHabboInfo().getCurrentRoom().getId())); habbo.getClient().sendResponse(new RoomForwardMessageComposer(gameClient.getHabbo().getHabboInfo().getCurrentRoom().getId()));
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_summon.summoned").replace("%user%", params[1]), RoomChatMessageBubbles.ALERT); gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_summon.summoned").replace("%user%", params[1]), RoomChatMessageBubbles.ALERT);

View File

@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.gameclients.GameClient;
import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.Room;
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.rooms.ForwardToRoomComposer; import com.eu.habbo.messages.outgoing.rooms.RoomForwardMessageComposer;
import java.util.Map; import java.util.Map;
@ -45,7 +45,7 @@ public class SummonRankCommand extends Command {
Emulator.getGameEnvironment().getRoomManager().enterRoom(set.getValue(), gameClient.getHabbo().getHabboInfo().getCurrentRoom().getId(), "", true); Emulator.getGameEnvironment().getRoomManager().enterRoom(set.getValue(), gameClient.getHabbo().getHabboInfo().getCurrentRoom().getId(), "", true);
set.getValue().getClient().sendResponse(new ForwardToRoomComposer(gameClient.getHabbo().getHabboInfo().getCurrentRoom().getId())); set.getValue().getClient().sendResponse(new RoomForwardMessageComposer(gameClient.getHabbo().getHabboInfo().getCurrentRoom().getId()));
} }
} }

View File

@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.pets.PetData;
import com.eu.habbo.habbohotel.rooms.RoomUnit; import com.eu.habbo.habbohotel.rooms.RoomUnit;
import com.eu.habbo.habbohotel.rooms.RoomUnitType; import com.eu.habbo.habbohotel.rooms.RoomUnitType;
import com.eu.habbo.messages.outgoing.generic.alerts.MOTDNotificationComposer; import com.eu.habbo.messages.outgoing.generic.alerts.MOTDNotificationComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserRemoveComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserRemoveMessageComposer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -57,7 +57,7 @@ public class TransformCommand extends Command {
gameClient.getHabbo().getHabboStats().cache.put("pet_type", petData); gameClient.getHabbo().getHabboStats().cache.put("pet_type", petData);
gameClient.getHabbo().getHabboStats().cache.put("pet_race", race); gameClient.getHabbo().getHabboStats().cache.put("pet_race", race);
gameClient.getHabbo().getHabboStats().cache.put("pet_color", color); gameClient.getHabbo().getHabboStats().cache.put("pet_color", color);
gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserRemoveComposer(gameClient.getHabbo().getRoomUnit()).compose()); gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new UserRemoveMessageComposer(gameClient.getHabbo().getRoomUnit()).compose());
gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserPetComposer(petData.getType(), race, color, gameClient.getHabbo()).compose()); gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserPetComposer(petData.getType(), race, color, gameClient.getHabbo()).compose());
} else { } else {
//Pet Not Found //Pet Not Found

View File

@ -12,7 +12,7 @@ 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.habbohotel.users.HabboItem; import com.eu.habbo.habbohotel.users.HabboItem;
import com.eu.habbo.habbohotel.wired.WiredHandler; import com.eu.habbo.habbohotel.wired.WiredHandler;
import com.eu.habbo.messages.outgoing.guides.GuideSessionPartnerIsPlayingComposer; import com.eu.habbo.messages.outgoing.guides.YouArePlayingGameMessageComposer;
import com.eu.habbo.plugin.Event; import com.eu.habbo.plugin.Event;
import com.eu.habbo.plugin.events.games.GameHabboJoinEvent; import com.eu.habbo.plugin.events.games.GameHabboJoinEvent;
import com.eu.habbo.plugin.events.games.GameHabboLeaveEvent; import com.eu.habbo.plugin.events.games.GameHabboLeaveEvent;
@ -71,7 +71,7 @@ public abstract class Game implements Runnable {
habbo.getHabboInfo().setCurrentGame(this.getClass()); habbo.getHabboInfo().setCurrentGame(this.getClass());
habbo.getHabboInfo().setGamePlayer(player); habbo.getHabboInfo().setGamePlayer(player);
} }
habbo.getClient().sendResponse(new GuideSessionPartnerIsPlayingComposer(true)); habbo.getClient().sendResponse(new YouArePlayingGameMessageComposer(true));
return true; return true;
} }
} catch (Exception e) { } catch (Exception e) {
@ -102,7 +102,7 @@ public abstract class Game implements Runnable {
habbo.getHabboInfo().setCurrentGame(null); habbo.getHabboInfo().setCurrentGame(null);
habbo.getHabboInfo().setGamePlayer(null); habbo.getHabboInfo().setGamePlayer(null);
habbo.getClient().sendResponse(new GuideSessionPartnerIsPlayingComposer(false)); habbo.getClient().sendResponse(new YouArePlayingGameMessageComposer(false));
if (this.countsAchievements && this.endTime > this.startTime) { if (this.countsAchievements && this.endTime > this.startTime) {
AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("GamePlayed")); AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("GamePlayed"));
} }

View File

@ -51,7 +51,7 @@ import com.eu.habbo.habbohotel.wired.highscores.WiredHighscoreManager;
import com.eu.habbo.habbohotel.items.interactions.wired.triggers.*; import com.eu.habbo.habbohotel.items.interactions.wired.triggers.*;
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.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
import com.eu.habbo.plugin.events.emulator.EmulatorLoadItemsManagerEvent; import com.eu.habbo.plugin.events.emulator.EmulatorLoadItemsManagerEvent;
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem; import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
import gnu.trove.TCollections; import gnu.trove.TCollections;
@ -730,7 +730,7 @@ public class ItemManager {
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(userId); Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(userId);
if (habbo != null) { if (habbo != null) {
habbo.getInventory().getItemsComponent().addItem(gift); habbo.getInventory().getItemsComponent().addItem(gift);
habbo.getClient().sendResponse(new AddHabboItemComposer(gift)); habbo.getClient().sendResponse(new UnseenItemsComposer(gift));
} }
} }

View File

@ -12,8 +12,6 @@ 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.users.subscriptions.SubscriptionHabboClub; import com.eu.habbo.habbohotel.users.subscriptions.SubscriptionHabboClub;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.users.UserClubComposer;
import com.eu.habbo.messages.outgoing.users.UserPermissionsComposer;
import com.eu.habbo.threading.runnables.CrackableExplode; import com.eu.habbo.threading.runnables.CrackableExplode;
import com.eu.habbo.util.pathfinding.Rotation; import com.eu.habbo.util.pathfinding.Rotation;

View File

@ -8,8 +8,8 @@ import com.eu.habbo.habbohotel.rooms.RoomUnit;
import com.eu.habbo.habbohotel.users.HabboItem; import com.eu.habbo.habbohotel.users.HabboItem;
import com.eu.habbo.habbohotel.users.clothingvalidation.ClothingValidationManager; import com.eu.habbo.habbohotel.users.clothingvalidation.ClothingValidationManager;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserChangeMessageComposer;
import com.eu.habbo.messages.outgoing.users.UserDataComposer; import com.eu.habbo.messages.outgoing.users.UserObjectComposer;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
@ -99,8 +99,8 @@ public class InteractionMannequin extends HabboItem {
return; return;
client.getHabbo().getHabboInfo().setLook(ClothingValidationManager.VALIDATE_ON_MANNEQUIN ? ClothingValidationManager.validateLook(client.getHabbo(), newLook, client.getHabbo().getHabboInfo().getGender().name()) : newLook); client.getHabbo().getHabboInfo().setLook(ClothingValidationManager.VALIDATE_ON_MANNEQUIN ? ClothingValidationManager.validateLook(client.getHabbo(), newLook, client.getHabbo().getHabboInfo().getGender().name()) : newLook);
room.sendComposer(new RoomUserDataComposer(client.getHabbo()).compose()); room.sendComposer(new UserChangeMessageComposer(client.getHabbo()).compose());
client.sendResponse(new UserDataComposer(client.getHabbo())); client.sendResponse(new UserObjectComposer(client.getHabbo()));
} }
@Override @Override

View File

@ -1,6 +1,5 @@
package com.eu.habbo.habbohotel.items.interactions; package com.eu.habbo.habbohotel.items.interactions;
import com.eu.habbo.habbohotel.bots.Bot;
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.*;
@ -9,16 +8,11 @@ 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.WiredEffectType; import com.eu.habbo.habbohotel.wired.WiredEffectType;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
import gnu.trove.set.hash.THashSet; import gnu.trove.set.hash.THashSet;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
public class InteractionMultiHeight extends HabboItem { public class InteractionMultiHeight extends HabboItem {
public InteractionMultiHeight(int id, int userId, Item item, String extradata, int limitedStack, int limitedSells) { public InteractionMultiHeight(int id, int userId, Item item, String extradata, int limitedStack, int limitedSells) {

View File

@ -9,7 +9,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.items.rentablespaces.RentableSpaceInfoComposer; import com.eu.habbo.messages.outgoing.rooms.items.rentablespaces.RentableSpaceStatusMessageComposer;
import com.eu.habbo.threading.runnables.ClearRentedSpace; import com.eu.habbo.threading.runnables.ClearRentedSpace;
import gnu.trove.set.hash.THashSet; import gnu.trove.set.hash.THashSet;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -244,25 +244,25 @@ public class InteractionRentableSpace extends HabboItem {
public int getRentErrorCode(Habbo habbo) { public int getRentErrorCode(Habbo habbo) {
if (this.isRented() && this.renterId != habbo.getHabboInfo().getId()) { if (this.isRented() && this.renterId != habbo.getHabboInfo().getId()) {
return RentableSpaceInfoComposer.SPACE_ALREADY_RENTED; return RentableSpaceStatusMessageComposer.SPACE_ALREADY_RENTED;
} }
if (habbo.getHabboStats().isRentingSpace() && habbo.getHabboStats().getRentedItemId() != this.getId()) { if (habbo.getHabboStats().isRentingSpace() && habbo.getHabboStats().getRentedItemId() != this.getId()) {
return RentableSpaceInfoComposer.CAN_RENT_ONLY_ONE_SPACE; return RentableSpaceStatusMessageComposer.CAN_RENT_ONLY_ONE_SPACE;
} }
if (habbo.getHabboStats().getClubExpireTimestamp() < Emulator.getIntUnixTimestamp()) { if (habbo.getHabboStats().getClubExpireTimestamp() < Emulator.getIntUnixTimestamp()) {
return RentableSpaceInfoComposer.CANT_RENT_NO_HABBO_CLUB; return RentableSpaceStatusMessageComposer.CANT_RENT_NO_HABBO_CLUB;
} }
if (this.rentCost() > habbo.getHabboInfo().getCredits()) { if (this.rentCost() > habbo.getHabboInfo().getCredits()) {
return RentableSpaceInfoComposer.NOT_ENOUGH_CREDITS; return RentableSpaceStatusMessageComposer.NOT_ENOUGH_CREDITS;
} }
return 0; return 0;
} }
public void sendRentWidget(Habbo habbo) { public void sendRentWidget(Habbo habbo) {
habbo.getClient().sendResponse(new RentableSpaceInfoComposer(habbo, this, this.getRentErrorCode(habbo))); habbo.getClient().sendResponse(new RentableSpaceStatusMessageComposer(habbo, this, this.getRentErrorCode(habbo)));
} }
} }

View File

@ -8,7 +8,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.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.items.youtube.YoutubeVideoComposer; import com.eu.habbo.messages.outgoing.rooms.items.youtube.YoutubeDisplayVideoMessageComposer;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
@ -90,7 +90,7 @@ public class InteractionYoutubeTV extends HabboItem {
if (this.currentVideo != null) { if (this.currentVideo != null) {
int startTime = this.offset; int startTime = this.offset;
if (this.playing) startTime += Emulator.getIntUnixTimestamp() - this.startedWatchingAt; if (this.playing) startTime += Emulator.getIntUnixTimestamp() - this.startedWatchingAt;
client.sendResponse(new YoutubeVideoComposer(this.getId(), this.currentVideo, this.playing, startTime)); client.sendResponse(new YoutubeDisplayVideoMessageComposer(this.getId(), this.currentVideo, this.playing, startTime));
} }
} }
} }

View File

@ -9,7 +9,7 @@ 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.users.clothingvalidation.ClothingValidationManager; import com.eu.habbo.habbohotel.users.clothingvalidation.ClothingValidationManager;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserChangeMessageComposer;
import com.eu.habbo.messages.outgoing.users.FigureUpdateComposer; import com.eu.habbo.messages.outgoing.users.FigureUpdateComposer;
import com.eu.habbo.plugin.EventHandler; import com.eu.habbo.plugin.EventHandler;
import com.eu.habbo.plugin.events.users.UserDisconnectEvent; import com.eu.habbo.plugin.events.users.UserDisconnectEvent;
@ -68,7 +68,7 @@ public class InteractionFootballGate extends HabboItem {
habbo.getHabboStats().cache.remove(CACHE_KEY); habbo.getHabboStats().cache.remove(CACHE_KEY);
habbo.getClient().sendResponse(new FigureUpdateComposer(habbo)); habbo.getClient().sendResponse(new FigureUpdateComposer(habbo));
if (habbo.getHabboInfo().getCurrentRoom() != null) { if (habbo.getHabboInfo().getCurrentRoom() != null) {
habbo.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDataComposer(habbo).compose()); habbo.getHabboInfo().getCurrentRoom().sendComposer(new UserChangeMessageComposer(habbo).compose());
} }
} }
} }
@ -124,7 +124,7 @@ public class InteractionFootballGate extends HabboItem {
habbo.getHabboInfo().setLook(ClothingValidationManager.VALIDATE_ON_FBALLGATE ? ClothingValidationManager.validateLook(habbo, lookEvent.newLook, lookEvent.gender.name()) : lookEvent.newLook); habbo.getHabboInfo().setLook(ClothingValidationManager.VALIDATE_ON_FBALLGATE ? ClothingValidationManager.validateLook(habbo, lookEvent.newLook, lookEvent.gender.name()) : lookEvent.newLook);
Emulator.getThreading().run(habbo.getHabboInfo()); Emulator.getThreading().run(habbo.getHabboInfo());
habbo.getClient().sendResponse(new FigureUpdateComposer(habbo)); habbo.getClient().sendResponse(new FigureUpdateComposer(habbo));
room.sendComposer(new RoomUserDataComposer(habbo).compose()); room.sendComposer(new UserChangeMessageComposer(habbo).compose());
} }
habbo.getHabboStats().cache.remove(CACHE_KEY); habbo.getHabboStats().cache.remove(CACHE_KEY);
@ -138,7 +138,7 @@ public class InteractionFootballGate extends HabboItem {
habbo.getHabboInfo().setLook(ClothingValidationManager.VALIDATE_ON_FBALLGATE ? ClothingValidationManager.validateLook(habbo, lookEvent.newLook, lookEvent.gender.name()) : lookEvent.newLook); habbo.getHabboInfo().setLook(ClothingValidationManager.VALIDATE_ON_FBALLGATE ? ClothingValidationManager.validateLook(habbo, lookEvent.newLook, lookEvent.gender.name()) : lookEvent.newLook);
Emulator.getThreading().run(habbo.getHabboInfo()); Emulator.getThreading().run(habbo.getHabboInfo());
habbo.getClient().sendResponse(new FigureUpdateComposer(habbo)); habbo.getClient().sendResponse(new FigureUpdateComposer(habbo));
room.sendComposer(new RoomUserDataComposer(habbo).compose()); room.sendComposer(new UserChangeMessageComposer(habbo).compose());
} }
} }
} }

View File

@ -10,7 +10,7 @@ import com.eu.habbo.habbohotel.rooms.RoomUnit;
import com.eu.habbo.habbohotel.rooms.RoomUnitStatus; import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
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.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
@ -75,7 +75,7 @@ public class InteractionNest extends HabboItem {
pet.getRoomUnit().clearStatus(); pet.getRoomUnit().clearStatus();
pet.getRoomUnit().removeStatus(RoomUnitStatus.MOVE); pet.getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
pet.getRoomUnit().setStatus(RoomUnitStatus.LAY, room.getStackHeight(this.getX(), this.getY(), false) + ""); pet.getRoomUnit().setStatus(RoomUnitStatus.LAY, room.getStackHeight(this.getX(), this.getY(), false) + "");
room.sendComposer(new RoomUserStatusComposer(roomUnit).compose()); room.sendComposer(new UserUpdateComposer(roomUnit).compose());
} }
@Override @Override

View File

@ -10,7 +10,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.habbohotel.rooms.RoomUnitStatus; import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
import com.eu.habbo.habbohotel.rooms.RoomUserRotation; import com.eu.habbo.habbohotel.rooms.RoomUserRotation;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
import com.eu.habbo.threading.runnables.PetClearPosture; import com.eu.habbo.threading.runnables.PetClearPosture;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -41,7 +41,7 @@ public class InteractionPetDrink extends InteractionDefault {
pet.getRoomUnit().removeStatus(RoomUnitStatus.MOVE); pet.getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
pet.getRoomUnit().setStatus(RoomUnitStatus.EAT, "0"); pet.getRoomUnit().setStatus(RoomUnitStatus.EAT, "0");
pet.addThirst(-75); pet.addThirst(-75);
room.sendComposer(new RoomUserStatusComposer(roomUnit).compose()); room.sendComposer(new UserUpdateComposer(roomUnit).compose());
Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.EAT, null, true), 500); Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.EAT, null, true), 500);
AchievementManager.progressAchievement(Emulator.getGameEnvironment().getHabboManager().getHabbo(pet.getUserId()), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetFeeding"), 75); AchievementManager.progressAchievement(Emulator.getGameEnvironment().getHabboManager().getHabbo(pet.getUserId()), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetFeeding"), 75);

View File

@ -9,7 +9,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.habbohotel.rooms.RoomUnitStatus; import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
import com.eu.habbo.habbohotel.rooms.RoomUserRotation; import com.eu.habbo.habbohotel.rooms.RoomUserRotation;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
import com.eu.habbo.threading.runnables.PetEatAction; import com.eu.habbo.threading.runnables.PetEatAction;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -42,7 +42,7 @@ public class InteractionPetFood extends InteractionDefault {
pet.getRoomUnit().clearStatus(); pet.getRoomUnit().clearStatus();
pet.getRoomUnit().removeStatus(RoomUnitStatus.MOVE); pet.getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
pet.getRoomUnit().setStatus(RoomUnitStatus.EAT, "0"); pet.getRoomUnit().setStatus(RoomUnitStatus.EAT, "0");
room.sendComposer(new RoomUserStatusComposer(roomUnit).compose()); room.sendComposer(new UserUpdateComposer(roomUnit).compose());
Emulator.getThreading().run(new PetEatAction(pet, this)); Emulator.getThreading().run(new PetEatAction(pet, this));
} }
} }

View File

@ -14,10 +14,9 @@ import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.habbohotel.wired.WiredEffectType; import com.eu.habbo.habbohotel.wired.WiredEffectType;
import com.eu.habbo.habbohotel.wired.WiredGiveRewardItem; import com.eu.habbo.habbohotel.wired.WiredGiveRewardItem;
import com.eu.habbo.habbohotel.wired.WiredHandler; import com.eu.habbo.habbohotel.wired.WiredHandler;
import com.eu.habbo.messages.ClientMessage;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.incoming.wired.WiredSaveException; import com.eu.habbo.messages.incoming.wired.WiredSaveException;
import com.eu.habbo.messages.outgoing.generic.alerts.UpdateFailedComposer; import com.eu.habbo.messages.outgoing.generic.alerts.WiredValidationErrorComposer;
import gnu.trove.procedure.TObjectProcedure; import gnu.trove.procedure.TObjectProcedure;
import gnu.trove.set.hash.THashSet; import gnu.trove.set.hash.THashSet;
@ -202,7 +201,7 @@ public class WiredEffectGiveReward extends InteractionWiredEffect {
} }
} }
gameClient.sendResponse(new UpdateFailedComposer(Emulator.getTexts().getValue("alert.superwired.invalid"))); gameClient.sendResponse(new WiredValidationErrorComposer(Emulator.getTexts().getValue("alert.superwired.invalid")));
return false; return false;
} }

View File

@ -14,10 +14,9 @@ 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.wired.WiredEffectType; import com.eu.habbo.habbohotel.wired.WiredEffectType;
import com.eu.habbo.habbohotel.wired.WiredHandler; import com.eu.habbo.habbohotel.wired.WiredHandler;
import com.eu.habbo.messages.ClientMessage;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.incoming.wired.WiredSaveException; import com.eu.habbo.messages.incoming.wired.WiredSaveException;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserWhisperComposer; import com.eu.habbo.messages.outgoing.rooms.users.WhisperMessageComposer;
import com.eu.habbo.threading.runnables.RoomUnitKick; import com.eu.habbo.threading.runnables.RoomUnitKick;
import gnu.trove.procedure.TObjectProcedure; import gnu.trove.procedure.TObjectProcedure;
@ -60,7 +59,7 @@ public class WiredEffectKickHabbo extends InteractionWiredEffect {
room.giveEffect(habbo, 4, 2); room.giveEffect(habbo, 4, 2);
if (!this.message.isEmpty()) if (!this.message.isEmpty())
habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(this.message, habbo, habbo, RoomChatMessageBubbles.ALERT))); habbo.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(this.message, habbo, habbo, RoomChatMessageBubbles.ALERT)));
Emulator.getThreading().run(new RoomUnitKick(habbo, room, true), 2000); Emulator.getThreading().run(new RoomUnitKick(habbo, room, true), 2000);

View File

@ -12,10 +12,9 @@ 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.wired.WiredEffectType; import com.eu.habbo.habbohotel.wired.WiredEffectType;
import com.eu.habbo.habbohotel.wired.WiredHandler; import com.eu.habbo.habbohotel.wired.WiredHandler;
import com.eu.habbo.messages.ClientMessage;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.incoming.wired.WiredSaveException; import com.eu.habbo.messages.incoming.wired.WiredSaveException;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserWhisperComposer; import com.eu.habbo.messages.outgoing.rooms.users.WhisperMessageComposer;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
@ -75,7 +74,7 @@ public class WiredEffectMuteHabbo extends InteractionWiredEffect {
room.muteHabbo(habbo, 60); room.muteHabbo(habbo, 60);
habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(this.message.replace("%user%", habbo.getHabboInfo().getUsername()).replace("%online_count%", Emulator.getGameEnvironment().getHabboManager().getOnlineCount() + "").replace("%room_count%", Emulator.getGameEnvironment().getRoomManager().getActiveRooms().size() + ""), habbo, habbo, RoomChatMessageBubbles.WIRED))); habbo.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(this.message.replace("%user%", habbo.getHabboInfo().getUsername()).replace("%online_count%", Emulator.getGameEnvironment().getHabboManager().getOnlineCount() + "").replace("%room_count%", Emulator.getGameEnvironment().getRoomManager().getActiveRooms().size() + ""), habbo, habbo, RoomChatMessageBubbles.WIRED)));
} }
return true; return true;

View File

@ -14,7 +14,7 @@ import com.eu.habbo.habbohotel.wired.WiredHandler;
import com.eu.habbo.habbohotel.wired.WiredTriggerType; import com.eu.habbo.habbohotel.wired.WiredTriggerType;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.incoming.wired.WiredSaveException; import com.eu.habbo.messages.incoming.wired.WiredSaveException;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserWhisperComposer; import com.eu.habbo.messages.outgoing.rooms.users.WhisperMessageComposer;
import gnu.trove.procedure.TObjectProcedure; import gnu.trove.procedure.TObjectProcedure;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -95,7 +95,7 @@ public class WiredEffectWhisper extends InteractionWiredEffect {
if (habbo != null) { if (habbo != null) {
String msg = this.message.replace("%user%", habbo.getHabboInfo().getUsername()).replace("%online_count%", Emulator.getGameEnvironment().getHabboManager().getOnlineCount() + "").replace("%room_count%", Emulator.getGameEnvironment().getRoomManager().getActiveRooms().size() + ""); String msg = this.message.replace("%user%", habbo.getHabboInfo().getUsername()).replace("%online_count%", Emulator.getGameEnvironment().getHabboManager().getOnlineCount() + "").replace("%room_count%", Emulator.getGameEnvironment().getRoomManager().getActiveRooms().size() + "");
habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(msg, habbo, habbo, RoomChatMessageBubbles.WIRED))); habbo.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(msg, habbo, habbo, RoomChatMessageBubbles.WIRED)));
Emulator.getThreading().run(() -> WiredHandler.handle(WiredTriggerType.SAY_SOMETHING, roomUnit, room, new Object[]{ msg })); Emulator.getThreading().run(() -> WiredHandler.handle(WiredTriggerType.SAY_SOMETHING, roomUnit, room, new Object[]{ msg }));
if (habbo.getRoomUnit().isIdle()) { if (habbo.getRoomUnit().isIdle()) {
@ -105,7 +105,7 @@ public class WiredEffectWhisper extends InteractionWiredEffect {
} }
} else { } else {
for (Habbo h : room.getHabbos()) { for (Habbo h : room.getHabbos()) {
h.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(this.message.replace("%user%", h.getHabboInfo().getUsername()).replace("%online_count%", Emulator.getGameEnvironment().getHabboManager().getOnlineCount() + "").replace("%room_count%", Emulator.getGameEnvironment().getRoomManager().getActiveRooms().size() + ""), h, h, RoomChatMessageBubbles.WIRED))); h.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(this.message.replace("%user%", h.getHabboInfo().getUsername()).replace("%online_count%", Emulator.getGameEnvironment().getHabboManager().getOnlineCount() + "").replace("%room_count%", Emulator.getGameEnvironment().getRoomManager().getActiveRooms().size() + ""), h, h, RoomChatMessageBubbles.WIRED)));
} }
return true; return true;

View File

@ -7,11 +7,11 @@ import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
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.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
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.PetRespectNotificationComposer; 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.UserUpdateComposer;
import org.apache.commons.math3.util.Pair; import org.apache.commons.math3.util.Pair;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -311,8 +311,8 @@ public class MonsterplantPet extends Pet implements IPetLook {
this.getRoomUnit().setStatus(RoomUnitStatus.GESTURE, "reb"); this.getRoomUnit().setStatus(RoomUnitStatus.GESTURE, "reb");
pet.getRoomUnit().setStatus(RoomUnitStatus.GESTURE, "reb"); pet.getRoomUnit().setStatus(RoomUnitStatus.GESTURE, "reb");
this.room.sendComposer(new RoomUserStatusComposer(this.getRoomUnit()).compose()); this.room.sendComposer(new UserUpdateComposer(this.getRoomUnit()).compose());
this.room.sendComposer(new RoomUserStatusComposer(pet.getRoomUnit()).compose()); this.room.sendComposer(new UserUpdateComposer(pet.getRoomUnit()).compose());
this.getRoomUnit().removeStatus(RoomUnitStatus.GESTURE); this.getRoomUnit().removeStatus(RoomUnitStatus.GESTURE);
pet.getRoomUnit().removeStatus(RoomUnitStatus.GESTURE); pet.getRoomUnit().removeStatus(RoomUnitStatus.GESTURE);
@ -338,7 +338,7 @@ public class MonsterplantPet extends Pet implements IPetLook {
AchievementManager.progressAchievement(ownerOne, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantBreeder"), 5); AchievementManager.progressAchievement(ownerOne, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantBreeder"), 5);
seed = Emulator.getGameEnvironment().getItemManager().createItem(ownerOne.getHabboInfo().getId(), seedBase, 0, 0, ""); seed = Emulator.getGameEnvironment().getItemManager().createItem(ownerOne.getHabboInfo().getId(), seedBase, 0, 0, "");
ownerOne.getInventory().getItemsComponent().addItem(seed); ownerOne.getInventory().getItemsComponent().addItem(seed);
ownerOne.getClient().sendResponse(new AddHabboItemComposer(seed)); ownerOne.getClient().sendResponse(new UnseenItemsComposer(seed));
ownerOne.getClient().sendResponse(new FurniListInvalidateComposer()); ownerOne.getClient().sendResponse(new FurniListInvalidateComposer());
} }
@ -346,7 +346,7 @@ public class MonsterplantPet extends Pet implements IPetLook {
AchievementManager.progressAchievement(ownerTwo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantBreeder"), 5); AchievementManager.progressAchievement(ownerTwo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantBreeder"), 5);
seed = Emulator.getGameEnvironment().getItemManager().createItem(ownerTwo.getHabboInfo().getId(), seedBase, 0, 0, ""); seed = Emulator.getGameEnvironment().getItemManager().createItem(ownerTwo.getHabboInfo().getId(), seedBase, 0, 0, "");
ownerTwo.getInventory().getItemsComponent().addItem(seed); ownerTwo.getInventory().getItemsComponent().addItem(seed);
ownerTwo.getClient().sendResponse(new AddHabboItemComposer(seed)); ownerTwo.getClient().sendResponse(new UnseenItemsComposer(seed));
ownerTwo.getClient().sendResponse(new FurniListInvalidateComposer()); ownerTwo.getClient().sendResponse(new FurniListInvalidateComposer());
} }
} }

View File

@ -10,7 +10,7 @@ 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.PetExperienceComposer; import com.eu.habbo.messages.outgoing.rooms.pets.PetExperienceComposer;
import com.eu.habbo.messages.outgoing.rooms.pets.PetRespectNotificationComposer; 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.UserRemoveMessageComposer;
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;
import gnu.trove.map.hash.THashMap; import gnu.trove.map.hash.THashMap;
@ -738,7 +738,7 @@ public class Pet implements ISerialize, Runnable {
} }
if (!dontSendPackets) { if (!dontSendPackets) {
room.sendComposer(new RoomUserRemoveComposer(this.roomUnit).compose()); room.sendComposer(new UserRemoveMessageComposer(this.roomUnit).compose());
room.removePet(this.id); room.removePet(this.id);
} }

View File

@ -40,7 +40,7 @@ import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageCompos
import com.eu.habbo.messages.outgoing.generic.alerts.GenericErrorComposer; 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.UnseenItemsComposer;
import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer; 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.QuestionAnsweredComposer; import com.eu.habbo.messages.outgoing.polls.infobus.QuestionAnsweredComposer;
@ -49,7 +49,7 @@ import com.eu.habbo.messages.outgoing.rooms.*;
import com.eu.habbo.messages.outgoing.rooms.items.*; import com.eu.habbo.messages.outgoing.rooms.items.*;
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.users.*; import com.eu.habbo.messages.outgoing.rooms.users.*;
import com.eu.habbo.messages.outgoing.users.MutedWhisperComposer; import com.eu.habbo.messages.outgoing.users.RemainingMutePeriodComposer;
import com.eu.habbo.plugin.Event; import com.eu.habbo.plugin.Event;
import com.eu.habbo.plugin.events.furniture.*; import com.eu.habbo.plugin.events.furniture.*;
import com.eu.habbo.plugin.events.rooms.RoomLoadedEvent; import com.eu.habbo.plugin.events.rooms.RoomLoadedEvent;
@ -706,7 +706,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
Habbo habbo = (picker != null && picker.getHabboInfo().getId() == item.getId() ? picker : Emulator.getGameServer().getGameClientManager().getHabbo(item.getUserId())); Habbo habbo = (picker != null && picker.getHabboInfo().getId() == item.getId() ? picker : Emulator.getGameServer().getGameClientManager().getHabbo(item.getUserId()));
if (habbo != null) { if (habbo != null) {
habbo.getInventory().getItemsComponent().addItem(item); habbo.getInventory().getItemsComponent().addItem(item);
habbo.getClient().sendResponse(new AddHabboItemComposer(item)); habbo.getClient().sendResponse(new UnseenItemsComposer(item));
habbo.getClient().sendResponse(new FurniListInvalidateComposer()); habbo.getClient().sendResponse(new FurniListInvalidateComposer());
} }
Emulator.getThreading().run(item); Emulator.getThreading().run(item);
@ -750,7 +750,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
} }
this.sendComposer(new RoomUserStatusComposer(roomUnit).compose()); this.sendComposer(new UserUpdateComposer(roomUnit).compose());
} }
public void updateHabbosAt(short x, short y) { public void updateHabbosAt(short x, short y) {
@ -825,7 +825,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
if (!roomUnits.isEmpty()) { if (!roomUnits.isEmpty()) {
this.sendComposer(new RoomUserStatusComposer(roomUnits, true).compose()); this.sendComposer(new UserUpdateComposer(roomUnits, true).compose());
} }
} }
@ -1212,7 +1212,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
if (habbo.getRoomUnit().isIdle()) { if (habbo.getRoomUnit().isIdle()) {
boolean danceIsNone = (habbo.getRoomUnit().getDanceType() == DanceType.NONE); boolean danceIsNone = (habbo.getRoomUnit().getDanceType() == DanceType.NONE);
if (danceIsNone) if (danceIsNone)
this.sendComposer(new RoomUnitIdleComposer(habbo.getRoomUnit()).compose()); this.sendComposer(new SleepMessageComposer(habbo.getRoomUnit()).compose());
if (danceIsNone && !Emulator.getConfig().getBoolean("hotel.roomuser.idle.not_dancing.ignore.wired_idle")) if (danceIsNone && !Emulator.getConfig().getBoolean("hotel.roomuser.idle.not_dancing.ignore.wired_idle"))
WiredHandler.handle(WiredTriggerType.IDLES, habbo.getRoomUnit(), this, new Object[]{habbo}); WiredHandler.handle(WiredTriggerType.IDLES, habbo.getRoomUnit(), this, new Object[]{habbo});
} }
@ -1580,7 +1580,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
if (!updatedUnit.isEmpty()) { if (!updatedUnit.isEmpty()) {
this.sendComposer(new RoomUserStatusComposer(updatedUnit, true).compose()); this.sendComposer(new UserUpdateComposer(updatedUnit, true).compose());
} }
this.traxManager.cycle(); this.traxManager.cycle();
@ -1625,7 +1625,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
private boolean cycleRoomUnit(RoomUnit unit, RoomUnitType type) { private boolean cycleRoomUnit(RoomUnit unit, RoomUnitType type) {
boolean update = unit.needsStatusUpdate(); boolean update = unit.needsStatusUpdate();
if (unit.hasStatus(RoomUnitStatus.SIGN)) { if (unit.hasStatus(RoomUnitStatus.SIGN)) {
this.sendComposer(new RoomUserStatusComposer(unit).compose()); this.sendComposer(new UserUpdateComposer(unit).compose());
unit.removeStatus(RoomUnitStatus.SIGN); unit.removeStatus(RoomUnitStatus.SIGN);
} }
@ -2678,7 +2678,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
if (sendRemovePacket && habbo.getRoomUnit() != null && !habbo.getRoomUnit().isTeleporting) { if (sendRemovePacket && habbo.getRoomUnit() != null && !habbo.getRoomUnit().isTeleporting) {
this.sendComposer(new RoomUserRemoveComposer(habbo.getRoomUnit()).compose()); this.sendComposer(new UserRemoveMessageComposer(habbo.getRoomUnit()).compose());
} }
if (habbo.getRoomUnit().getCurrentLocation() != null) { if (habbo.getRoomUnit().getCurrentLocation() != null) {
@ -2851,7 +2851,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
this.currentBots.remove(bot.getId()); this.currentBots.remove(bot.getId());
bot.getRoomUnit().setInRoom(false); bot.getRoomUnit().setInRoom(false);
bot.setRoom(null); bot.setRoom(null);
this.sendComposer(new RoomUserRemoveComposer(bot.getRoomUnit()).compose()); this.sendComposer(new UserRemoveMessageComposer(bot.getRoomUnit()).compose());
bot.setRoomUnit(null); bot.setRoomUnit(null);
return true; return true;
} }
@ -3135,7 +3135,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
} }
this.sendComposer(new RoomUserTypingComposer(habbo.getRoomUnit(), false).compose()); this.sendComposer(new UserTypingMessageComposer(habbo.getRoomUnit(), false).compose());
if (roomChatMessage == null || roomChatMessage.getMessage() == null || roomChatMessage.getMessage().equals("")) if (roomChatMessage == null || roomChatMessage.getMessage() == null || roomChatMessage.getMessage().equals(""))
return; return;
@ -3162,7 +3162,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
if (this.isMuted(habbo)) { if (this.isMuted(habbo)) {
habbo.getClient().sendResponse(new MutedWhisperComposer(this.mutedHabbos.get(habbo.getHabboInfo().getId()) - Emulator.getIntUnixTimestamp())); habbo.getClient().sendResponse(new RemainingMutePeriodComposer(this.mutedHabbos.get(habbo.getHabboInfo().getId()) - Emulator.getIntUnixTimestamp()));
return; return;
} }
} }
@ -3176,7 +3176,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
if (!ignoreWired) { if (!ignoreWired) {
if (WiredHandler.handle(WiredTriggerType.SAY_SOMETHING, habbo.getRoomUnit(), habbo.getHabboInfo().getCurrentRoom(), new Object[]{roomChatMessage.getMessage()})) { if (WiredHandler.handle(WiredTriggerType.SAY_SOMETHING, habbo.getRoomUnit(), habbo.getHabboInfo().getCurrentRoom(), new Object[]{roomChatMessage.getMessage()})) {
habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(roomChatMessage.getMessage(), habbo, habbo, roomChatMessage.getBubble()))); habbo.getClient().sendResponse(new WhisperMessageComposer(new RoomChatMessage(roomChatMessage.getMessage(), habbo, habbo, roomChatMessage.getBubble())));
return; return;
} }
} }
@ -3214,9 +3214,9 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
if (prefixMessage == null) { if (prefixMessage == null) {
prefixMessage = roomChatMessage.getHabbo().getHabboInfo().getRank().hasPrefix() ? new RoomUserNameChangedComposer(habbo, true).compose() : null; prefixMessage = roomChatMessage.getHabbo().getHabboInfo().getRank().hasPrefix() ? new UserNameChangedMessageComposer(habbo, true).compose() : null;
} }
ServerMessage clearPrefixMessage = prefixMessage != null ? new RoomUserNameChangedComposer(habbo).compose() : null; ServerMessage clearPrefixMessage = prefixMessage != null ? new UserNameChangedMessageComposer(habbo).compose() : null;
Rectangle tentRectangle = this.roomSpecialTypes.tentAt(habbo.getRoomUnit().getCurrentLocation()); Rectangle tentRectangle = this.roomSpecialTypes.tentAt(habbo.getRoomUnit().getCurrentLocation());
@ -3234,8 +3234,8 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
RoomChatMessage staffChatMessage = new RoomChatMessage(roomChatMessage); RoomChatMessage staffChatMessage = new RoomChatMessage(roomChatMessage);
staffChatMessage.setMessage("To " + staffChatMessage.getTargetHabbo().getHabboInfo().getUsername() + ": " + staffChatMessage.getMessage()); staffChatMessage.setMessage("To " + staffChatMessage.getTargetHabbo().getHabboInfo().getUsername() + ": " + staffChatMessage.getMessage());
final ServerMessage message = new RoomUserWhisperComposer(roomChatMessage).compose(); final ServerMessage message = new WhisperMessageComposer(roomChatMessage).compose();
final ServerMessage staffMessage = new RoomUserWhisperComposer(staffChatMessage).compose(); final ServerMessage staffMessage = new WhisperMessageComposer(staffChatMessage).compose();
for (Habbo h : this.getHabbos()) { for (Habbo h : this.getHabbos()) {
if (h == roomChatMessage.getTargetHabbo() || h == habbo) { if (h == roomChatMessage.getTargetHabbo() || h == habbo) {
@ -3280,7 +3280,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
showTentChatMessageOutsideTentIfPermitted(h, roomChatMessage, tentRectangle); showTentChatMessageOutsideTentIfPermitted(h, roomChatMessage, tentRectangle);
} }
} else if (chatType == RoomChatType.SHOUT) { } else if (chatType == RoomChatType.SHOUT) {
ServerMessage message = new RoomUserShoutComposer(roomChatMessage).compose(); ServerMessage message = new ShoutMessageComposer(roomChatMessage).compose();
for (Habbo h : this.getHabbos()) { for (Habbo h : this.getHabbos()) {
// Show the message // Show the message
@ -3364,7 +3364,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
if (receivingHabbo != null && receivingHabbo.hasPermission(Permission.ACC_SEE_TENTCHAT) && tentRectangle != null && !RoomLayout.tileInSquare(tentRectangle, receivingHabbo.getRoomUnit().getCurrentLocation())) { if (receivingHabbo != null && receivingHabbo.hasPermission(Permission.ACC_SEE_TENTCHAT) && tentRectangle != null && !RoomLayout.tileInSquare(tentRectangle, receivingHabbo.getRoomUnit().getCurrentLocation())) {
RoomChatMessage staffChatMessage = new RoomChatMessage(roomChatMessage); RoomChatMessage staffChatMessage = new RoomChatMessage(roomChatMessage);
staffChatMessage.setMessage("[" + Emulator.getTexts().getValue("hotel.room.tent.prefix") + "] " + staffChatMessage.getMessage()); staffChatMessage.setMessage("[" + Emulator.getTexts().getValue("hotel.room.tent.prefix") + "] " + staffChatMessage.getMessage());
final ServerMessage staffMessage = new RoomUserWhisperComposer(staffChatMessage).compose(); final ServerMessage staffMessage = new WhisperMessageComposer(staffChatMessage).compose();
receivingHabbo.getClient().sendResponse(staffMessage); receivingHabbo.getClient().sendResponse(staffMessage);
} }
} }
@ -4020,10 +4020,10 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
if (habbo.hasPermission(Permission.ACC_ANYROOMOWNER)) { if (habbo.hasPermission(Permission.ACC_ANYROOMOWNER)) {
habbo.getClient().sendResponse(new RoomOwnerComposer()); habbo.getClient().sendResponse(new YouAreOwnerMessageComposer());
flatCtrl = RoomRightLevels.MODERATOR; flatCtrl = RoomRightLevels.MODERATOR;
} else if (this.isOwner(habbo)) { } else if (this.isOwner(habbo)) {
habbo.getClient().sendResponse(new RoomOwnerComposer()); habbo.getClient().sendResponse(new YouAreOwnerMessageComposer());
flatCtrl = RoomRightLevels.MODERATOR; flatCtrl = RoomRightLevels.MODERATOR;
} else if (this.hasRights(habbo) && !this.hasGuild()) { } else if (this.hasRights(habbo) && !this.hasGuild()) {
flatCtrl = RoomRightLevels.RIGHTS; flatCtrl = RoomRightLevels.RIGHTS;
@ -4031,7 +4031,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
flatCtrl = this.getGuildRightLevel(habbo); flatCtrl = this.getGuildRightLevel(habbo);
} }
habbo.getClient().sendResponse(new RoomRightsComposer(flatCtrl)); habbo.getClient().sendResponse(new YouAreControllerMessageComposer(flatCtrl));
habbo.getRoomUnit().setStatus(RoomUnitStatus.FLAT_CONTROL, flatCtrl.level + ""); habbo.getRoomUnit().setStatus(RoomUnitStatus.FLAT_CONTROL, flatCtrl.level + "");
habbo.getRoomUnit().setRightsLevel(flatCtrl); habbo.getRoomUnit().setRightsLevel(flatCtrl);
habbo.getRoomUnit().statusUpdate(true); habbo.getRoomUnit().statusUpdate(true);
@ -4067,7 +4067,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
ban.delete(); ban.delete();
} }
this.sendComposer(new RoomUserUnbannedComposer(this, userId).compose()); this.sendComposer(new UserUnbannedFromRoomComposer(this, userId).compose());
} }
public boolean isBanned(Habbo habbo) { public boolean isBanned(Habbo habbo) {
@ -4101,7 +4101,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
habbo.getRoomUnit().cmdSit = true; habbo.getRoomUnit().cmdSit = true;
habbo.getRoomUnit().setBodyRotation(RoomUserRotation.values()[habbo.getRoomUnit().getBodyRotation().getValue() - habbo.getRoomUnit().getBodyRotation().getValue() % 2]); habbo.getRoomUnit().setBodyRotation(RoomUserRotation.values()[habbo.getRoomUnit().getBodyRotation().getValue() - habbo.getRoomUnit().getBodyRotation().getValue() % 2]);
habbo.getRoomUnit().setStatus(RoomUnitStatus.SIT, 0.5 + ""); habbo.getRoomUnit().setStatus(RoomUnitStatus.SIT, 0.5 + "");
this.sendComposer(new RoomUserStatusComposer(habbo.getRoomUnit()).compose()); this.sendComposer(new UserUpdateComposer(habbo.getRoomUnit()).compose());
} }
public void makeStand(Habbo habbo) { public void makeStand(Habbo habbo) {
@ -4112,7 +4112,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
habbo.getRoomUnit().cmdStand = true; habbo.getRoomUnit().cmdStand = true;
habbo.getRoomUnit().setBodyRotation(RoomUserRotation.values()[habbo.getRoomUnit().getBodyRotation().getValue() - habbo.getRoomUnit().getBodyRotation().getValue() % 2]); habbo.getRoomUnit().setBodyRotation(RoomUserRotation.values()[habbo.getRoomUnit().getBodyRotation().getValue() - habbo.getRoomUnit().getBodyRotation().getValue() % 2]);
habbo.getRoomUnit().removeStatus(RoomUnitStatus.SIT); habbo.getRoomUnit().removeStatus(RoomUnitStatus.SIT);
this.sendComposer(new RoomUserStatusComposer(habbo.getRoomUnit()).compose()); this.sendComposer(new UserUpdateComposer(habbo.getRoomUnit()).compose());
} }
} }
@ -4221,7 +4221,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
if (habbo != null) { if (habbo != null) {
habbo.getInventory().getItemsComponent().addItems(items); habbo.getInventory().getItemsComponent().addItems(items);
habbo.getClient().sendResponse(new AddHabboItemComposer(items)); habbo.getClient().sendResponse(new UnseenItemsComposer(items));
} }
for (HabboItem i : items) { for (HabboItem i : items) {
@ -4271,7 +4271,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
if (user != null) { if (user != null) {
user.getInventory().getItemsComponent().addItems(entrySet.getValue()); user.getInventory().getItemsComponent().addItems(entrySet.getValue());
user.getClient().sendResponse(new AddHabboItemComposer(entrySet.getValue())); user.getClient().sendResponse(new UnseenItemsComposer(entrySet.getValue()));
} }
} }
} }
@ -4331,14 +4331,14 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
this.dance(habbo, DanceType.NONE); this.dance(habbo, DanceType.NONE);
} }
this.sendComposer(new RoomUnitIdleComposer(habbo.getRoomUnit()).compose()); this.sendComposer(new SleepMessageComposer(habbo.getRoomUnit()).compose());
WiredHandler.handle(WiredTriggerType.IDLES, habbo.getRoomUnit(), this, new Object[]{habbo}); WiredHandler.handle(WiredTriggerType.IDLES, habbo.getRoomUnit(), this, new Object[]{habbo});
} }
public void unIdle(Habbo habbo) { public void unIdle(Habbo habbo) {
if (habbo == null || habbo.getRoomUnit() == null) return; if (habbo == null || habbo.getRoomUnit() == null) return;
habbo.getRoomUnit().resetIdleTimer(); habbo.getRoomUnit().resetIdleTimer();
this.sendComposer(new RoomUnitIdleComposer(habbo.getRoomUnit()).compose()); this.sendComposer(new SleepMessageComposer(habbo.getRoomUnit()).compose());
WiredHandler.handle(WiredTriggerType.UNIDLES, habbo.getRoomUnit(), this, new Object[]{habbo}); WiredHandler.handle(WiredTriggerType.UNIDLES, habbo.getRoomUnit(), this, new Object[]{habbo});
} }

View File

@ -38,9 +38,9 @@ import com.eu.habbo.messages.outgoing.rooms.*;
import com.eu.habbo.messages.outgoing.rooms.items.ObjectsMessageComposer; 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.RoomEventComposer;
import com.eu.habbo.messages.outgoing.rooms.users.*; import com.eu.habbo.messages.outgoing.rooms.users.*;
import com.eu.habbo.messages.outgoing.users.MutedWhisperComposer; import com.eu.habbo.messages.outgoing.users.RemainingMutePeriodComposer;
import com.eu.habbo.plugin.events.navigator.NavigatorRoomCreatedEvent; import com.eu.habbo.plugin.events.navigator.NavigatorRoomCreatedEvent;
import com.eu.habbo.plugin.events.rooms.RoomFloorItemsLoadEvent; import com.eu.habbo.plugin.events.rooms.RoomFloorItemsLoadEvent;
import com.eu.habbo.plugin.events.rooms.RoomUncachedEvent; import com.eu.habbo.plugin.events.rooms.RoomUncachedEvent;
@ -447,7 +447,7 @@ public class RoomManager {
room.setNeedsUpdate(true); room.setNeedsUpdate(true);
habbo.getHabboStats().votedRooms.push(room.getId()); habbo.getHabboStats().votedRooms.push(room.getId());
for (Habbo h : room.getHabbos()) { for (Habbo h : room.getHabbos()) {
h.getClient().sendResponse(new RoomScoreComposer(room.getScore(), !this.hasVotedForRoom(h, room))); h.getClient().sendResponse(new RoomRatingComposer(room.getScore(), !this.hasVotedForRoom(h, room)));
} }
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO room_votes VALUES (?, ?)")) { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO room_votes VALUES (?, ?)")) {
@ -594,7 +594,7 @@ public class RoomManager {
if (existingRoom.getRoom() != null) { if (existingRoom.getRoom() != null) {
if (existingRoom.getCurrentLocation() != null) if (existingRoom.getCurrentLocation() != null)
existingRoom.getCurrentLocation().removeUnit(existingRoom); existingRoom.getCurrentLocation().removeUnit(existingRoom);
existingRoom.getRoom().sendComposer(new RoomUserRemoveComposer(existingRoom).compose()); existingRoom.getRoom().sendComposer(new UserRemoveMessageComposer(existingRoom).compose());
} }
habbo.getRoomUnit().setRoom(null); habbo.getRoomUnit().setRoom(null);
} }
@ -651,26 +651,26 @@ public class RoomManager {
habbo.getHabboInfo().setLoadingRoom(room.getId()); habbo.getHabboInfo().setLoadingRoom(room.getId());
habbo.getClient().sendResponse(new RoomModelComposer(room)); habbo.getClient().sendResponse(new RoomReadyMessageComposer(room));
if (!room.getWallPaint().equals("0.0")) if (!room.getWallPaint().equals("0.0"))
habbo.getClient().sendResponse(new RoomPaintComposer("wallpaper", room.getWallPaint())); habbo.getClient().sendResponse(new RoomPropertyMessageComposer("wallpaper", room.getWallPaint()));
if (!room.getFloorPaint().equals("0.0")) if (!room.getFloorPaint().equals("0.0"))
habbo.getClient().sendResponse(new RoomPaintComposer("floor", room.getFloorPaint())); habbo.getClient().sendResponse(new RoomPropertyMessageComposer("floor", room.getFloorPaint()));
habbo.getClient().sendResponse(new RoomPaintComposer("landscape", room.getBackgroundPaint())); habbo.getClient().sendResponse(new RoomPropertyMessageComposer("landscape", room.getBackgroundPaint()));
room.refreshRightsForHabbo(habbo); room.refreshRightsForHabbo(habbo);
habbo.getClient().sendResponse(new RoomScoreComposer(room.getScore(), !this.hasVotedForRoom(habbo, room))); habbo.getClient().sendResponse(new RoomRatingComposer(room.getScore(), !this.hasVotedForRoom(habbo, room)));
habbo.getRoomUnit().setFastWalk(habbo.getRoomUnit().isFastWalk() && habbo.hasPermission("cmd_fastwalk", room.hasRights(habbo))); habbo.getRoomUnit().setFastWalk(habbo.getRoomUnit().isFastWalk() && habbo.hasPermission("cmd_fastwalk", room.hasRights(habbo)));
if (room.isPromoted()) { if (room.isPromoted()) {
habbo.getClient().sendResponse(new RoomPromotionMessageComposer(room, room.getPromotion())); habbo.getClient().sendResponse(new RoomEventComposer(room, room.getPromotion()));
} else { } else {
habbo.getClient().sendResponse(new RoomPromotionMessageComposer(null, null)); habbo.getClient().sendResponse(new RoomEventComposer(null, null));
} }
if (room.getOwnerId() != habbo.getHabboInfo().getId() && !habbo.getHabboStats().visitedRoom(room.getId())) { if (room.getOwnerId() != habbo.getHabboInfo().getId() && !habbo.getHabboStats().visitedRoom(room.getId())) {
@ -733,7 +733,7 @@ public class RoomManager {
GameClient client = habboToSendEnter.getClient(); GameClient client = habboToSendEnter.getClient();
if (client != null) { if (client != null) {
client.sendResponse(new RoomUsersComposer(habbo).compose()); client.sendResponse(new RoomUsersComposer(habbo).compose());
client.sendResponse(new RoomUserStatusComposer(habbo.getRoomUnit()).compose()); client.sendResponse(new UserUpdateComposer(habbo.getRoomUnit()).compose());
} }
} }
@ -745,7 +745,7 @@ public class RoomManager {
synchronized (room.roomUnitLock) { synchronized (room.roomUnitLock) {
habbo.getClient().sendResponse(new RoomUsersComposer(habbos)); habbo.getClient().sendResponse(new RoomUsersComposer(habbos));
habbo.getClient().sendResponse(new RoomUserStatusComposer(habbos)); habbo.getClient().sendResponse(new UserUpdateComposer(habbos));
} }
if (habbo.getHabboStats().guild != 0) { if (habbo.getHabboStats().guild != 0) {
@ -775,13 +775,13 @@ public class RoomManager {
habbo.getClient().sendResponse(new DanceMessageComposer(bot.getRoomUnit())); habbo.getClient().sendResponse(new DanceMessageComposer(bot.getRoomUnit()));
} }
habbo.getClient().sendResponse(new RoomUserStatusComposer(bot.getRoomUnit(), bot.getRoomUnit().getZ())); habbo.getClient().sendResponse(new UserUpdateComposer(bot.getRoomUnit(), bot.getRoomUnit().getZ()));
} }
} }
habbo.getClient().sendResponse(new RoomPaneComposer(room, room.isOwner(habbo))); habbo.getClient().sendResponse(new RoomEntryInfoMessageComposer(room, room.isOwner(habbo)));
habbo.getClient().sendResponse(new RoomThicknessComposer(room)); habbo.getClient().sendResponse(new RoomVisualizationSettingsComposer(room));
habbo.getClient().sendResponse(new GetGuestRoomResultComposer(room, habbo.getClient().getHabbo(), false, true)); habbo.getClient().sendResponse(new GetGuestRoomResultComposer(room, habbo.getClient().getHabbo(), false, true));
@ -821,7 +821,7 @@ public class RoomManager {
if (!room.getCurrentPets().isEmpty()) { if (!room.getCurrentPets().isEmpty()) {
habbo.getClient().sendResponse(new RoomPetComposer(room.getCurrentPets())); habbo.getClient().sendResponse(new RoomPetComposer(room.getCurrentPets()));
for (Pet pet : room.getCurrentPets().valueCollection()) { for (Pet pet : room.getCurrentPets().valueCollection()) {
habbo.getClient().sendResponse(new RoomUserStatusComposer(pet.getRoomUnit())); habbo.getClient().sendResponse(new UserUpdateComposer(pet.getRoomUnit()));
} }
} }
@ -829,7 +829,7 @@ public class RoomManager {
habbo.getHabboStats().mutedBubbleTracker = true; habbo.getHabboStats().mutedBubbleTracker = true;
int remainingMuteTime = habbo.getHabboStats().remainingMuteTime(); int remainingMuteTime = habbo.getHabboStats().remainingMuteTime();
habbo.getClient().sendResponse(new FloodControlMessageComposer(remainingMuteTime)); habbo.getClient().sendResponse(new FloodControlMessageComposer(remainingMuteTime));
habbo.getClient().sendResponse(new MutedWhisperComposer(remainingMuteTime)); habbo.getClient().sendResponse(new RemainingMutePeriodComposer(remainingMuteTime));
room.sendComposer(new IgnoreResultMessageComposer(habbo, IgnoreResultMessageComposer.MUTED).compose()); room.sendComposer(new IgnoreResultMessageComposer(habbo, IgnoreResultMessageComposer.MUTED).compose());
} else if (habbo.getHabboStats().mutedBubbleTracker) { } else if (habbo.getHabboStats().mutedBubbleTracker) {
habbo.getHabboStats().mutedBubbleTracker = false; habbo.getHabboStats().mutedBubbleTracker = false;
@ -851,7 +851,7 @@ public class RoomManager {
} }
if (roomHabbo.getRoomUnit().isIdle()) { if (roomHabbo.getRoomUnit().isIdle()) {
habbo.getClient().sendResponse(new RoomUnitIdleComposer(roomHabbo.getRoomUnit())); habbo.getClient().sendResponse(new SleepMessageComposer(roomHabbo.getRoomUnit()));
} }
if (roomHabbo.getHabboStats().userIgnored(habbo.getHabboInfo().getId())) { if (roomHabbo.getHabboStats().userIgnored(habbo.getHabboInfo().getId())) {
@ -874,7 +874,7 @@ public class RoomManager {
if (roomHabbo.getRoomUnit().getRoomUnitType().equals(RoomUnitType.PET)) { if (roomHabbo.getRoomUnit().getRoomUnitType().equals(RoomUnitType.PET)) {
try { try {
habbo.getClient().sendResponse(new RoomUserRemoveComposer(roomHabbo.getRoomUnit())); habbo.getClient().sendResponse(new UserRemoveMessageComposer(roomHabbo.getRoomUnit()));
habbo.getClient().sendResponse(new RoomUserPetComposer(((PetData) roomHabbo.getHabboStats().cache.get("pet_type")).getType(), (Integer) roomHabbo.getHabboStats().cache.get("pet_race"), (String) roomHabbo.getHabboStats().cache.get("pet_color"), roomHabbo)); habbo.getClient().sendResponse(new RoomUserPetComposer(((PetData) roomHabbo.getHabboStats().cache.get("pet_type")).getType(), (Integer) roomHabbo.getHabboStats().cache.get("pet_race"), (String) roomHabbo.getHabboStats().cache.get("pet_color"), roomHabbo));
} catch (Exception e) { } catch (Exception e) {

View File

@ -4,9 +4,9 @@ import com.eu.habbo.Emulator;
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.MessageComposer; import com.eu.habbo.messages.outgoing.MessageComposer;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer; import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
import com.eu.habbo.messages.outgoing.trading.*; import com.eu.habbo.messages.outgoing.trading.*;
import com.eu.habbo.plugin.events.trading.TradeConfirmEvent; import com.eu.habbo.plugin.events.trading.TradeConfirmEvent;
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem; import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
@ -47,13 +47,13 @@ public class RoomTrade {
if (!roomTradeUser.getHabbo().getRoomUnit().hasStatus(RoomUnitStatus.TRADING)) { if (!roomTradeUser.getHabbo().getRoomUnit().hasStatus(RoomUnitStatus.TRADING)) {
roomTradeUser.getHabbo().getRoomUnit().setStatus(RoomUnitStatus.TRADING, ""); roomTradeUser.getHabbo().getRoomUnit().setStatus(RoomUnitStatus.TRADING, "");
if (!roomTradeUser.getHabbo().getRoomUnit().isWalking()) if (!roomTradeUser.getHabbo().getRoomUnit().isWalking())
this.room.sendComposer(new RoomUserStatusComposer(roomTradeUser.getHabbo().getRoomUnit()).compose()); this.room.sendComposer(new UserUpdateComposer(roomTradeUser.getHabbo().getRoomUnit()).compose());
} }
} }
} }
protected void openTrade() { protected void openTrade() {
this.sendMessageToUsers(new TradeStartComposer(this)); this.sendMessageToUsers(new TradingOpenComposer(this));
} }
public void offerItem(Habbo habbo, HabboItem item) { public void offerItem(Habbo habbo, HabboItem item) {
@ -101,14 +101,14 @@ public class RoomTrade {
user.setAccepted(value); user.setAccepted(value);
this.sendMessageToUsers(new TradeAcceptedComposer(user)); this.sendMessageToUsers(new TradingAcceptComposer(user));
boolean accepted = true; boolean accepted = true;
for (RoomTradeUser roomTradeUser : this.users) { for (RoomTradeUser roomTradeUser : this.users) {
if (!roomTradeUser.getAccepted()) if (!roomTradeUser.getAccepted())
accepted = false; accepted = false;
} }
if (accepted) { if (accepted) {
this.sendMessageToUsers(new TradingWaitingConfirmComposer()); this.sendMessageToUsers(new TradingConfirmationComposer());
} }
} }
@ -117,7 +117,7 @@ public class RoomTrade {
user.confirm(); user.confirm();
this.sendMessageToUsers(new TradeAcceptedComposer(user)); this.sendMessageToUsers(new TradingAcceptComposer(user));
boolean accepted = true; boolean accepted = true;
for (RoomTradeUser roomTradeUser : this.users) { for (RoomTradeUser roomTradeUser : this.users) {
if (!roomTradeUser.getConfirmed()) if (!roomTradeUser.getConfirmed())
@ -126,7 +126,7 @@ public class RoomTrade {
if (accepted) { if (accepted) {
if (this.tradeItems()) { if (this.tradeItems()) {
this.closeWindow(); this.closeWindow();
this.sendMessageToUsers(new TradeCompleteComposer()); this.sendMessageToUsers(new TradingNotOpenComposer());
} }
this.room.stopTrade(this); this.room.stopTrade(this);
@ -137,7 +137,7 @@ public class RoomTrade {
for (RoomTradeUser roomTradeUser : this.users) { for (RoomTradeUser roomTradeUser : this.users) {
for (HabboItem item : roomTradeUser.getItems()) { for (HabboItem item : roomTradeUser.getItems()) {
if (roomTradeUser.getHabbo().getInventory().getItemsComponent().getHabboItem(item.getId()) != null) { if (roomTradeUser.getHabbo().getInventory().getItemsComponent().getHabboItem(item.getId()) != null) {
this.sendMessageToUsers(new TradeClosedComposer(roomTradeUser.getHabbo().getRoomUnit().getId(), TradeClosedComposer.ITEMS_NOT_FOUND)); this.sendMessageToUsers(new TradingCloseComposer(roomTradeUser.getHabbo().getRoomUnit().getId(), TradingCloseComposer.ITEMS_NOT_FOUND));
return false; return false;
} }
} }
@ -255,8 +255,8 @@ public class RoomTrade {
userOne.getHabbo().getInventory().getItemsComponent().addItems(itemsUserTwo); userOne.getHabbo().getInventory().getItemsComponent().addItems(itemsUserTwo);
userTwo.getHabbo().getInventory().getItemsComponent().addItems(itemsUserOne); userTwo.getHabbo().getInventory().getItemsComponent().addItems(itemsUserOne);
userOne.getHabbo().getClient().sendResponse(new AddHabboItemComposer(itemsUserTwo)); userOne.getHabbo().getClient().sendResponse(new UnseenItemsComposer(itemsUserTwo));
userTwo.getHabbo().getClient().sendResponse(new AddHabboItemComposer(itemsUserOne)); userTwo.getHabbo().getClient().sendResponse(new UnseenItemsComposer(itemsUserOne));
userOne.getHabbo().getClient().sendResponse(new FurniListInvalidateComposer()); userOne.getHabbo().getClient().sendResponse(new FurniListInvalidateComposer());
userTwo.getHabbo().getClient().sendResponse(new FurniListInvalidateComposer()); userTwo.getHabbo().getClient().sendResponse(new FurniListInvalidateComposer());
@ -270,7 +270,7 @@ public class RoomTrade {
} }
protected void updateWindow() { protected void updateWindow() {
this.sendMessageToUsers(new TradeUpdateComposer(this)); this.sendMessageToUsers(new TradingItemListComposer(this));
} }
private void returnItems() { private void returnItems() {
@ -292,7 +292,7 @@ public class RoomTrade {
user.clearItems(); user.clearItems();
} }
this.updateWindow(); this.updateWindow();
this.sendMessageToUsers(new TradeClosedComposer(habbo.getHabboInfo().getId(), TradeClosedComposer.USER_CANCEL_TRADE)); this.sendMessageToUsers(new TradingCloseComposer(habbo.getHabboInfo().getId(), TradingCloseComposer.USER_CANCEL_TRADE));
this.room.stopTrade(this); this.room.stopTrade(this);
} }
@ -304,7 +304,7 @@ public class RoomTrade {
continue; continue;
habbo.getRoomUnit().removeStatus(RoomUnitStatus.TRADING); habbo.getRoomUnit().removeStatus(RoomUnitStatus.TRADING);
this.room.sendComposer(new RoomUserStatusComposer(habbo.getRoomUnit()).compose()); this.room.sendComposer(new UserUpdateComposer(habbo.getRoomUnit()).compose());
} }
} }

View File

@ -11,7 +11,7 @@ import com.eu.habbo.habbohotel.pets.RideablePet;
import com.eu.habbo.habbohotel.users.DanceType; import com.eu.habbo.habbohotel.users.DanceType;
import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.habbohotel.users.HabboItem; import com.eu.habbo.habbohotel.users.HabboItem;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
import com.eu.habbo.plugin.Event; import com.eu.habbo.plugin.Event;
import com.eu.habbo.plugin.events.roomunit.RoomUnitLookAtPointEvent; import com.eu.habbo.plugin.events.roomunit.RoomUnitLookAtPointEvent;
import com.eu.habbo.plugin.events.roomunit.RoomUnitSetGoalEvent; import com.eu.habbo.plugin.events.roomunit.RoomUnitSetGoalEvent;
@ -311,7 +311,7 @@ public class RoomUnit {
this.tilesWalked--; this.tilesWalked--;
this.setGoalLocation(this.currentLocation); this.setGoalLocation(this.currentLocation);
this.status.remove(RoomUnitStatus.MOVE); this.status.remove(RoomUnitStatus.MOVE);
room.sendComposer(new RoomUserStatusComposer(this).compose()); room.sendComposer(new UserUpdateComposer(this).compose());
if (habbo != null) { if (habbo != null) {
((ConditionalGate) item).onRejected(this, this.getRoom(), new Object[]{}); ((ConditionalGate) item).onRejected(this, this.getRoom(), new Object[]{});
@ -346,7 +346,7 @@ public class RoomUnit {
ridingUnit.setPreviousLocation(this.getCurrentLocation()); ridingUnit.setPreviousLocation(this.getCurrentLocation());
ridingUnit.setGoalLocation(this.getGoal()); ridingUnit.setGoalLocation(this.getGoal());
ridingUnit.setStatus(RoomUnitStatus.MOVE, next.x + "," + next.y + "," + (zHeight - 1.0)); ridingUnit.setStatus(RoomUnitStatus.MOVE, next.x + "," + next.y + "," + (zHeight - 1.0));
room.sendComposer(new RoomUserStatusComposer(ridingUnit).compose()); room.sendComposer(new UserUpdateComposer(ridingUnit).compose());
//ridingUnit.setZ(zHeight - 1.0); //ridingUnit.setZ(zHeight - 1.0);
} }
} }

View File

@ -11,10 +11,10 @@ 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.NotificationDialogMessageComposer; import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
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.UserSongDisksInventoryMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.NowPlayingMessageComposer; 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;
@ -309,7 +309,7 @@ public class TraxManager implements Disposable {
GameClient client = owner.getClient(); GameClient client = owner.getClient();
if (client != null) { if (client != null) {
client.sendResponse(new AddHabboItemComposer(musicDisc)); client.sendResponse(new UnseenItemsComposer(musicDisc));
client.sendResponse(new FurniListInvalidateComposer()); client.sendResponse(new FurniListInvalidateComposer());
} }
} }
@ -340,7 +340,7 @@ public class TraxManager implements Disposable {
GameClient client = owner.getClient(); GameClient client = owner.getClient();
if (client != null) { if (client != null) {
client.sendResponse(new AddHabboItemComposer(musicDisc)); client.sendResponse(new UnseenItemsComposer(musicDisc));
client.sendResponse(new FurniListInvalidateComposer()); client.sendResponse(new FurniListInvalidateComposer());
} }
} }
@ -404,7 +404,7 @@ public class TraxManager implements Disposable {
GameClient client = h.getClient(); GameClient client = h.getClient();
if (client != null) { if (client != null) {
client.sendResponse(new JukeBoxMySongsComposer(this.myList(h))); client.sendResponse(new UserSongDisksInventoryMessageComposer(this.myList(h)));
} }
}); });
} }

View File

@ -11,7 +11,7 @@ import com.eu.habbo.habbohotel.users.inventory.BadgesComponent;
import com.eu.habbo.messages.outgoing.generic.alerts.*; import com.eu.habbo.messages.outgoing.generic.alerts.*;
import com.eu.habbo.messages.outgoing.inventory.*; import com.eu.habbo.messages.outgoing.inventory.*;
import com.eu.habbo.messages.outgoing.rooms.FloodControlMessageComposer; import com.eu.habbo.messages.outgoing.rooms.FloodControlMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer; import com.eu.habbo.messages.outgoing.rooms.RoomForwardMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.users.*; import com.eu.habbo.messages.outgoing.rooms.users.*;
import com.eu.habbo.messages.outgoing.users.*; import com.eu.habbo.messages.outgoing.users.*;
import com.eu.habbo.plugin.events.users.UserCreditsEvent; import com.eu.habbo.plugin.events.users.UserCreditsEvent;
@ -276,7 +276,7 @@ public class Habbo implements Runnable {
public void whisper(String message, RoomChatMessageBubbles bubble) { public void whisper(String message, RoomChatMessageBubbles bubble) {
if (this.getRoomUnit().isInRoom()) { if (this.getRoomUnit().isInRoom()) {
this.client.sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(message, this.client.getHabbo().getRoomUnit(), bubble))); this.client.sendResponse(new WhisperMessageComposer(new RoomChatMessage(message, this.client.getHabbo().getRoomUnit(), bubble)));
} }
} }
@ -300,7 +300,7 @@ public class Habbo implements Runnable {
public void shout(String message, RoomChatMessageBubbles bubble) { public void shout(String message, RoomChatMessageBubbles bubble) {
if (this.getRoomUnit().isInRoom()) { if (this.getRoomUnit().isInRoom()) {
this.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserShoutComposer(new RoomChatMessage(message, this.client.getHabbo().getRoomUnit(), bubble)).compose()); this.getHabboInfo().getCurrentRoom().sendComposer(new ShoutMessageComposer(new RoomChatMessage(message, this.client.getHabbo().getRoomUnit(), bubble)).compose());
} }
} }
@ -325,20 +325,20 @@ public class Habbo implements Runnable {
public void goToRoom(int id) { public void goToRoom(int id) {
this.client.sendResponse(new ForwardToRoomComposer(id)); this.client.sendResponse(new RoomForwardMessageComposer(id));
} }
public void addFurniture(HabboItem item) { public void addFurniture(HabboItem item) {
this.habboInventory.getItemsComponent().addItem(item); this.habboInventory.getItemsComponent().addItem(item);
this.client.sendResponse(new AddHabboItemComposer(item)); this.client.sendResponse(new UnseenItemsComposer(item));
this.client.sendResponse(new FurniListInvalidateComposer()); this.client.sendResponse(new FurniListInvalidateComposer());
} }
public void addFurniture(THashSet<HabboItem> items) { public void addFurniture(THashSet<HabboItem> items) {
this.habboInventory.getItemsComponent().addItems(items); this.habboInventory.getItemsComponent().addItems(items);
this.client.sendResponse(new AddHabboItemComposer(items)); this.client.sendResponse(new UnseenItemsComposer(items));
this.client.sendResponse(new FurniListInvalidateComposer()); this.client.sendResponse(new FurniListInvalidateComposer());
} }
@ -385,7 +385,7 @@ public class Habbo implements Runnable {
HabboBadge badge = BadgesComponent.createBadge(code, this); HabboBadge badge = BadgesComponent.createBadge(code, this);
this.habboInventory.getBadgesComponent().addBadge(badge); this.habboInventory.getBadgesComponent().addBadge(badge);
this.client.sendResponse(new BadgeReceivedComposer(badge)); this.client.sendResponse(new BadgeReceivedComposer(badge));
this.client.sendResponse(new AddHabboItemComposer(badge.getId(), AddHabboItemComposer.AddHabboItemCategory.BADGE)); this.client.sendResponse(new UnseenItemsComposer(badge.getId(), UnseenItemsComposer.AddHabboItemCategory.BADGE));
THashMap<String, String> keys = new THashMap<>(); THashMap<String, String> keys = new THashMap<>();
keys.put("display", "BUBBLE"); keys.put("display", "BUBBLE");
@ -417,7 +417,7 @@ public class Habbo implements Runnable {
if (!this.hasPermission("acc_no_mute")) { if (!this.hasPermission("acc_no_mute")) {
int remaining = this.habboStats.addMuteTime(seconds); int remaining = this.habboStats.addMuteTime(seconds);
this.client.sendResponse(new FloodControlMessageComposer(remaining)); this.client.sendResponse(new FloodControlMessageComposer(remaining));
this.client.sendResponse(new MutedWhisperComposer(remaining)); this.client.sendResponse(new RemainingMutePeriodComposer(remaining));
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom(); Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
if (room != null && !isFlood) { if (room != null && !isFlood) {

View File

@ -12,7 +12,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.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.messages.outgoing.rooms.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
import gnu.trove.map.hash.TIntIntHashMap; import gnu.trove.map.hash.TIntIntHashMap;
import gnu.trove.procedure.TIntIntProcedure; import gnu.trove.procedure.TIntIntProcedure;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -451,7 +451,7 @@ public class HabboInfo implements Runnable {
roomUnit.setZ(riding.getRoomUnit().getZ()); roomUnit.setZ(riding.getRoomUnit().getZ());
roomUnit.setPreviousLocationZ(riding.getRoomUnit().getZ()); roomUnit.setPreviousLocationZ(riding.getRoomUnit().getZ());
roomUnit.stopWalking(); roomUnit.stopWalking();
room.sendComposer(new RoomUserStatusComposer(roomUnit).compose()); room.sendComposer(new UserUpdateComposer(roomUnit).compose());
List<RoomTile> availableTiles = isRemoving ? new ArrayList<>() : this.getCurrentRoom().getLayout().getWalkableTilesAround(roomUnit.getCurrentLocation()); List<RoomTile> availableTiles = isRemoving ? new ArrayList<>() : this.getCurrentRoom().getLayout().getWalkableTilesAround(roomUnit.getCurrentLocation());
RoomTile tile = availableTiles.isEmpty() ? roomUnit.getCurrentLocation() : availableTiles.get(0); RoomTile tile = availableTiles.isEmpty() ? roomUnit.getCurrentLocation() : availableTiles.get(0);

View File

@ -16,7 +16,7 @@ import com.eu.habbo.habbohotel.wired.WiredHandler;
import com.eu.habbo.habbohotel.wired.WiredTriggerType; import com.eu.habbo.habbohotel.wired.WiredTriggerType;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.rooms.users.DanceMessageComposer; import com.eu.habbo.messages.outgoing.rooms.users.DanceMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserChangeMessageComposer;
import com.eu.habbo.messages.outgoing.users.FigureUpdateComposer; import com.eu.habbo.messages.outgoing.users.FigureUpdateComposer;
import gnu.trove.set.hash.THashSet; import gnu.trove.set.hash.THashSet;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
@ -322,7 +322,7 @@ public abstract class HabboItem implements Runnable, IEventTriggers {
habbo.getClient().sendResponse(new FigureUpdateComposer(habbo)); habbo.getClient().sendResponse(new FigureUpdateComposer(habbo));
if (habbo.getHabboInfo().getCurrentRoom() != null) { if (habbo.getHabboInfo().getCurrentRoom() != null) {
habbo.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDataComposer(habbo).compose()); habbo.getHabboInfo().getCurrentRoom().sendComposer(new UserChangeMessageComposer(habbo).compose());
} }
} }
} }

View File

@ -10,7 +10,7 @@ import com.eu.habbo.messages.outgoing.catalog.marketplace.MarketplaceConfigurati
import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageComposer; import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageComposer;
import com.eu.habbo.messages.outgoing.modtool.ModeratorInitMessageComposer; import com.eu.habbo.messages.outgoing.modtool.ModeratorInitMessageComposer;
import com.eu.habbo.messages.outgoing.users.UserPerksComposer; import com.eu.habbo.messages.outgoing.users.UserPerksComposer;
import com.eu.habbo.messages.outgoing.users.UserPermissionsComposer; import com.eu.habbo.messages.outgoing.users.UserRightsMessageComposer;
import com.eu.habbo.plugin.events.users.UserRankChangedEvent; import com.eu.habbo.plugin.events.users.UserRankChangedEvent;
import com.eu.habbo.plugin.events.users.UserRegisteredEvent; import com.eu.habbo.plugin.events.users.UserRegisteredEvent;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -266,7 +266,7 @@ public class HabboManager {
habbo.getInventory().getEffectsComponent().createRankEffect(habbo.getHabboInfo().getRank().getRoomEffect()); habbo.getInventory().getEffectsComponent().createRankEffect(habbo.getHabboInfo().getRank().getRoomEffect());
} }
habbo.getClient().sendResponse(new UserPermissionsComposer(habbo)); habbo.getClient().sendResponse(new UserRightsMessageComposer(habbo));
habbo.getClient().sendResponse(new UserPerksComposer(habbo)); habbo.getClient().sendResponse(new UserPerksComposer(habbo));
if (habbo.hasPermission(Permission.ACC_SUPPORTTOOL)) { if (habbo.hasPermission(Permission.ACC_SUPPORTTOOL)) {

View File

@ -10,9 +10,9 @@ 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.HabboStats; import com.eu.habbo.habbohotel.users.HabboStats;
import com.eu.habbo.habbohotel.users.clothingvalidation.ClothingValidationManager; import com.eu.habbo.habbohotel.users.clothingvalidation.ClothingValidationManager;
import com.eu.habbo.messages.outgoing.catalog.ClubCenterDataComposer; import com.eu.habbo.messages.outgoing.catalog.ScrSendKickbackInfoMessageComposer;
import com.eu.habbo.messages.outgoing.generic.ClubGiftNotificationComposer; import com.eu.habbo.messages.outgoing.generic.ClubGiftNotificationComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserChangeMessageComposer;
import com.eu.habbo.messages.outgoing.users.*; import com.eu.habbo.messages.outgoing.users.*;
import gnu.trove.map.hash.THashMap; import gnu.trove.map.hash.THashMap;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -89,12 +89,12 @@ public class SubscriptionHabboClub extends Subscription {
if ((Emulator.getIntUnixTimestamp() - habbo.getHabboStats().hcMessageLastModified) < 60) { if ((Emulator.getIntUnixTimestamp() - habbo.getHabboStats().hcMessageLastModified) < 60) {
Emulator.getThreading().run(() -> { Emulator.getThreading().run(() -> {
habbo.getClient().sendResponse(new UserClubComposer(habbo)); habbo.getClient().sendResponse(new ScrSendUserInfoComposer(habbo));
habbo.getClient().sendResponse(new UserPermissionsComposer(habbo)); habbo.getClient().sendResponse(new UserRightsMessageComposer(habbo));
}, (Emulator.getIntUnixTimestamp() - habbo.getHabboStats().hcMessageLastModified)); }, (Emulator.getIntUnixTimestamp() - habbo.getHabboStats().hcMessageLastModified));
} else { } else {
habbo.getClient().sendResponse(new UserClubComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, UserClubComposer.RESPONSE_TYPE_NORMAL)); habbo.getClient().sendResponse(new ScrSendUserInfoComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, ScrSendUserInfoComposer.RESPONSE_TYPE_NORMAL));
habbo.getClient().sendResponse(new UserPermissionsComposer(habbo)); habbo.getClient().sendResponse(new UserRightsMessageComposer(habbo));
} }
} }
} }
@ -112,8 +112,8 @@ public class SubscriptionHabboClub extends Subscription {
if (amount < 0) { if (amount < 0) {
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(this.getUserId()); Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(this.getUserId());
if (habbo != null && habbo.getClient() != null) { if (habbo != null && habbo.getClient() != null) {
habbo.getClient().sendResponse(new UserClubComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, UserClubComposer.RESPONSE_TYPE_NORMAL)); habbo.getClient().sendResponse(new ScrSendUserInfoComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, ScrSendUserInfoComposer.RESPONSE_TYPE_NORMAL));
habbo.getClient().sendResponse(new UserPermissionsComposer(habbo)); habbo.getClient().sendResponse(new UserRightsMessageComposer(habbo));
} }
} }
} }
@ -131,8 +131,8 @@ public class SubscriptionHabboClub extends Subscription {
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(this.getUserId()); Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(this.getUserId());
if (habbo != null && habbo.getClient() != null) { if (habbo != null && habbo.getClient() != null) {
habbo.getClient().sendResponse(new UserClubComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, UserClubComposer.RESPONSE_TYPE_NORMAL)); habbo.getClient().sendResponse(new ScrSendUserInfoComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, ScrSendUserInfoComposer.RESPONSE_TYPE_NORMAL));
habbo.getClient().sendResponse(new UserPermissionsComposer(habbo)); habbo.getClient().sendResponse(new UserRightsMessageComposer(habbo));
} }
} }
@ -165,13 +165,13 @@ public class SubscriptionHabboClub extends Subscription {
} }
if (habbo.getHabboInfo().getCurrentRoom() != null) { if (habbo.getHabboInfo().getCurrentRoom() != null) {
habbo.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDataComposer(habbo).compose()); habbo.getHabboInfo().getCurrentRoom().sendComposer(new UserChangeMessageComposer(habbo).compose());
} }
} }
if (habbo != null && habbo.getClient() != null) { if (habbo != null && habbo.getClient() != null) {
habbo.getClient().sendResponse(new UserClubComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, UserClubComposer.RESPONSE_TYPE_NORMAL)); habbo.getClient().sendResponse(new ScrSendUserInfoComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, ScrSendUserInfoComposer.RESPONSE_TYPE_NORMAL));
habbo.getClient().sendResponse(new UserPermissionsComposer(habbo)); habbo.getClient().sendResponse(new UserRightsMessageComposer(habbo));
} }
} }
@ -181,7 +181,7 @@ public class SubscriptionHabboClub extends Subscription {
* @param habbo User to calculate for * @param habbo User to calculate for
* @return ClubCenterDataComposer * @return ClubCenterDataComposer
*/ */
public static ClubCenterDataComposer calculatePayday(HabboInfo habbo) { public static ScrSendKickbackInfoMessageComposer calculatePayday(HabboInfo habbo) {
Subscription activeSub = null; Subscription activeSub = null;
Subscription firstEverSub = null; Subscription firstEverSub = null;
int currentHcStreak = 0; int currentHcStreak = 0;
@ -238,7 +238,7 @@ public class SubscriptionHabboClub extends Subscription {
timeUntilPayday = (HC_PAYDAY_NEXT_DATE - Emulator.getIntUnixTimestamp()) / 60; timeUntilPayday = (HC_PAYDAY_NEXT_DATE - Emulator.getIntUnixTimestamp()) / 60;
} }
return new ClubCenterDataComposer( return new ScrSendKickbackInfoMessageComposer(
currentHcStreak, currentHcStreak,
(firstEverSub != null ? new SimpleDateFormat("dd-MM-yyyy").format(new Date(firstEverSub.getTimestampStart() * 1000L)) : ""), (firstEverSub != null ? new SimpleDateFormat("dd-MM-yyyy").format(new Date(firstEverSub.getTimestampStart() * 1000L)) : ""),
HC_PAYDAY_KICKBACK_PERCENTAGE, HC_PAYDAY_KICKBACK_PERCENTAGE,
@ -269,7 +269,7 @@ public class SubscriptionHabboClub extends Subscription {
int userId = set.getInt("user_id"); int userId = set.getInt("user_id");
HabboInfo habboInfo = Emulator.getGameEnvironment().getHabboManager().getHabboInfo(userId); HabboInfo habboInfo = Emulator.getGameEnvironment().getHabboManager().getHabboInfo(userId);
HabboStats stats = habboInfo.getHabboStats(); HabboStats stats = habboInfo.getHabboStats();
ClubCenterDataComposer calculated = calculatePayday(habboInfo); ScrSendKickbackInfoMessageComposer calculated = calculatePayday(habboInfo);
int totalReward = (calculated.creditRewardForMonthlySpent + calculated.creditRewardForStreakBonus); int totalReward = (calculated.creditRewardForMonthlySpent + calculated.creditRewardForStreakBonus);
if (totalReward > 0) { if (totalReward > 0) {
boolean claimed = claimPayDay(Emulator.getGameEnvironment().getHabboManager().getHabbo(userId), totalReward, HC_PAYDAY_CURRENCY); boolean claimed = claimPayDay(Emulator.getGameEnvironment().getHabboManager().getHabbo(userId), totalReward, HC_PAYDAY_CURRENCY);

View File

@ -19,10 +19,10 @@ 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.HabboItem; import com.eu.habbo.habbohotel.users.HabboItem;
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer; import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer; import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer; import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
import com.eu.habbo.messages.outgoing.wired.WiredRewardAlertComposer; import com.eu.habbo.messages.outgoing.wired.WiredRewardResultMessageComposer;
import com.eu.habbo.plugin.events.furniture.wired.WiredConditionFailedEvent; import com.eu.habbo.plugin.events.furniture.wired.WiredConditionFailedEvent;
import com.eu.habbo.plugin.events.furniture.wired.WiredStackExecutedEvent; import com.eu.habbo.plugin.events.furniture.wired.WiredStackExecutedEvent;
import com.eu.habbo.plugin.events.furniture.wired.WiredStackTriggeredEvent; import com.eu.habbo.plugin.events.furniture.wired.WiredStackTriggeredEvent;
@ -314,7 +314,7 @@ public class WiredHandler {
Emulator.getThreading().run(badge); Emulator.getThreading().run(badge);
habbo.getInventory().getBadgesComponent().addBadge(badge); habbo.getInventory().getBadgesComponent().addBadge(badge);
habbo.getClient().sendResponse(new BadgeReceivedComposer(badge)); habbo.getClient().sendResponse(new BadgeReceivedComposer(badge));
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_RECEIVED_BADGE)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_RECEIVED_BADGE));
} else { } else {
String[] data = reward.data.split("#"); String[] data = reward.data.split("#");
@ -348,11 +348,11 @@ public class WiredHandler {
HabboItem item = Emulator.getGameEnvironment().getItemManager().createItem(habbo.getHabboInfo().getId(), baseItem, 0, 0, ""); HabboItem item = Emulator.getGameEnvironment().getItemManager().createItem(habbo.getHabboInfo().getId(), baseItem, 0, 0, "");
if (item != null) { if (item != null) {
habbo.getClient().sendResponse(new AddHabboItemComposer(item)); habbo.getClient().sendResponse(new UnseenItemsComposer(item));
habbo.getClient().getHabbo().getInventory().getItemsComponent().addItem(item); habbo.getClient().getHabbo().getInventory().getItemsComponent().addItem(item);
habbo.getClient().sendResponse(new PurchaseOKMessageComposer(null)); habbo.getClient().sendResponse(new PurchaseOKMessageComposer(null));
habbo.getClient().sendResponse(new FurniListInvalidateComposer()); habbo.getClient().sendResponse(new FurniListInvalidateComposer());
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_RECEIVED_ITEM)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_RECEIVED_ITEM));
} }
} }
} else if (rewardReceived.type.equalsIgnoreCase("respect")) { } else if (rewardReceived.type.equalsIgnoreCase("respect")) {
@ -363,7 +363,7 @@ public class WiredHandler {
if (item != null) { if (item != null) {
Emulator.getGameEnvironment().getCatalogManager().purchaseItem(null, item, habbo, 1, "", true); Emulator.getGameEnvironment().getCatalogManager().purchaseItem(null, item, habbo, 1, "", true);
} }
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_RECEIVED_ITEM)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_RECEIVED_ITEM));
} }
} }
} }
@ -372,7 +372,7 @@ public class WiredHandler {
public static boolean getReward(Habbo habbo, WiredEffectGiveReward wiredBox) { public static boolean getReward(Habbo habbo, WiredEffectGiveReward wiredBox) {
if (wiredBox.limit > 0) { if (wiredBox.limit > 0) {
if (wiredBox.limit - wiredBox.given == 0) { if (wiredBox.limit - wiredBox.given == 0) {
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.LIMITED_NO_MORE_AVAILABLE)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.LIMITED_NO_MORE_AVAILABLE));
return false; return false;
} }
} }
@ -386,7 +386,7 @@ public class WiredHandler {
if (set.first()) { if (set.first()) {
if (set.getInt("row_count") >= 1) { if (set.getInt("row_count") >= 1) {
if (wiredBox.rewardTime == WiredEffectGiveReward.LIMIT_ONCE) { if (wiredBox.rewardTime == WiredEffectGiveReward.LIMIT_ONCE) {
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_ALREADY_RECEIVED)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_ALREADY_RECEIVED));
return false; return false;
} }
} }
@ -395,28 +395,28 @@ public class WiredHandler {
if (set.next()) { if (set.next()) {
if (wiredBox.rewardTime == WiredEffectGiveReward.LIMIT_N_MINUTES) { if (wiredBox.rewardTime == WiredEffectGiveReward.LIMIT_N_MINUTES) {
if (Emulator.getIntUnixTimestamp() - set.getInt("timestamp") <= 60) { if (Emulator.getIntUnixTimestamp() - set.getInt("timestamp") <= 60) {
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_ALREADY_RECEIVED_THIS_MINUTE)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_ALREADY_RECEIVED_THIS_MINUTE));
return false; return false;
} }
} }
if (wiredBox.uniqueRewards) { if (wiredBox.uniqueRewards) {
if (set.getInt("row_count") == wiredBox.rewardItems.size()) { if (set.getInt("row_count") == wiredBox.rewardItems.size()) {
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_ALL_COLLECTED)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_ALL_COLLECTED));
return false; return false;
} }
} }
if (wiredBox.rewardTime == WiredEffectGiveReward.LIMIT_N_HOURS) { if (wiredBox.rewardTime == WiredEffectGiveReward.LIMIT_N_HOURS) {
if (!(Emulator.getIntUnixTimestamp() - set.getInt("timestamp") >= (3600 * wiredBox.limitationInterval))) { if (!(Emulator.getIntUnixTimestamp() - set.getInt("timestamp") >= (3600 * wiredBox.limitationInterval))) {
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_ALREADY_RECEIVED_THIS_HOUR)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_ALREADY_RECEIVED_THIS_HOUR));
return false; return false;
} }
} }
if (wiredBox.rewardTime == WiredEffectGiveReward.LIMIT_N_DAY) { if (wiredBox.rewardTime == WiredEffectGiveReward.LIMIT_N_DAY) {
if (!(Emulator.getIntUnixTimestamp() - set.getInt("timestamp") >= (86400 * wiredBox.limitationInterval))) { if (!(Emulator.getIntUnixTimestamp() - set.getInt("timestamp") >= (86400 * wiredBox.limitationInterval))) {
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_ALREADY_RECEIVED_THIS_TODAY)); habbo.getClient().sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_ALREADY_RECEIVED_THIS_TODAY));
return false; return false;
} }
} }

View File

@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
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.rooms.ForwardToRoomComposer; import com.eu.habbo.messages.outgoing.rooms.RoomForwardMessageComposer;
public class AmbassadorVisitCommandEvent extends MessageHandler { public class AmbassadorVisitCommandEvent extends MessageHandler {
@Override @Override
@ -16,7 +16,7 @@ public class AmbassadorVisitCommandEvent extends MessageHandler {
if (habbo != null) { if (habbo != null) {
if (habbo.getHabboInfo().getCurrentRoom() != null) { if (habbo.getHabboInfo().getCurrentRoom() != null) {
this.client.sendResponse(new ForwardToRoomComposer(habbo.getHabboInfo().getCurrentRoom().getId())); this.client.sendResponse(new RoomForwardMessageComposer(habbo.getHabboInfo().getCurrentRoom().getId()));
} }
} }
} }

View File

@ -6,7 +6,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.camera.CameraPurchaseOKMessageComposer; import com.eu.habbo.messages.outgoing.camera.CameraPurchaseOKMessageComposer;
import com.eu.habbo.messages.outgoing.catalog.NotEnoughBalanceMessageComposer; import com.eu.habbo.messages.outgoing.catalog.NotEnoughBalanceMessageComposer;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
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;
@ -45,7 +45,7 @@ public class CameraPurchaseEvent extends MessageHandler {
this.client.getHabbo().getInventory().getItemsComponent().addItem(photoItem); this.client.getHabbo().getInventory().getItemsComponent().addItem(photoItem);
this.client.sendResponse(new CameraPurchaseOKMessageComposer()); this.client.sendResponse(new CameraPurchaseOKMessageComposer());
this.client.sendResponse(new AddHabboItemComposer(photoItem)); this.client.sendResponse(new UnseenItemsComposer(photoItem));
this.client.sendResponse(new FurniListInvalidateComposer()); this.client.sendResponse(new FurniListInvalidateComposer());
this.client.getHabbo().giveCredits(-CameraPurchaseEvent.CAMERA_PURCHASE_CREDITS); this.client.getHabbo().giveCredits(-CameraPurchaseEvent.CAMERA_PURCHASE_CREDITS);

View File

@ -2,7 +2,7 @@ package com.eu.habbo.messages.incoming.camera;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.camera.CameraRoomThumbnailSavedComposer; import com.eu.habbo.messages.outgoing.camera.ThumbnailStatusMessageComposer;
import com.eu.habbo.networking.camera.CameraClient; import com.eu.habbo.networking.camera.CameraClient;
import com.eu.habbo.networking.camera.messages.outgoing.CameraRenderImageComposer; import com.eu.habbo.networking.camera.messages.outgoing.CameraRenderImageComposer;
import com.eu.habbo.util.crypto.ZIP; import com.eu.habbo.util.crypto.ZIP;
@ -30,7 +30,7 @@ public class CameraRoomThumbnailEvent extends MessageHandler {
Emulator.getCameraClient().sendMessage(composer); Emulator.getCameraClient().sendMessage(composer);
} else { } else {
this.client.sendResponse(new CameraRoomThumbnailSavedComposer()); this.client.sendResponse(new ThumbnailStatusMessageComposer());
this.client.getHabbo().alert(Emulator.getTexts().getValue("camera.disabled")); this.client.getHabbo().alert(Emulator.getTexts().getValue("camera.disabled"));
} }
} }

View File

@ -20,7 +20,7 @@ import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageCo
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;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer; import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
import com.eu.habbo.messages.outgoing.users.HabboActivityPointNotificationMessageComposer; import com.eu.habbo.messages.outgoing.users.HabboActivityPointNotificationMessageComposer;
import com.eu.habbo.threading.runnables.ShutdownEmulator; import com.eu.habbo.threading.runnables.ShutdownEmulator;
@ -334,7 +334,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
} }
if (habbo != null) { if (habbo != null) {
habbo.getClient().sendResponse(new AddHabboItemComposer(gift)); habbo.getClient().sendResponse(new UnseenItemsComposer(gift));
habbo.getClient().getHabbo().getInventory().getItemsComponent().addItem(gift); habbo.getClient().getHabbo().getInventory().getItemsComponent().addItem(gift);
habbo.getClient().sendResponse(new FurniListInvalidateComposer()); habbo.getClient().sendResponse(new FurniListInvalidateComposer());
THashMap<String, String> keys = new THashMap<>(); THashMap<String, String> keys = new THashMap<>();

View File

@ -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.JukeBoxTrackDataComposer; import com.eu.habbo.messages.outgoing.rooms.items.jukebox.TraxSongInfoMessageComposer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -22,6 +22,6 @@ public class JukeBoxRequestTrackDataEvent extends MessageHandler {
tracks.add(track); tracks.add(track);
} }
this.client.sendResponse(new JukeBoxTrackDataComposer(tracks)); this.client.sendResponse(new TraxSongInfoMessageComposer(tracks));
} }
} }

View File

@ -2,7 +2,7 @@ package com.eu.habbo.messages.incoming.catalog;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.catalog.RedeemVoucherErrorComposer; import com.eu.habbo.messages.outgoing.catalog.VoucherRedeemErrorMessageComposer;
import com.eu.habbo.messages.outgoing.generic.alerts.HotelWillCloseInMinutesComposer; import com.eu.habbo.messages.outgoing.generic.alerts.HotelWillCloseInMinutesComposer;
import com.eu.habbo.threading.runnables.ShutdownEmulator; import com.eu.habbo.threading.runnables.ShutdownEmulator;
@ -17,7 +17,7 @@ public class RedeemVoucherEvent extends MessageHandler {
String voucherCode = this.packet.readString(); String voucherCode = this.packet.readString();
if (voucherCode.contains(" ")) { if (voucherCode.contains(" ")) {
this.client.sendResponse(new RedeemVoucherErrorComposer(RedeemVoucherErrorComposer.TECHNICAL_ERROR)); this.client.sendResponse(new VoucherRedeemErrorMessageComposer(VoucherRedeemErrorMessageComposer.TECHNICAL_ERROR));
return; return;
} }

View File

@ -2,12 +2,12 @@ package com.eu.habbo.messages.incoming.catalog;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.catalog.PetBreedsComposer; import com.eu.habbo.messages.outgoing.catalog.SellablePetPalettesMessageComposer;
public class RequestPetBreedsEvent extends MessageHandler { public class RequestPetBreedsEvent extends MessageHandler {
@Override @Override
public void handle() throws Exception { public void handle() throws Exception {
String petName = this.packet.readString(); String petName = this.packet.readString();
this.client.sendResponse(new PetBreedsComposer(petName, Emulator.getGameEnvironment().getPetManager().getBreeds(petName))); this.client.sendResponse(new SellablePetPalettesMessageComposer(petName, Emulator.getGameEnvironment().getPetManager().getBreeds(petName)));
} }
} }

View File

@ -6,12 +6,12 @@ import com.eu.habbo.habbohotel.permissions.Permission;
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.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer; import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
import com.eu.habbo.messages.outgoing.rooms.HeightMapUpdateMessageComposer; import com.eu.habbo.messages.outgoing.rooms.HeightMapUpdateMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.items.PresentOpenedMessageComposer; import com.eu.habbo.messages.outgoing.rooms.items.PresentOpenedMessageComposer;
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.users.RoomUserWhisperComposer; import com.eu.habbo.messages.outgoing.rooms.users.WhisperMessageComposer;
import com.eu.habbo.threading.runnables.OpenGift; import com.eu.habbo.threading.runnables.OpenGift;
public class OpenRecycleBoxEvent extends MessageHandler { public class OpenRecycleBoxEvent extends MessageHandler {
@ -37,13 +37,13 @@ public class OpenRecycleBoxEvent extends MessageHandler {
Emulator.getThreading().run(new OpenGift(item, this.client.getHabbo(), room), item.getBaseItem().getName().contains("present_wrap") ? 1000 : 0); Emulator.getThreading().run(new OpenGift(item, this.client.getHabbo(), room), item.getBaseItem().getName().contains("present_wrap") ? 1000 : 0);
} else { } else {
if (item.getExtradata().length() == 0) { if (item.getExtradata().length() == 0) {
this.client.sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(Emulator.getTexts().getValue("error.recycler.box.empty"), this.client.getHabbo(), this.client.getHabbo(), RoomChatMessageBubbles.BOT))); this.client.sendResponse(new WhisperMessageComposer(new RoomChatMessage(Emulator.getTexts().getValue("error.recycler.box.empty"), this.client.getHabbo(), this.client.getHabbo(), RoomChatMessageBubbles.BOT)));
} else { } else {
HabboItem reward = Emulator.getGameEnvironment().getItemManager().handleOpenRecycleBox(this.client.getHabbo(), item); HabboItem reward = Emulator.getGameEnvironment().getItemManager().handleOpenRecycleBox(this.client.getHabbo(), item);
if (reward != null) { if (reward != null) {
this.client.getHabbo().getInventory().getItemsComponent().addItem(reward); this.client.getHabbo().getInventory().getItemsComponent().addItem(reward);
this.client.sendResponse(new AddHabboItemComposer(reward)); this.client.sendResponse(new UnseenItemsComposer(reward));
this.client.sendResponse(new FurniListInvalidateComposer()); this.client.sendResponse(new FurniListInvalidateComposer());
this.client.sendResponse(new PresentOpenedMessageComposer(reward, item.getExtradata(), true)); this.client.sendResponse(new PresentOpenedMessageComposer(reward, item.getExtradata(), true));

View File

@ -8,7 +8,7 @@ import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer; import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer;
import com.eu.habbo.messages.outgoing.catalog.RecyclerFinishedComposer; import com.eu.habbo.messages.outgoing.catalog.RecyclerFinishedComposer;
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.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
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.threading.runnables.QueryDeleteHabboItem; import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
@ -57,7 +57,7 @@ public class RecycleEvent extends MessageHandler {
return; return;
} }
this.client.sendResponse(new AddHabboItemComposer(reward)); this.client.sendResponse(new UnseenItemsComposer(reward));
this.client.getHabbo().getInventory().getItemsComponent().addItem(reward); this.client.getHabbo().getInventory().getItemsComponent().addItem(reward);
this.client.sendResponse(new RecyclerFinishedComposer(RecyclerFinishedComposer.RECYCLING_COMPLETE)); this.client.sendResponse(new RecyclerFinishedComposer(RecyclerFinishedComposer.RECYCLING_COMPLETE));
this.client.sendResponse(new FurniListInvalidateComposer()); this.client.sendResponse(new FurniListInvalidateComposer());

View File

@ -1,11 +1,11 @@
package com.eu.habbo.messages.incoming.catalog.recycler; package com.eu.habbo.messages.incoming.catalog.recycler;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.catalog.ReloadRecyclerComposer; import com.eu.habbo.messages.outgoing.catalog.RecyclerStatusComposer;
public class ReloadRecyclerEvent extends MessageHandler { public class ReloadRecyclerEvent extends MessageHandler {
@Override @Override
public void handle() throws Exception { public void handle() throws Exception {
this.client.sendResponse(new ReloadRecyclerComposer()); this.client.sendResponse(new RecyclerStatusComposer());
} }
} }

View File

@ -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.catalog.LimitedEditionSoldOutComposer; import com.eu.habbo.messages.outgoing.catalog.LimitedEditionSoldOutComposer;
import com.eu.habbo.messages.outgoing.crafting.CraftingResultComposer; import com.eu.habbo.messages.outgoing.crafting.CraftingResultComposer;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
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.threading.runnables.QueryDeleteHabboItems; import com.eu.habbo.threading.runnables.QueryDeleteHabboItems;
@ -58,7 +58,7 @@ public class CraftingCraftItemEvent extends MessageHandler {
this.client.sendResponse(new CraftingResultComposer(recipe)); this.client.sendResponse(new CraftingResultComposer(recipe));
this.client.getHabbo().getInventory().getItemsComponent().addItem(rewardItem); this.client.getHabbo().getInventory().getItemsComponent().addItem(rewardItem);
this.client.sendResponse(new AddHabboItemComposer(rewardItem)); this.client.sendResponse(new UnseenItemsComposer(rewardItem));
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("Atcg")); AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("Atcg"));
toRemove.forEachValue(object -> { toRemove.forEachValue(object -> {
CraftingCraftItemEvent.this.client.sendResponse(new FurniListRemoveComposer(object.getGiftAdjustedId())); CraftingCraftItemEvent.this.client.sendResponse(new FurniListRemoveComposer(object.getGiftAdjustedId()));

View File

@ -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.catalog.LimitedEditionSoldOutComposer; import com.eu.habbo.messages.outgoing.catalog.LimitedEditionSoldOutComposer;
import com.eu.habbo.messages.outgoing.crafting.CraftingResultComposer; import com.eu.habbo.messages.outgoing.crafting.CraftingResultComposer;
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
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.threading.runnables.QueryDeleteHabboItem; import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
@ -76,7 +76,7 @@ public class CraftingCraftSecretEvent extends MessageHandler {
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("AtcgSecret")); AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("AtcgSecret"));
} }
this.client.getHabbo().getInventory().getItemsComponent().addItem(rewardItem); this.client.getHabbo().getInventory().getItemsComponent().addItem(rewardItem);
this.client.sendResponse(new AddHabboItemComposer(rewardItem)); this.client.sendResponse(new UnseenItemsComposer(rewardItem));
for (HabboItem item : habboItems) { for (HabboItem item : habboItems) {
this.client.getHabbo().getInventory().getItemsComponent().removeHabboItem(item); this.client.getHabbo().getInventory().getItemsComponent().removeHabboItem(item);
this.client.sendResponse(new FurniListRemoveComposer(item.getGiftAdjustedId())); this.client.sendResponse(new FurniListRemoveComposer(item.getGiftAdjustedId()));

View File

@ -1,7 +1,7 @@
package com.eu.habbo.messages.incoming.floorplaneditor; package com.eu.habbo.messages.incoming.floorplaneditor;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.floorplaneditor.FloorPlanEditorBlockedTilesComposer; import com.eu.habbo.messages.outgoing.floorplaneditor.RoomOccupiedTilesMessageComposer;
public class FloorPlanEditorRequestBlockedTilesEvent extends MessageHandler { public class FloorPlanEditorRequestBlockedTilesEvent extends MessageHandler {
@Override @Override
@ -9,6 +9,6 @@ public class FloorPlanEditorRequestBlockedTilesEvent extends MessageHandler {
if (this.client.getHabbo().getHabboInfo().getCurrentRoom() == null) if (this.client.getHabbo().getHabboInfo().getCurrentRoom() == null)
return; return;
this.client.sendResponse(new FloorPlanEditorBlockedTilesComposer(this.client.getHabbo().getHabboInfo().getCurrentRoom())); this.client.sendResponse(new RoomOccupiedTilesMessageComposer(this.client.getHabbo().getHabboInfo().getCurrentRoom()));
} }
} }

View File

@ -1,7 +1,7 @@
package com.eu.habbo.messages.incoming.floorplaneditor; package com.eu.habbo.messages.incoming.floorplaneditor;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.floorplaneditor.FloorPlanEditorDoorSettingsComposer; import com.eu.habbo.messages.outgoing.floorplaneditor.RoomEntryTileMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.RoomFloorThicknessUpdatedComposer; import com.eu.habbo.messages.outgoing.rooms.RoomFloorThicknessUpdatedComposer;
public class FloorPlanEditorRequestDoorSettingsEvent extends MessageHandler { public class FloorPlanEditorRequestDoorSettingsEvent extends MessageHandler {
@ -10,7 +10,7 @@ public class FloorPlanEditorRequestDoorSettingsEvent extends MessageHandler {
if (this.client.getHabbo().getHabboInfo().getCurrentRoom() == null) if (this.client.getHabbo().getHabboInfo().getCurrentRoom() == null)
return; return;
this.client.sendResponse(new FloorPlanEditorDoorSettingsComposer(this.client.getHabbo().getHabboInfo().getCurrentRoom())); this.client.sendResponse(new RoomEntryTileMessageComposer(this.client.getHabbo().getHabboInfo().getCurrentRoom()));
this.client.sendResponse(new RoomFloorThicknessUpdatedComposer(this.client.getHabbo().getHabboInfo().getCurrentRoom())); this.client.sendResponse(new RoomFloorThicknessUpdatedComposer(this.client.getHabbo().getHabboInfo().getCurrentRoom()));
} }
} }

View File

@ -9,7 +9,7 @@ import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer; 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.RoomForwardMessageComposer;
import gnu.trove.set.hash.THashSet; import gnu.trove.set.hash.THashSet;
import java.util.*; import java.util.*;
@ -173,7 +173,7 @@ public class FloorPlanEditorSaveEvent extends MessageHandler {
habbos.addAll(room.getHabbos()); habbos.addAll(room.getHabbos());
Emulator.getGameEnvironment().getRoomManager().unloadRoom(room); Emulator.getGameEnvironment().getRoomManager().unloadRoom(room);
room = Emulator.getGameEnvironment().getRoomManager().loadRoom(room.getId()); room = Emulator.getGameEnvironment().getRoomManager().loadRoom(room.getId());
ServerMessage message = new ForwardToRoomComposer(room.getId()).compose(); ServerMessage message = new RoomForwardMessageComposer(room.getId()).compose();
for (Habbo habbo : habbos) { for (Habbo habbo : habbos) {
habbo.getClient().sendResponse(message); habbo.getClient().sendResponse(message);
} }

View File

@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.rooms.RoomCategory; import com.eu.habbo.habbohotel.rooms.RoomCategory;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.friends.FindFriendsProcessResultComposer; import com.eu.habbo.messages.outgoing.friends.FindFriendsProcessResultComposer;
import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer; import com.eu.habbo.messages.outgoing.rooms.RoomForwardMessageComposer;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@ -23,7 +23,7 @@ public class FindNewFriendsEvent extends MessageHandler {
Room room = rooms.get(0); Room room = rooms.get(0);
if (room.getUserCount() > 0) { if (room.getUserCount() > 0) {
this.client.sendResponse(new ForwardToRoomComposer(room.getId())); this.client.sendResponse(new RoomForwardMessageComposer(room.getId()));
return; return;
} }
} }

View File

@ -7,8 +7,8 @@ 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.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.friends.FollowFriendFailedComposer; import com.eu.habbo.messages.outgoing.friends.FollowFriendFailedComposer;
import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer; import com.eu.habbo.messages.outgoing.rooms.RoomForwardMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserWhisperComposer; import com.eu.habbo.messages.outgoing.rooms.users.WhisperMessageComposer;
public class StalkFriendEvent extends MessageHandler { public class StalkFriendEvent extends MessageHandler {
@Override @Override
@ -40,9 +40,9 @@ public class StalkFriendEvent extends MessageHandler {
} }
if (habbo.getHabboInfo().getCurrentRoom() != this.client.getHabbo().getHabboInfo().getCurrentRoom()) { if (habbo.getHabboInfo().getCurrentRoom() != this.client.getHabbo().getHabboInfo().getCurrentRoom()) {
this.client.sendResponse(new ForwardToRoomComposer(habbo.getHabboInfo().getCurrentRoom().getId())); this.client.sendResponse(new RoomForwardMessageComposer(habbo.getHabboInfo().getCurrentRoom().getId()));
} else { } else {
this.client.sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(Emulator.getTexts().getValue("stalk.failed.same.room").replace("%user%", habbo.getHabboInfo().getUsername()), this.client.getHabbo(), this.client.getHabbo(), RoomChatMessageBubbles.ALERT))); this.client.sendResponse(new WhisperMessageComposer(new RoomChatMessage(Emulator.getTexts().getValue("stalk.failed.same.room").replace("%user%", habbo.getHabboInfo().getUsername()), this.client.getHabbo(), this.client.getHabbo(), RoomChatMessageBubbles.ALERT)));
} }
} }
} }

View File

@ -1,11 +1,11 @@
package com.eu.habbo.messages.incoming.gamecenter; package com.eu.habbo.messages.incoming.gamecenter;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.gamecenter.basejump.BaseJumpUnloadGameComposer; import com.eu.habbo.messages.outgoing.gamecenter.basejump.UnloadGameMessageComposer;
public class GameCenterLeaveGameEvent extends MessageHandler { public class GameCenterLeaveGameEvent extends MessageHandler {
@Override @Override
public void handle() throws Exception { public void handle() throws Exception {
this.client.sendResponse(new BaseJumpUnloadGameComposer()); this.client.sendResponse(new UnloadGameMessageComposer());
} }
} }

View File

@ -11,7 +11,7 @@ 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.NotificationDialogMessageComposer; 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.UpdateMessageMessageComposer;
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer; import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
@ -59,7 +59,7 @@ public class GuildForumModerateMessageEvent extends MessageHandler {
comment.setState(ForumThreadState.fromValue(state)); comment.setState(ForumThreadState.fromValue(state));
comment.setAdminId(this.client.getHabbo().getHabboInfo().getId()); comment.setAdminId(this.client.getHabbo().getHabboInfo().getId());
this.client.sendResponse(new PostUpdateMessageComposer(guild.getId(), thread.getThreadId(), comment)); this.client.sendResponse(new UpdateMessageMessageComposer(guild.getId(), thread.getThreadId(), comment));
Emulator.getThreading().run(comment); Emulator.getThreading().run(comment);

View File

@ -11,7 +11,7 @@ import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer; 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.UpdateThreadMessageComposer;
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer; import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
public class GuildForumThreadUpdateEvent extends MessageHandler { public class GuildForumThreadUpdateEvent extends MessageHandler {
@ -60,7 +60,7 @@ public class GuildForumThreadUpdateEvent extends MessageHandler {
thread.run(); thread.run();
this.client.sendResponse(new ThreadUpdatedMessageComposer(guild, thread, this.client.getHabbo(), isPinned, isLocked)); this.client.sendResponse(new UpdateThreadMessageComposer(guild, thread, this.client.getHabbo(), isPinned, isLocked));
if (pinChanged) { if (pinChanged) {
this.client.sendResponse(new GuildForumThreadsComposer(guild, 0)); this.client.sendResponse(new GuildForumThreadsComposer(guild, 0));

View File

@ -9,8 +9,8 @@ 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.guilds.forums.ThreadMessagesMessageComposer;
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumCommentsComposer; import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
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;
@ -35,11 +35,12 @@ public class GuildForumThreadsMessagesEvent extends MessageHandler {
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, this.client.getHabbo().getHabboInfo().getId()); GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, this.client.getHabbo().getHabboInfo().getId());
boolean isGuildAdministrator = (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || member.getRank().equals(GuildRank.ADMIN)); boolean isGuildAdministrator = (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || member.getRank().equals(GuildRank.ADMIN));
if (thread.getState() != ForumThreadState.HIDDEN_BY_GUILD_ADMIN || hasStaffPermissions || isGuildAdministrator) { if (thread.getState() != ForumThreadState.HIDDEN_BY_GUILD_ADMIN || hasStaffPermissions || isGuildAdministrator) {
this.client.sendResponse(new GuildForumCommentsComposer(guildId, threadId, index, thread.getComments(limit, index))); this.client.sendResponse(new GuildForumCommentsComposer(guildId, threadId, index, thread.getComments(limit, index)));
this.client.sendResponse(new GuildForumDataComposer(guild, this.client.getHabbo())); this.client.sendResponse(new ThreadMessagesMessageComposer(guild, this.client.getHabbo()));
}
else { } else {
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_ACCESS_DENIED.key).compose()); this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_ACCESS_DENIED.key).compose());
} }
} }

View File

@ -2,7 +2,7 @@ package com.eu.habbo.messages.incoming.handshake;
import com.eu.habbo.messages.NoAuthMessage; import com.eu.habbo.messages.NoAuthMessage;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.handshake.MachineIDComposer; import com.eu.habbo.messages.outgoing.handshake.UniqueMachineIDComposer;
import com.eu.habbo.util.HexUtils; import com.eu.habbo.util.HexUtils;
@NoAuthMessage @NoAuthMessage
@ -19,7 +19,7 @@ public class MachineIDEvent extends MessageHandler {
// Update stored machine id if it doesn't match our requirements. // Update stored machine id if it doesn't match our requirements.
if (storedMachineId.startsWith("~") || storedMachineId.length() != HASH_LENGTH) { if (storedMachineId.startsWith("~") || storedMachineId.length() != HASH_LENGTH) {
storedMachineId = HexUtils.getRandom(HASH_LENGTH); storedMachineId = HexUtils.getRandom(HASH_LENGTH);
this.client.sendResponse(new MachineIDComposer(storedMachineId)); this.client.sendResponse(new UniqueMachineIDComposer(storedMachineId));
} }
this.client.setMachineId(storedMachineId); this.client.setMachineId(storedMachineId);

View File

@ -33,7 +33,7 @@ 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;
import com.eu.habbo.messages.outgoing.modtool.ModeratorInitMessageComposer; import com.eu.habbo.messages.outgoing.modtool.ModeratorInitMessageComposer;
import com.eu.habbo.messages.outgoing.modtool.ModToolSanctionInfoComposer; import com.eu.habbo.messages.outgoing.modtool.SanctionStatusComposer;
import com.eu.habbo.messages.outgoing.navigator.*; import com.eu.habbo.messages.outgoing.navigator.*;
import com.eu.habbo.messages.outgoing.unknown.BuildersClubSubscriptionStatusMessageComposer; import com.eu.habbo.messages.outgoing.unknown.BuildersClubSubscriptionStatusMessageComposer;
import com.eu.habbo.messages.outgoing.mysterybox.MysteryBoxKeysMessageComposer; import com.eu.habbo.messages.outgoing.mysterybox.MysteryBoxKeysMessageComposer;
@ -204,7 +204,7 @@ public class SecureLoginEvent extends MessageHandler {
messages.add(new AvatarEffectsMessageComposer(habbo, this.client.getHabbo().getInventory().getEffectsComponent().effects.values()).compose()); messages.add(new AvatarEffectsMessageComposer(habbo, this.client.getHabbo().getInventory().getEffectsComponent().effects.values()).compose());
messages.add(new FigureSetIdsComposer(this.client.getHabbo()).compose()); messages.add(new FigureSetIdsComposer(this.client.getHabbo()).compose());
messages.add(new NoobnessLevelMessageComposer(habbo).compose()); messages.add(new NoobnessLevelMessageComposer(habbo).compose());
messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose()); messages.add(new UserRightsMessageComposer(this.client.getHabbo()).compose());
messages.add(new AvailabilityStatusMessageComposer(true, false, true).compose()); messages.add(new AvailabilityStatusMessageComposer(true, false, true).compose());
messages.add(new PingMessageComposer().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());
@ -218,7 +218,7 @@ public class SecureLoginEvent extends MessageHandler {
messages.add(new Game2AccountGameStatusMessageComposer(3, 100).compose()); messages.add(new Game2AccountGameStatusMessageComposer(3, 100).compose());
messages.add(new Game2AccountGameStatusMessageComposer(0, 100).compose()); messages.add(new Game2AccountGameStatusMessageComposer(0, 100).compose());
messages.add(new UserClubComposer(this.client.getHabbo(), SubscriptionHabboClub.HABBO_CLUB, UserClubComposer.RESPONSE_TYPE_LOGIN).compose()); messages.add(new ScrSendUserInfoComposer(this.client.getHabbo(), SubscriptionHabboClub.HABBO_CLUB, ScrSendUserInfoComposer.RESPONSE_TYPE_LOGIN).compose());
if (this.client.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL)) { if (this.client.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL)) {
messages.add(new ModeratorInitMessageComposer(this.client.getHabbo()).compose()); messages.add(new ModeratorInitMessageComposer(this.client.getHabbo()).compose());
@ -260,7 +260,7 @@ public class SecureLoginEvent extends MessageHandler {
ModToolSanctionItem item = modToolSanctionItems.get(modToolSanctionItems.size() - 1); ModToolSanctionItem item = modToolSanctionItems.get(modToolSanctionItems.size() - 1);
if (item.sanctionLevel > 0 && item.probationTimestamp != 0 && item.probationTimestamp > Emulator.getIntUnixTimestamp()) { if (item.sanctionLevel > 0 && item.probationTimestamp != 0 && item.probationTimestamp > Emulator.getIntUnixTimestamp()) {
this.client.sendResponse(new ModToolSanctionInfoComposer(this.client.getHabbo())); this.client.sendResponse(new SanctionStatusComposer(this.client.getHabbo()));
} else if (item.sanctionLevel > 0 && item.probationTimestamp != 0 && item.probationTimestamp <= Emulator.getIntUnixTimestamp()) { } else if (item.sanctionLevel > 0 && item.probationTimestamp != 0 && item.probationTimestamp <= Emulator.getIntUnixTimestamp()) {
modToolSanctions.updateSanction(item.id, 0); modToolSanctions.updateSanction(item.id, 0);
} }

View File

@ -1,12 +1,12 @@
package com.eu.habbo.messages.incoming.helper; package com.eu.habbo.messages.incoming.helper;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.modtool.ModToolSanctionInfoComposer; import com.eu.habbo.messages.outgoing.modtool.SanctionStatusComposer;
public class MySanctionStatusEvent extends MessageHandler { public class MySanctionStatusEvent extends MessageHandler {
@Override @Override
public void handle() throws Exception { public void handle() throws Exception {
this.client.sendResponse(new ModToolSanctionInfoComposer(this.client.getHabbo())); this.client.sendResponse(new SanctionStatusComposer(this.client.getHabbo()));
} }
} }

View File

@ -3,13 +3,13 @@ package com.eu.habbo.messages.incoming.helper;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.achievements.TalentTrackType; import com.eu.habbo.habbohotel.achievements.TalentTrackType;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.achievements.talenttrack.TalentTrackComposer; import com.eu.habbo.messages.outgoing.achievements.talenttrack.TalentTrackMessageComposer;
public class RequestTalentTrackEvent extends MessageHandler { public class RequestTalentTrackEvent extends MessageHandler {
@Override @Override
public void handle() throws Exception { public void handle() throws Exception {
if (Emulator.getConfig().getBoolean("hotel.talenttrack.enabled")) { if (Emulator.getConfig().getBoolean("hotel.talenttrack.enabled")) {
this.client.sendResponse(new TalentTrackComposer(this.client.getHabbo(), TalentTrackType.valueOf(this.packet.readString().toUpperCase()))); this.client.sendResponse(new TalentTrackMessageComposer(this.client.getHabbo(), TalentTrackType.valueOf(this.packet.readString().toUpperCase())));
} }
} }
} }

View File

@ -2,7 +2,7 @@ package com.eu.habbo.messages.incoming.hotelview;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.hotelview.HotelViewSecondsUntilComposer; import com.eu.habbo.messages.outgoing.hotelview.SecondsUntilMessageComposer;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -15,6 +15,6 @@ public class HotelViewRequestSecondsUntilEvent extends MessageHandler {
String date = this.packet.readString(); String date = this.packet.readString();
int secondsUntil = Math.max(0, (int) (dateFormat.parse(date).getTime() / 1000) - Emulator.getIntUnixTimestamp()); int secondsUntil = Math.max(0, (int) (dateFormat.parse(date).getTime() / 1000) - Emulator.getIntUnixTimestamp());
this.client.sendResponse(new HotelViewSecondsUntilComposer(date, secondsUntil)); this.client.sendResponse(new SecondsUntilMessageComposer(date, secondsUntil));
} }
} }

View File

@ -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.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.modtool.ModToolRoomChatlogComposer; import com.eu.habbo.messages.outgoing.modtool.RoomChatlogComposer;
public class ModToolRequestRoomChatlogEvent extends MessageHandler { public class ModToolRequestRoomChatlogEvent extends MessageHandler {
@Override @Override
@ -15,7 +15,7 @@ public class ModToolRequestRoomChatlogEvent extends MessageHandler {
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(this.packet.readInt()); Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(this.packet.readInt());
if (room != null) if (room != null)
this.client.sendResponse(new ModToolRoomChatlogComposer(room, Emulator.getGameEnvironment().getModToolManager().getRoomChatlog(room.getId()))); this.client.sendResponse(new RoomChatlogComposer(room, Emulator.getGameEnvironment().getModToolManager().getRoomChatlog(room.getId())));
} else { } else {
ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.modtools.chatlog").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername())); ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.modtools.chatlog").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()));
} }

View File

@ -6,7 +6,7 @@ import com.eu.habbo.habbohotel.permissions.Permission;
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.modtool.ModToolRoomChatlogComposer; import com.eu.habbo.messages.outgoing.modtool.RoomChatlogComposer;
public class ModToolRequestRoomUserChatlogEvent extends MessageHandler { public class ModToolRequestRoomUserChatlogEvent extends MessageHandler {
@Override @Override
@ -20,7 +20,7 @@ public class ModToolRequestRoomUserChatlogEvent extends MessageHandler {
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom(); Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
if (room != null) { if (room != null) {
this.client.sendResponse(new ModToolRoomChatlogComposer(room, Emulator.getGameEnvironment().getModToolManager().getRoomChatlog(room.getId()))); this.client.sendResponse(new RoomChatlogComposer(room, Emulator.getGameEnvironment().getModToolManager().getRoomChatlog(room.getId())));
} }
} }
} else { } else {

View File

@ -2,10 +2,9 @@ package com.eu.habbo.messages.incoming.modtool;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
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.HabboInfo; import com.eu.habbo.habbohotel.users.HabboInfo;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.modtool.ModToolUserRoomVisitsComposer; import com.eu.habbo.messages.outgoing.modtool.RoomVisitsComposer;
public class ModToolRequestRoomVisitsEvent extends MessageHandler { public class ModToolRequestRoomVisitsEvent extends MessageHandler {
@Override @Override
@ -16,7 +15,7 @@ public class ModToolRequestRoomVisitsEvent extends MessageHandler {
HabboInfo habboInfo = Emulator.getGameEnvironment().getHabboManager().getHabboInfo(userId); HabboInfo habboInfo = Emulator.getGameEnvironment().getHabboManager().getHabboInfo(userId);
if (habboInfo != null) { if (habboInfo != null) {
this.client.sendResponse(new ModToolUserRoomVisitsComposer(habboInfo, Emulator.getGameEnvironment().getModToolManager().getUserRoomVisits(userId))); this.client.sendResponse(new RoomVisitsComposer(habboInfo, Emulator.getGameEnvironment().getModToolManager().getUserRoomVisits(userId)));
} }
} }
} }

View File

@ -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.HabboManager; import com.eu.habbo.habbohotel.users.HabboManager;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.modtool.ModToolUserChatlogComposer; import com.eu.habbo.messages.outgoing.modtool.UserChatlogComposer;
public class ModToolRequestUserChatlogEvent extends MessageHandler { public class ModToolRequestUserChatlogEvent extends MessageHandler {
@Override @Override
@ -14,7 +14,7 @@ public class ModToolRequestUserChatlogEvent extends MessageHandler {
int userId = this.packet.readInt(); int userId = this.packet.readInt();
String username = HabboManager.getOfflineHabboInfo(userId).getUsername(); String username = HabboManager.getOfflineHabboInfo(userId).getUsername();
this.client.sendResponse(new ModToolUserChatlogComposer(Emulator.getGameEnvironment().getModToolManager().getUserRoomVisitsAndChatlogs(userId), userId, username)); this.client.sendResponse(new UserChatlogComposer(Emulator.getGameEnvironment().getModToolManager().getUserRoomVisitsAndChatlogs(userId), userId, username));
} else { } else {
ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.chatlog").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername())); ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.chatlog").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()));
} }

View File

@ -3,7 +3,7 @@ package com.eu.habbo.messages.incoming.navigator;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
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.ForwardToRoomComposer; import com.eu.habbo.messages.outgoing.rooms.RoomForwardMessageComposer;
import com.eu.habbo.messages.outgoing.users.NavigatorSettingsComposer; import com.eu.habbo.messages.outgoing.users.NavigatorSettingsComposer;
import java.util.ArrayList; import java.util.ArrayList;
@ -18,10 +18,10 @@ public class NewNavigatorActionEvent extends MessageHandler {
ArrayList<Room> rooms = Emulator.getGameEnvironment().getRoomManager().getActiveRooms(); ArrayList<Room> rooms = Emulator.getGameEnvironment().getRoomManager().getActiveRooms();
if (!rooms.isEmpty()) { if (!rooms.isEmpty()) {
Collections.shuffle(rooms); Collections.shuffle(rooms);
this.client.sendResponse(new ForwardToRoomComposer(rooms.get(0).getId())); this.client.sendResponse(new RoomForwardMessageComposer(rooms.get(0).getId()));
} }
} else if (data.equalsIgnoreCase("predefined_noob_lobby")) { } else if (data.equalsIgnoreCase("predefined_noob_lobby")) {
this.client.sendResponse(new ForwardToRoomComposer(Emulator.getConfig().getInt("hotel.room.nooblobby"))); this.client.sendResponse(new RoomForwardMessageComposer(Emulator.getConfig().getInt("hotel.room.nooblobby")));
} else { } else {
this.client.sendResponse(new NavigatorSettingsComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom())); this.client.sendResponse(new NavigatorSettingsComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()));
} }

View File

@ -11,6 +11,6 @@ public class RequestNewNavigatorDataEvent extends MessageHandler {
this.client.sendResponse(new NavigatorLiftedRoomsComposer()); this.client.sendResponse(new NavigatorLiftedRoomsComposer());
this.client.sendResponse(new CollapsedCategoriesComposer()); this.client.sendResponse(new CollapsedCategoriesComposer());
this.client.sendResponse(new NavigatorSavedSearchesComposer(this.client.getHabbo().getHabboInfo().getSavedSearches())); this.client.sendResponse(new NavigatorSavedSearchesComposer(this.client.getHabbo().getHabboInfo().getSavedSearches()));
this.client.sendResponse(new NewNavigatorEventCategoriesComposer()); this.client.sendResponse(new UserEventCatsComposer());
} }
} }

View File

@ -3,7 +3,7 @@ package com.eu.habbo.messages.incoming.navigator;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.rooms.RoomCategory; import com.eu.habbo.habbohotel.rooms.RoomCategory;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.navigator.RoomCategoriesComposer; import com.eu.habbo.messages.outgoing.navigator.UserFlatCatsComposer;
import java.util.List; import java.util.List;
@ -11,7 +11,7 @@ public class RequestRoomCategoriesEvent extends MessageHandler {
@Override @Override
public void handle() throws Exception { public void handle() throws Exception {
List<RoomCategory> roomCategoryList = Emulator.getGameEnvironment().getRoomManager().roomCategoriesForHabbo(this.client.getHabbo()); List<RoomCategory> roomCategoryList = Emulator.getGameEnvironment().getRoomManager().roomCategoriesForHabbo(this.client.getHabbo());
this.client.sendResponse(new RoomCategoriesComposer(roomCategoryList)); this.client.sendResponse(new UserFlatCatsComposer(roomCategoryList));
//this.client.sendResponse(new NewNavigatorEventCategoriesComposer()); //this.client.sendResponse(new NewNavigatorEventCategoriesComposer());
} }
} }

View File

@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.polls.Poll;
import com.eu.habbo.habbohotel.users.HabboBadge; import com.eu.habbo.habbohotel.users.HabboBadge;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer; import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
import com.eu.habbo.messages.outgoing.wired.WiredRewardAlertComposer; import com.eu.habbo.messages.outgoing.wired.WiredRewardResultMessageComposer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -57,9 +57,9 @@ public class AnswerPollEvent extends MessageHandler {
Emulator.getThreading().run(badge); Emulator.getThreading().run(badge);
this.client.getHabbo().getInventory().getBadgesComponent().addBadge(badge); this.client.getHabbo().getInventory().getBadgesComponent().addBadge(badge);
this.client.sendResponse(new BadgeReceivedComposer(badge)); this.client.sendResponse(new BadgeReceivedComposer(badge));
this.client.sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_RECEIVED_BADGE)); this.client.sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_RECEIVED_BADGE));
} else { } else {
this.client.sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_ALREADY_RECEIVED)); this.client.sendResponse(new WiredRewardResultMessageComposer(WiredRewardResultMessageComposer.REWARD_ALREADY_RECEIVED));
} }
} }
} }

View File

@ -1,10 +1,9 @@
package com.eu.habbo.messages.incoming.rooms; package com.eu.habbo.messages.incoming.rooms;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.achievements.AchievementManager;
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.RoomSettingsComposer; import com.eu.habbo.messages.outgoing.rooms.RoomSettingsDataComposer;
public class RequestRoomSettingsEvent extends MessageHandler { public class RequestRoomSettingsEvent extends MessageHandler {
@Override @Override
@ -14,6 +13,6 @@ public class RequestRoomSettingsEvent extends MessageHandler {
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(roomId); Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(roomId);
if (room != null) if (room != null)
this.client.sendResponse(new RoomSettingsComposer(room)); this.client.sendResponse(new RoomSettingsDataComposer(room));
} }
} }

View File

@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.achievements.AchievementManager; import com.eu.habbo.habbohotel.achievements.AchievementManager;
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.RoomFilterWordsComposer; import com.eu.habbo.messages.outgoing.rooms.RoomFilterSettingsMessageComposer;
public class RequestRoomWordFilterEvent extends MessageHandler { public class RequestRoomWordFilterEvent extends MessageHandler {
@Override @Override
@ -12,7 +12,7 @@ public class RequestRoomWordFilterEvent extends MessageHandler {
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(this.packet.readInt()); Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(this.packet.readInt());
if (room != null && room.hasRights(this.client.getHabbo())) { if (room != null && room.hasRights(this.client.getHabbo())) {
this.client.sendResponse(new RoomFilterWordsComposer(room)); this.client.sendResponse(new RoomFilterSettingsMessageComposer(room));
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("SelfModRoomFilterSeen")); AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("SelfModRoomFilterSeen"));
} }

View File

@ -7,7 +7,7 @@ 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.inventory.FurniListRemoveComposer; import com.eu.habbo.messages.outgoing.inventory.FurniListRemoveComposer;
import com.eu.habbo.messages.outgoing.rooms.RoomPaintComposer; import com.eu.habbo.messages.outgoing.rooms.RoomPropertyMessageComposer;
public class RoomPlacePaintEvent extends MessageHandler { public class RoomPlacePaintEvent extends MessageHandler {
@Override @Override
@ -43,7 +43,7 @@ public class RoomPlacePaintEvent extends MessageHandler {
this.client.getHabbo().getInventory().getItemsComponent().removeHabboItem(item); this.client.getHabbo().getInventory().getItemsComponent().removeHabboItem(item);
room.setNeedsUpdate(true); room.setNeedsUpdate(true);
room.sendComposer(new RoomPaintComposer(item.getBaseItem().getName(), item.getExtradata()).compose()); room.sendComposer(new RoomPropertyMessageComposer(item.getBaseItem().getName(), item.getExtradata()).compose());
item.needsDelete(true); item.needsDelete(true);
Emulator.getThreading().run(item); Emulator.getThreading().run(item);
this.client.sendResponse(new FurniListRemoveComposer(itemId)); this.client.sendResponse(new FurniListRemoveComposer(itemId));

View File

@ -6,7 +6,7 @@ import com.eu.habbo.habbohotel.rooms.RoomRightLevels;
import com.eu.habbo.habbohotel.rooms.RoomUnitStatus; import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.rooms.RoomRightsComposer; import com.eu.habbo.messages.outgoing.rooms.YouAreControllerMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.users.NoSuchFlatComposer; import com.eu.habbo.messages.outgoing.rooms.users.NoSuchFlatComposer;
import gnu.trove.procedure.TIntProcedure; import gnu.trove.procedure.TIntProcedure;
@ -27,7 +27,7 @@ public class RoomRemoveAllRightsEvent extends MessageHandler {
if (habbo != null) { if (habbo != null) {
room.sendComposer(new NoSuchFlatComposer(room, value).compose()); room.sendComposer(new NoSuchFlatComposer(room, value).compose());
habbo.getRoomUnit().removeStatus(RoomUnitStatus.FLAT_CONTROL); habbo.getRoomUnit().removeStatus(RoomUnitStatus.FLAT_CONTROL);
habbo.getClient().sendResponse(new RoomRightsComposer(RoomRightLevels.NONE)); habbo.getClient().sendResponse(new YouAreControllerMessageComposer(RoomRightLevels.NONE));
} }
return true; return true;

View File

@ -24,12 +24,12 @@ public class RoomSettingsSaveEvent extends MessageHandler {
String name = this.packet.readString(); String name = this.packet.readString();
if (name.trim().isEmpty() || name.length() > 60) { if (name.trim().isEmpty() || name.length() > 60) {
this.client.sendResponse(new RoomEditSettingsErrorComposer(room.getId(), RoomEditSettingsErrorComposer.ROOM_NAME_MISSING, "")); this.client.sendResponse(new RoomSettingsSaveErrorComposer(room.getId(), RoomSettingsSaveErrorComposer.ROOM_NAME_MISSING, ""));
return; return;
} }
if (!Emulator.getGameEnvironment().getWordFilter().filter(name, this.client.getHabbo()).equals(name)) { if (!Emulator.getGameEnvironment().getWordFilter().filter(name, this.client.getHabbo()).equals(name)) {
this.client.sendResponse(new RoomEditSettingsErrorComposer(room.getId(), RoomEditSettingsErrorComposer.ROOM_NAME_BADWORDS, "")); this.client.sendResponse(new RoomSettingsSaveErrorComposer(room.getId(), RoomSettingsSaveErrorComposer.ROOM_NAME_BADWORDS, ""));
return; return;
} }
@ -40,7 +40,7 @@ public class RoomSettingsSaveEvent extends MessageHandler {
} }
if (!Emulator.getGameEnvironment().getWordFilter().filter(description, this.client.getHabbo()).equals(description)) { if (!Emulator.getGameEnvironment().getWordFilter().filter(description, this.client.getHabbo()).equals(description)) {
this.client.sendResponse(new RoomEditSettingsErrorComposer(room.getId(), RoomEditSettingsErrorComposer.ROOM_DESCRIPTION_BADWORDS, "")); this.client.sendResponse(new RoomSettingsSaveErrorComposer(room.getId(), RoomSettingsSaveErrorComposer.ROOM_DESCRIPTION_BADWORDS, ""));
return; return;
} }
@ -48,7 +48,7 @@ public class RoomSettingsSaveEvent extends MessageHandler {
String password = this.packet.readString(); String password = this.packet.readString();
if (state == RoomState.PASSWORD && password.isEmpty() && (room.getPassword() == null || room.getPassword().isEmpty())) { if (state == RoomState.PASSWORD && password.isEmpty() && (room.getPassword() == null || room.getPassword().isEmpty())) {
this.client.sendResponse(new RoomEditSettingsErrorComposer(room.getId(), RoomEditSettingsErrorComposer.PASSWORD_REQUIRED, "")); this.client.sendResponse(new RoomSettingsSaveErrorComposer(room.getId(), RoomSettingsSaveErrorComposer.PASSWORD_REQUIRED, ""));
return; return;
} }
@ -60,14 +60,14 @@ public class RoomSettingsSaveEvent extends MessageHandler {
String tag = this.packet.readString(); String tag = this.packet.readString();
if (tag.length() > 15) { if (tag.length() > 15) {
this.client.sendResponse(new RoomEditSettingsErrorComposer(room.getId(), RoomEditSettingsErrorComposer.TAGS_TOO_LONG, "")); this.client.sendResponse(new RoomSettingsSaveErrorComposer(room.getId(), RoomSettingsSaveErrorComposer.TAGS_TOO_LONG, ""));
return; return;
} }
tags.append(tag).append(";"); tags.append(tag).append(";");
} }
if (!Emulator.getGameEnvironment().getWordFilter().filter(tags.toString(), this.client.getHabbo()).equals(tags.toString())) { if (!Emulator.getGameEnvironment().getWordFilter().filter(tags.toString(), this.client.getHabbo()).equals(tags.toString())) {
this.client.sendResponse(new RoomEditSettingsErrorComposer(room.getId(), RoomEditSettingsErrorComposer.ROOM_TAGS_BADWWORDS, "")); this.client.sendResponse(new RoomSettingsSaveErrorComposer(room.getId(), RoomSettingsSaveErrorComposer.ROOM_TAGS_BADWWORDS, ""));
return; return;
} }
@ -75,7 +75,7 @@ public class RoomSettingsSaveEvent extends MessageHandler {
if (tags.length() > 0) { if (tags.length() > 0) {
for (String s : Emulator.getConfig().getValue("hotel.room.tags.staff").split(";")) { for (String s : Emulator.getConfig().getValue("hotel.room.tags.staff").split(";")) {
if (tags.toString().contains(s)) { if (tags.toString().contains(s)) {
this.client.sendResponse(new RoomEditSettingsErrorComposer(room.getId(), RoomEditSettingsErrorComposer.RESTRICTED_TAGS, "1")); this.client.sendResponse(new RoomSettingsSaveErrorComposer(room.getId(), RoomSettingsSaveErrorComposer.RESTRICTED_TAGS, "1"));
return; return;
} }
} }
@ -124,9 +124,9 @@ public class RoomSettingsSaveEvent extends MessageHandler {
room.setChatProtection(this.packet.readInt()); room.setChatProtection(this.packet.readInt());
room.setNeedsUpdate(true); room.setNeedsUpdate(true);
room.sendComposer(new RoomThicknessComposer(room).compose()); room.sendComposer(new RoomVisualizationSettingsComposer(room).compose());
room.sendComposer(new RoomChatSettingsComposer(room).compose()); room.sendComposer(new RoomChatSettingsMessageComposer(room).compose());
room.sendComposer(new RoomSettingsUpdatedComposer(room).compose()); room.sendComposer(new RoomInfoUpdatedComposer(room).compose());
this.client.sendResponse(new RoomSettingsSavedComposer(room)); this.client.sendResponse(new RoomSettingsSavedComposer(room));
//TODO Find packet for update room name. //TODO Find packet for update room name.
} }

View File

@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.users.DanceType;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.generic.alerts.BotErrorComposer; import com.eu.habbo.messages.outgoing.generic.alerts.BotErrorComposer;
import com.eu.habbo.messages.outgoing.rooms.users.DanceMessageComposer; import com.eu.habbo.messages.outgoing.rooms.users.DanceMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserNameChangedComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserNameChangedMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersComposer; import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersComposer;
import com.eu.habbo.plugin.events.bots.BotSavedChatEvent; import com.eu.habbo.plugin.events.bots.BotSavedChatEvent;
import com.eu.habbo.plugin.events.bots.BotSavedLookEvent; import com.eu.habbo.plugin.events.bots.BotSavedLookEvent;
@ -143,7 +143,7 @@ public class BotSaveSettingsEvent extends MessageHandler {
bot.setName(nameEvent.name); bot.setName(nameEvent.name);
bot.needsUpdate(true); bot.needsUpdate(true);
room.sendComposer(new RoomUserNameChangedComposer(bot.getRoomUnit().getId(), bot.getRoomUnit().getId(), nameEvent.name).compose()); room.sendComposer(new UserNameChangedMessageComposer(bot.getRoomUnit().getId(), bot.getRoomUnit().getId(), nameEvent.name).compose());
} }
} }

View File

@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.rooms.RoomMoodlightData;
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.rooms.items.MoodLightDataComposer; import com.eu.habbo.messages.outgoing.rooms.items.RoomDimmerPresetsComposer;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -59,6 +59,6 @@ public class MoodLightSaveSettingsEvent extends MessageHandler {
} }
room.setNeedsUpdate(true); room.setNeedsUpdate(true);
this.client.sendResponse(new MoodLightDataComposer(room.getMoodlightData())); this.client.sendResponse(new RoomDimmerPresetsComposer(room.getMoodlightData()));
} }
} }

View File

@ -1,12 +1,12 @@
package com.eu.habbo.messages.incoming.rooms.items; package com.eu.habbo.messages.incoming.rooms.items;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.rooms.items.MoodLightDataComposer; import com.eu.habbo.messages.outgoing.rooms.items.RoomDimmerPresetsComposer;
public class MoodLightSettingsEvent extends MessageHandler { public class MoodLightSettingsEvent extends MessageHandler {
@Override @Override
public void handle() throws Exception { public void handle() throws Exception {
if (this.client.getHabbo().getHabboInfo().getCurrentRoom() != null) if (this.client.getHabbo().getHabboInfo().getCurrentRoom() != null)
this.client.sendResponse(new MoodLightDataComposer(this.client.getHabbo().getHabboInfo().getCurrentRoom().getMoodlightData())); this.client.sendResponse(new RoomDimmerPresetsComposer(this.client.getHabbo().getHabboInfo().getCurrentRoom().getMoodlightData()));
} }
} }

View File

@ -10,7 +10,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.OpenPetPackageRequestedMessageComposer; 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.UserUpdateComposer;
import com.eu.habbo.plugin.Event; import com.eu.habbo.plugin.Event;
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;
@ -111,7 +111,7 @@ public class ToggleFloorItemEvent extends MessageHandler {
room.updateTile(room.getLayout().getTile(item.getX(), item.getY())); room.updateTile(room.getLayout().getTile(item.getX(), item.getY()));
room.placePet(pet, item.getX(), item.getY(), item.getZ(), item.getRotation()); room.placePet(pet, item.getX(), item.getY(), item.getZ(), item.getRotation());
pet.cycle(); pet.cycle();
room.sendComposer(new RoomUserStatusComposer(pet.getRoomUnit()).compose()); room.sendComposer(new UserUpdateComposer(pet.getRoomUnit()).compose());
return; return;
} }

View File

@ -2,7 +2,7 @@ package com.eu.habbo.messages.incoming.rooms.items.jukebox;
import com.eu.habbo.habbohotel.rooms.TraxManager; import com.eu.habbo.habbohotel.rooms.TraxManager;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeBoxMySongsComposer; import com.eu.habbo.messages.outgoing.rooms.items.jukebox.UserSongDisksInventoryMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeboxSongDisksMessageComposer; import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeboxSongDisksMessageComposer;
public class JukeBoxEventOne extends MessageHandler { public class JukeBoxEventOne extends MessageHandler {
@ -10,7 +10,7 @@ public class JukeBoxEventOne extends MessageHandler {
public void handle() throws Exception { public void handle() throws Exception {
TraxManager traxManager = this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager(); TraxManager traxManager = this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager();
this.client.sendResponse(new JukeboxSongDisksMessageComposer(traxManager.getSongs(), traxManager.totalLength())); this.client.sendResponse(new JukeboxSongDisksMessageComposer(traxManager.getSongs(), traxManager.totalLength()));
this.client.sendResponse(new JukeBoxMySongsComposer(traxManager.myList(this.client.getHabbo()))); this.client.sendResponse(new UserSongDisksInventoryMessageComposer(traxManager.myList(this.client.getHabbo())));
this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager().updateCurrentPlayingSong(this.client.getHabbo()); this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager().updateCurrentPlayingSong(this.client.getHabbo());
} }
} }

View File

@ -2,7 +2,7 @@ package com.eu.habbo.messages.incoming.rooms.items.jukebox;
import com.eu.habbo.habbohotel.rooms.TraxManager; import com.eu.habbo.habbohotel.rooms.TraxManager;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeBoxMySongsComposer; import com.eu.habbo.messages.outgoing.rooms.items.jukebox.UserSongDisksInventoryMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeboxSongDisksMessageComposer; import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeboxSongDisksMessageComposer;
public class JukeBoxEventTwo extends MessageHandler { public class JukeBoxEventTwo extends MessageHandler {
@ -10,7 +10,7 @@ public class JukeBoxEventTwo extends MessageHandler {
public void handle() throws Exception { public void handle() throws Exception {
TraxManager traxManager = this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager(); TraxManager traxManager = this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager();
this.client.sendResponse(new JukeboxSongDisksMessageComposer(traxManager.getSongs(), traxManager.totalLength())); this.client.sendResponse(new JukeboxSongDisksMessageComposer(traxManager.getSongs(), traxManager.totalLength()));
this.client.sendResponse(new JukeBoxMySongsComposer(traxManager.myList(this.client.getHabbo()))); this.client.sendResponse(new UserSongDisksInventoryMessageComposer(traxManager.myList(this.client.getHabbo())));
this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager().updateCurrentPlayingSong(this.client.getHabbo()); this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager().updateCurrentPlayingSong(this.client.getHabbo());
} }
} }

View File

@ -2,7 +2,7 @@ package com.eu.habbo.messages.incoming.rooms.items.jukebox;
import com.eu.habbo.habbohotel.rooms.TraxManager; import com.eu.habbo.habbohotel.rooms.TraxManager;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeBoxMySongsComposer; import com.eu.habbo.messages.outgoing.rooms.items.jukebox.UserSongDisksInventoryMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeboxSongDisksMessageComposer; import com.eu.habbo.messages.outgoing.rooms.items.jukebox.JukeboxSongDisksMessageComposer;
public class JukeBoxRequestPlayListEvent extends MessageHandler { public class JukeBoxRequestPlayListEvent extends MessageHandler {
@ -10,7 +10,7 @@ public class JukeBoxRequestPlayListEvent extends MessageHandler {
public void handle() throws Exception { public void handle() throws Exception {
TraxManager traxManager = this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager(); TraxManager traxManager = this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager();
this.client.sendResponse(new JukeboxSongDisksMessageComposer(traxManager.getSongs(), traxManager.totalLength())); this.client.sendResponse(new JukeboxSongDisksMessageComposer(traxManager.getSongs(), traxManager.totalLength()));
this.client.sendResponse(new JukeBoxMySongsComposer(traxManager.myList(this.client.getHabbo()))); this.client.sendResponse(new UserSongDisksInventoryMessageComposer(traxManager.myList(this.client.getHabbo())));
this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager().updateCurrentPlayingSong(this.client.getHabbo()); this.client.getHabbo().getHabboInfo().getCurrentRoom().getTraxManager().updateCurrentPlayingSong(this.client.getHabbo());
} }
} }

View File

@ -8,7 +8,7 @@ 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.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.youtube.YoutubeVideoComposer; import com.eu.habbo.messages.outgoing.rooms.items.youtube.YoutubeDisplayVideoMessageComposer;
import com.eu.habbo.threading.runnables.YoutubeAdvanceVideo; import com.eu.habbo.threading.runnables.YoutubeAdvanceVideo;
import java.util.Optional; import java.util.Optional;
@ -46,7 +46,7 @@ public class YoutubeRequestPlaylistChange extends MessageHandler {
((InteractionYoutubeTV) item).cancelAdvancement(); ((InteractionYoutubeTV) item).cancelAdvancement();
room.updateItem(item); room.updateItem(item);
room.sendComposer(new YoutubeVideoComposer(itemId, video, true, 0).compose()); room.sendComposer(new YoutubeDisplayVideoMessageComposer(itemId, video, true, 0).compose());
((InteractionYoutubeTV) item).autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo((InteractionYoutubeTV) item), video.getDuration() * 1000); ((InteractionYoutubeTV) item).autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo((InteractionYoutubeTV) item), video.getDuration() * 1000);
item.needsUpdate(true); item.needsUpdate(true);

View File

@ -6,7 +6,7 @@ import com.eu.habbo.habbohotel.items.interactions.InteractionYoutubeTV;
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.handshake.ErrorReportComposer; import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
import com.eu.habbo.messages.outgoing.rooms.items.youtube.YoutubeDisplayListComposer; import com.eu.habbo.messages.outgoing.rooms.items.youtube.YoutubeDisplayPlaylistsComposer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -33,7 +33,7 @@ public class YoutubeRequestPlaylists extends MessageHandler {
return; return;
} }
this.client.sendResponse(new YoutubeDisplayListComposer(itemId, playlists, tv.currentPlaylist)); this.client.sendResponse(new YoutubeDisplayPlaylistsComposer(itemId, playlists, tv.currentPlaylist));
} }
} }
} }

View File

@ -7,8 +7,8 @@ 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.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.youtube.YoutubeStateChangeComposer; import com.eu.habbo.messages.outgoing.rooms.items.youtube.YoutubeControlVideoMessageComposer;
import com.eu.habbo.messages.outgoing.rooms.items.youtube.YoutubeVideoComposer; import com.eu.habbo.messages.outgoing.rooms.items.youtube.YoutubeDisplayVideoMessageComposer;
import com.eu.habbo.threading.runnables.YoutubeAdvanceVideo; import com.eu.habbo.threading.runnables.YoutubeAdvanceVideo;
public class YoutubeRequestStateChange extends MessageHandler { public class YoutubeRequestStateChange extends MessageHandler {
@ -75,13 +75,13 @@ public class YoutubeRequestStateChange extends MessageHandler {
tv.playing = false; tv.playing = false;
tv.offset += Emulator.getIntUnixTimestamp() - tv.startedWatchingAt; tv.offset += Emulator.getIntUnixTimestamp() - tv.startedWatchingAt;
if (tv.autoAdvance != null) tv.autoAdvance.cancel(true); if (tv.autoAdvance != null) tv.autoAdvance.cancel(true);
room.sendComposer(new YoutubeStateChangeComposer(tv.getId(), 2).compose()); room.sendComposer(new YoutubeControlVideoMessageComposer(tv.getId(), 2).compose());
break; break;
case RESUME: case RESUME:
tv.playing = true; tv.playing = true;
tv.startedWatchingAt = Emulator.getIntUnixTimestamp(); tv.startedWatchingAt = Emulator.getIntUnixTimestamp();
tv.autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo(tv), (tv.currentVideo.getDuration() - tv.offset) * 1000); tv.autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo(tv), (tv.currentVideo.getDuration() - tv.offset) * 1000);
room.sendComposer(new YoutubeStateChangeComposer(tv.getId(), 1).compose()); room.sendComposer(new YoutubeControlVideoMessageComposer(tv.getId(), 1).compose());
break; break;
case PREVIOUS: case PREVIOUS:
int previousIndex = tv.currentPlaylist.getVideos().indexOf(tv.currentVideo) - 1; int previousIndex = tv.currentPlaylist.getVideos().indexOf(tv.currentVideo) - 1;
@ -96,7 +96,7 @@ public class YoutubeRequestStateChange extends MessageHandler {
} }
if (state == YoutubeState.PREVIOUS || state == YoutubeState.NEXT) { if (state == YoutubeState.PREVIOUS || state == YoutubeState.NEXT) {
room.sendComposer(new YoutubeVideoComposer(tv.getId(), tv.currentVideo, true, 0).compose()); room.sendComposer(new YoutubeDisplayVideoMessageComposer(tv.getId(), tv.currentVideo, true, 0).compose());
tv.cancelAdvancement(); tv.cancelAdvancement();
tv.autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo(tv), tv.currentVideo.getDuration() * 1000); tv.autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo(tv), tv.currentVideo.getDuration() * 1000);

View File

@ -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.inventory.AddHabboItemComposer; import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer; import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
import com.eu.habbo.messages.outgoing.rooms.pets.PetFigureUpdateComposer; import com.eu.habbo.messages.outgoing.rooms.pets.PetFigureUpdateComposer;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -62,7 +62,7 @@ public class HorseRemoveSaddleEvent extends MessageHandler {
this.client.getHabbo().getInventory().getItemsComponent().addItem(saddle); this.client.getHabbo().getInventory().getItemsComponent().addItem(saddle);
this.client.sendResponse(new AddHabboItemComposer(saddle)); this.client.sendResponse(new UnseenItemsComposer(saddle));
this.client.sendResponse(new FurniListInvalidateComposer()); this.client.sendResponse(new FurniListInvalidateComposer());
} }
} }

View File

@ -5,7 +5,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.rooms.RoomUserRotation; import com.eu.habbo.habbohotel.rooms.RoomUserRotation;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer; import com.eu.habbo.messages.outgoing.rooms.users.UserUpdateComposer;
public class MovePetEvent extends MessageHandler { public class MovePetEvent extends MessageHandler {
@Override @Override
@ -27,7 +27,7 @@ public class MovePetEvent extends MessageHandler {
pet.getRoomUnit().setZ(tile.z); pet.getRoomUnit().setZ(tile.z);
pet.getRoomUnit().setRotation(RoomUserRotation.fromValue(this.packet.readInt())); pet.getRoomUnit().setRotation(RoomUserRotation.fromValue(this.packet.readInt()));
pet.getRoomUnit().setPreviousLocationZ(pet.getRoomUnit().getZ()); pet.getRoomUnit().setPreviousLocationZ(pet.getRoomUnit().getZ());
room.sendComposer(new RoomUserStatusComposer(pet.getRoomUnit()).compose()); room.sendComposer(new UserUpdateComposer(pet.getRoomUnit()).compose());
pet.needsUpdate = true; pet.needsUpdate = true;
} }
} }

Some files were not shown because too many files have changed in this diff Show More