mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Yet another refactoring commit pt3
This commit is contained in:
parent
88e294dd65
commit
bf23a4be67
@ -809,7 +809,7 @@ public class CatalogManager {
|
||||
Item cBaseItem = null;
|
||||
|
||||
if (item == null || habbo.getHabboStats().isPurchasingFurniture) {
|
||||
habbo.getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
habbo.getClient().sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -817,12 +817,12 @@ public class CatalogManager {
|
||||
|
||||
try {
|
||||
if (item.isClubOnly() && !habbo.getClient().getHabbo().getHabboStats().hasActiveClub()) {
|
||||
habbo.getClient().sendResponse(new AlertPurchaseUnavailableComposer(AlertPurchaseUnavailableComposer.REQUIRES_CLUB));
|
||||
habbo.getClient().sendResponse(new PurchaseNotAllowedMessageComposer(PurchaseNotAllowedMessageComposer.REQUIRES_CLUB));
|
||||
return;
|
||||
}
|
||||
|
||||
if (amount <= 0) {
|
||||
habbo.getClient().sendResponse(new AlertPurchaseUnavailableComposer(AlertPurchaseUnavailableComposer.ILLEGAL));
|
||||
habbo.getClient().sendResponse(new PurchaseNotAllowedMessageComposer(PurchaseNotAllowedMessageComposer.ILLEGAL));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -858,7 +858,7 @@ public class CatalogManager {
|
||||
} else {
|
||||
if (amount * item.getAmount() > 100) {
|
||||
habbo.alert("Whoops! You tried to buy this " + (amount * item.getAmount()) + " times. This must've been a mistake.");
|
||||
habbo.getClient().sendResponse(new AlertPurchaseUnavailableComposer(AlertPurchaseUnavailableComposer.ILLEGAL));
|
||||
habbo.getClient().sendResponse(new PurchaseNotAllowedMessageComposer(PurchaseNotAllowedMessageComposer.ILLEGAL));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -871,7 +871,7 @@ public class CatalogManager {
|
||||
String message = Emulator.getTexts().getValue("scripter.warning.catalog.amount").replace("%username%", habbo.getHabboInfo().getUsername()).replace("%itemname%", item.getName()).replace("%pagename%", page.getCaption());
|
||||
ScripterManager.scripterDetected(habbo.getClient(), message);
|
||||
LOGGER.info(message);
|
||||
habbo.getClient().sendResponse(new AlertPurchaseUnavailableComposer(AlertPurchaseUnavailableComposer.ILLEGAL));
|
||||
habbo.getClient().sendResponse(new PurchaseNotAllowedMessageComposer(PurchaseNotAllowedMessageComposer.ILLEGAL));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -947,7 +947,7 @@ public class CatalogManager {
|
||||
String[] data = extradata.split("\n");
|
||||
|
||||
if (data.length < 3) {
|
||||
habbo.getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
habbo.getClient().sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -956,11 +956,11 @@ public class CatalogManager {
|
||||
pet = Emulator.getGameEnvironment().getPetManager().createPet(baseItem, data[0], data[1], data[2], habbo.getClient());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Caught exception", e);
|
||||
habbo.getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
habbo.getClient().sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
}
|
||||
|
||||
if (pet == null) {
|
||||
habbo.getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
habbo.getClient().sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1015,7 +1015,7 @@ public class CatalogManager {
|
||||
guildId = Integer.parseInt(extradata);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Caught exception", e);
|
||||
habbo.getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
habbo.getClient().sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1040,7 +1040,7 @@ public class CatalogManager {
|
||||
SoundTrack track = Emulator.getGameEnvironment().getItemManager().getSoundTrack(item.getExtradata());
|
||||
|
||||
if (track == null) {
|
||||
habbo.getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
habbo.getClient().sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1061,7 +1061,7 @@ public class CatalogManager {
|
||||
}
|
||||
|
||||
if (badgeFound && item.getBaseItems().size() == 1) {
|
||||
habbo.getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.ALREADY_HAVE_BADGE));
|
||||
habbo.getClient().sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.ALREADY_HAVE_BADGE));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1115,7 +1115,7 @@ public class CatalogManager {
|
||||
|
||||
habbo.getClient().sendResponse(new AddHabboItemComposer(unseenItems));
|
||||
|
||||
habbo.getClient().sendResponse(new PurchaseOKComposer(purchasedEvent.catalogItem));
|
||||
habbo.getClient().sendResponse(new PurchaseOKMessageComposer(purchasedEvent.catalogItem));
|
||||
habbo.getClient().sendResponse(new FurniListInvalidateComposer());
|
||||
|
||||
THashSet<String> itemIds = new THashSet<>();
|
||||
@ -1140,7 +1140,7 @@ public class CatalogManager {
|
||||
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Exception caught", e);
|
||||
habbo.getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
habbo.getClient().sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
}
|
||||
} finally {
|
||||
habbo.getHabboStats().isPurchasingFurniture = false;
|
||||
|
@ -20,7 +20,7 @@ public class UpdateCatalogCommand extends Command {
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new BundleDiscountRulesetMessageComposer());
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new MarketplaceConfigurationComposer());
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new GiftWrappingConfigurationComposer());
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new RecyclerLogicComposer());
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new RecyclerPrizesComposer());
|
||||
Emulator.getGameEnvironment().getCraftingManager().reload();
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_update_catalog"), RoomChatMessageBubbles.ALERT);
|
||||
return true;
|
||||
|
@ -43,8 +43,8 @@ import com.eu.habbo.messages.outgoing.hotelview.CloseConnectionMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollAnswerComposer;
|
||||
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollStartComposer;
|
||||
import com.eu.habbo.messages.outgoing.polls.infobus.QuestionAnsweredComposer;
|
||||
import com.eu.habbo.messages.outgoing.polls.infobus.QuestionComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.*;
|
||||
import com.eu.habbo.messages.outgoing.rooms.items.*;
|
||||
import com.eu.habbo.messages.outgoing.rooms.pets.RoomPetComposer;
|
||||
@ -4404,7 +4404,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
this.yesVotes++;
|
||||
}
|
||||
|
||||
this.sendComposer(new SimplePollAnswerComposer(habbo.getHabboInfo().getId(), answer, this.noVotes, this.yesVotes).compose());
|
||||
this.sendComposer(new QuestionAnsweredComposer(habbo.getHabboInfo().getId(), answer, this.noVotes, this.yesVotes).compose());
|
||||
this.userVotes.add(habbo.getHabboInfo().getId());
|
||||
}
|
||||
}
|
||||
@ -4417,7 +4417,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
this.yesVotes = 0;
|
||||
this.userVotes.clear();
|
||||
this.wordQuizEnd = Emulator.getIntUnixTimestamp() + (duration / 1000);
|
||||
this.sendComposer(new SimplePollStartComposer(duration, question).compose());
|
||||
this.sendComposer(new QuestionComposer(duration, question).compose());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,8 +32,8 @@ import com.eu.habbo.messages.incoming.users.UserNuxEvent;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.GenericErrorComposer;
|
||||
import com.eu.habbo.messages.outgoing.hotelview.CloseConnectionMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.polls.PollOfferComposer;
|
||||
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollAnswersComposer;
|
||||
import com.eu.habbo.messages.outgoing.polls.infobus.SimplePollStartComposer;
|
||||
import com.eu.habbo.messages.outgoing.polls.infobus.QuestionFinishedComposer;
|
||||
import com.eu.habbo.messages.outgoing.polls.infobus.QuestionComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.*;
|
||||
import com.eu.habbo.messages.outgoing.rooms.items.ObjectsMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.items.ItemsComposer;
|
||||
@ -904,10 +904,10 @@ public class RoomManager {
|
||||
}
|
||||
|
||||
if (room.hasActiveWordQuiz()) {
|
||||
habbo.getClient().sendResponse(new SimplePollStartComposer((Emulator.getIntUnixTimestamp() - room.wordQuizEnd) * 1000, room.wordQuiz));
|
||||
habbo.getClient().sendResponse(new QuestionComposer((Emulator.getIntUnixTimestamp() - room.wordQuizEnd) * 1000, room.wordQuiz));
|
||||
|
||||
if (room.hasVotedInWordQuiz(habbo)) {
|
||||
habbo.getClient().sendResponse(new SimplePollAnswersComposer(room.noVotes, room.yesVotes));
|
||||
habbo.getClient().sendResponse(new QuestionFinishedComposer(room.noVotes, room.yesVotes));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ public class HabboManager {
|
||||
habbo.getClient().sendResponse(new BundleDiscountRulesetMessageComposer());
|
||||
habbo.getClient().sendResponse(new MarketplaceConfigurationComposer());
|
||||
habbo.getClient().sendResponse(new GiftWrappingConfigurationComposer());
|
||||
habbo.getClient().sendResponse(new RecyclerLogicComposer());
|
||||
habbo.getClient().sendResponse(new RecyclerPrizesComposer());
|
||||
habbo.alert(Emulator.getTexts().getValue("commands.generic.cmd_give_rank.new_rank").replace("id", newRank.getName()));
|
||||
} else {
|
||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE users SET `rank` = ? WHERE id = ? LIMIT 1")) {
|
||||
|
@ -18,7 +18,7 @@ import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||
@ -350,7 +350,7 @@ public class WiredHandler {
|
||||
if (item != null) {
|
||||
habbo.getClient().sendResponse(new AddHabboItemComposer(item));
|
||||
habbo.getClient().getHabbo().getInventory().getItemsComponent().addItem(item);
|
||||
habbo.getClient().sendResponse(new PurchaseOKComposer(null));
|
||||
habbo.getClient().sendResponse(new PurchaseOKMessageComposer(null));
|
||||
habbo.getClient().sendResponse(new FurniListInvalidateComposer());
|
||||
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_RECEIVED_ITEM));
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.subscriptions.Subscription;
|
||||
import com.eu.habbo.habbohotel.users.subscriptions.SubscriptionHabboClub;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.CreditBalanceComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.ActivityPointsMessageComposer;
|
||||
@ -63,7 +63,7 @@ public class CatalogBuyClubDiscountEvent extends MessageHandler {
|
||||
|
||||
|
||||
if(this.client.getHabbo().getHabboStats().createSubscription(Subscription.HABBO_CLUB, (totalDays * 86400)) == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
throw new Exception("Unable to create or extend subscription");
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ public class CatalogBuyClubDiscountEvent extends MessageHandler {
|
||||
if (totalDuckets > 0)
|
||||
this.client.sendResponse(new ActivityPointsMessageComposer(this.client.getHabbo()));
|
||||
|
||||
this.client.sendResponse(new PurchaseOKComposer(null));
|
||||
this.client.sendResponse(new PurchaseOKMessageComposer(null));
|
||||
this.client.sendResponse(new FurniListInvalidateComposer());
|
||||
|
||||
this.client.getHabbo().getHabboStats().run();
|
||||
|
@ -44,12 +44,12 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
this.client.getHabbo().getHabboStats().lastGiftTimestamp = Emulator.getIntUnixTimestamp();
|
||||
if (ShutdownEmulator.timestamp > 0) {
|
||||
this.client.sendResponse(new HotelWillCloseInMinutesComposer((ShutdownEmulator.timestamp - Emulator.getIntUnixTimestamp()) / 60));
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.client.getHabbo().getHabboStats().isPurchasingFurniture) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
} else {
|
||||
this.client.getHabbo().getHabboStats().isPurchasingFurniture = true;
|
||||
@ -71,12 +71,12 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
int userId = 0;
|
||||
|
||||
if (!Emulator.getGameEnvironment().getCatalogManager().giftWrappers.containsKey(spriteId) && !Emulator.getGameEnvironment().getCatalogManager().giftFurnis.containsKey(spriteId)) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GiftWrappingConfigurationComposer.BOX_TYPES.contains(color) || !GiftWrappingConfigurationComposer.RIBBON_TYPES.contains(ribbonId)) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
iItemId = Emulator.getGameEnvironment().getCatalogManager().giftFurnis.get(spriteId);
|
||||
|
||||
if (iItemId == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
giftItem = Emulator.getGameEnvironment().getItemManager().getItem((Integer) Emulator.getGameEnvironment().getCatalogManager().giftFurnis.values().toArray()[Emulator.getRandom().nextInt(Emulator.getGameEnvironment().getCatalogManager().giftFurnis.size())]);
|
||||
|
||||
if (giftItem == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -132,30 +132,30 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
CatalogPage page = Emulator.getGameEnvironment().getCatalogManager().catalogPages.get(pageId);
|
||||
|
||||
if (page == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
if (page.getRank() > this.client.getHabbo().getHabboInfo().getRank().getId() || !page.isEnabled() || !page.isVisible()) {
|
||||
this.client.sendResponse(new AlertPurchaseUnavailableComposer(AlertPurchaseUnavailableComposer.ILLEGAL));
|
||||
this.client.sendResponse(new PurchaseNotAllowedMessageComposer(PurchaseNotAllowedMessageComposer.ILLEGAL));
|
||||
return;
|
||||
}
|
||||
|
||||
CatalogItem item = page.getCatalogItem(itemId);
|
||||
|
||||
if (item == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.isClubOnly() && !this.client.getHabbo().getHabboStats().hasActiveClub()) {
|
||||
this.client.sendResponse(new AlertPurchaseUnavailableComposer(AlertPurchaseUnavailableComposer.REQUIRES_CLUB));
|
||||
this.client.sendResponse(new PurchaseNotAllowedMessageComposer(PurchaseNotAllowedMessageComposer.REQUIRES_CLUB));
|
||||
return;
|
||||
}
|
||||
|
||||
for (Item baseItem : item.getBaseItems()) {
|
||||
if (!baseItem.allowGift()) {
|
||||
this.client.sendResponse(new AlertPurchaseUnavailableComposer(AlertPurchaseUnavailableComposer.ILLEGAL));
|
||||
this.client.sendResponse(new PurchaseNotAllowedMessageComposer(PurchaseNotAllowedMessageComposer.ILLEGAL));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -172,7 +172,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
int totalPoints = item.getPoints();
|
||||
|
||||
if(totalCredits > this.client.getHabbo().getHabboInfo().getCredits() || totalPoints > this.client.getHabbo().getHabboInfo().getCurrencyAmount(item.getPointsType())) {
|
||||
this.client.sendResponse(new AlertPurchaseUnavailableComposer(AlertPurchaseUnavailableComposer.ILLEGAL));
|
||||
this.client.sendResponse(new PurchaseNotAllowedMessageComposer(PurchaseNotAllowedMessageComposer.ILLEGAL));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -225,18 +225,18 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
}
|
||||
|
||||
if (badgeFound) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.ALREADY_HAVE_BADGE));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.ALREADY_HAVE_BADGE));
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.getAmount() > 1 || item.getBaseItems().size() > 1) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
for (Item baseItem : item.getBaseItems()) {
|
||||
if (item.getItemAmount(baseItem.getId()) > 1) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -259,10 +259,10 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
badgeFound = true;
|
||||
}
|
||||
} else if (item.getName().startsWith("rentable_bot_")) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
} else if (Item.isPet(baseItem)) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
} else {
|
||||
if (baseItem.getInteractionType().getType() == InteractionTrophy.class || baseItem.getInteractionType().getType() == InteractionBadgeDisplay.class) {
|
||||
@ -295,7 +295,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
guildId = Integer.parseInt(extraData);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Caught exception", e);
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
Emulator.getThreading().run(habboItem);
|
||||
@ -307,7 +307,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new HabboBroadcastMessageComposer(Emulator.getTexts().getValue("error.catalog.buy.not_yet")));
|
||||
return;
|
||||
}
|
||||
@ -325,7 +325,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
HabboItem gift = Emulator.getGameEnvironment().getItemManager().createGift(username, giftItem, giftData.toString(), 0, 0);
|
||||
|
||||
if (gift == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -365,16 +365,16 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
this.client.sendResponse(new HabboActivityPointNotificationMessageComposer(this.client.getHabbo().getHabboInfo().getCurrencyAmount(item.getPointsType()), -totalPoints, item.getPointsType()));
|
||||
}
|
||||
|
||||
this.client.sendResponse(new PurchaseOKComposer(item));
|
||||
this.client.sendResponse(new PurchaseOKMessageComposer(item));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Exception caught", e);
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
}
|
||||
} finally {
|
||||
this.client.getHabbo().getHabboStats().isPurchasingFurniture = false;
|
||||
}
|
||||
} else {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||
import com.eu.habbo.habbohotel.users.HabboInventory;
|
||||
import com.eu.habbo.habbohotel.users.subscriptions.Subscription;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseUnavailableComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseNotAllowedMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer;
|
||||
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.HotelWillCloseInMinutesComposer;
|
||||
@ -48,12 +48,12 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
|
||||
try {
|
||||
if (this.client.getHabbo().getInventory().getItemsComponent().itemCount() > HabboInventory.MAXIMUM_ITEMS) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
this.client.getHabbo().alert(Emulator.getTexts().getValue("inventory.full"));
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
}
|
||||
|
||||
CatalogPage page = null;
|
||||
@ -93,7 +93,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
|
||||
CatalogItem roomBundleItem = item[0];
|
||||
if (roomBundleItem == null || roomBundleItem.getCredits() > this.client.getHabbo().getHabboInfo().getCredits() || roomBundleItem.getPoints() > this.client.getHabbo().getHabboInfo().getCurrencyAmount(roomBundleItem.getPointsType())) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
int roomCount = Emulator.getGameEnvironment().getRoomManager().getRoomsForHabbo(this.client.getHabbo()).size();
|
||||
@ -101,7 +101,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
|
||||
if (roomCount >= maxRooms) { // checks if a user has the maximum rooms
|
||||
this.client.sendResponse(new CanCreateRoomComposer(roomCount, maxRooms)); // if so throws the max room error.
|
||||
this.client.sendResponse(new PurchaseOKComposer(null)); // Send this so the alert disappears, not sure if this is how it should be handled :S
|
||||
this.client.sendResponse(new PurchaseOKMessageComposer(null)); // Send this so the alert disappears, not sure if this is how it should be handled :S
|
||||
return;
|
||||
}
|
||||
((RoomBundleLayout) page).buyRoom(this.client.getHabbo());
|
||||
@ -113,7 +113,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
this.client.getHabbo().getHabboInfo().addCurrencyAmount(roomBundleItem.getPointsType(), -roomBundleItem.getPoints()); // takes their points away
|
||||
this.client.sendResponse(new ActivityPointsMessageComposer(this.client.getHabbo())); // Sends the updated currency composer window
|
||||
}
|
||||
this.client.sendResponse(new PurchaseOKComposer()); // Sends the composer to close the window.
|
||||
this.client.sendResponse(new PurchaseOKMessageComposer()); // Sends the composer to close the window.
|
||||
|
||||
final boolean[] badgeFound = {false};
|
||||
item[0].getBaseItems().stream().filter(i -> i.getType() == FurnitureType.BADGE).forEach(i -> {
|
||||
@ -133,7 +133,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
});
|
||||
|
||||
if (badgeFound[0]) {
|
||||
this.client.getHabbo().getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.ALREADY_HAVE_BADGE));
|
||||
this.client.getHabbo().getClient().sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.ALREADY_HAVE_BADGE));
|
||||
}
|
||||
|
||||
return;
|
||||
@ -141,12 +141,12 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
}
|
||||
|
||||
if (page == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
if (page.getRank() > this.client.getHabbo().getHabboInfo().getRank().getId()) {
|
||||
this.client.sendResponse(new AlertPurchaseUnavailableComposer(AlertPurchaseUnavailableComposer.ILLEGAL));
|
||||
this.client.sendResponse(new PurchaseNotAllowedMessageComposer(PurchaseNotAllowedMessageComposer.ILLEGAL));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
ClubOffer item = Emulator.getGameEnvironment().getCatalogManager().clubOffers.get(itemId);
|
||||
|
||||
if (item == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
|
||||
|
||||
if(this.client.getHabbo().getHabboStats().createSubscription(Subscription.HABBO_CLUB, (totalDays * 86400)) == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
throw new Exception("Unable to create or extend subscription");
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
if (totalDuckets > 0)
|
||||
this.client.sendResponse(new ActivityPointsMessageComposer(this.client.getHabbo()));
|
||||
|
||||
this.client.sendResponse(new PurchaseOKComposer(null));
|
||||
this.client.sendResponse(new PurchaseOKMessageComposer(null));
|
||||
this.client.sendResponse(new FurniListInvalidateComposer());
|
||||
|
||||
this.client.getHabbo().getHabboStats().run();
|
||||
@ -236,7 +236,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
Emulator.getGameEnvironment().getCatalogManager().purchaseItem(page, item, this.client.getHabbo(), count, extraData, false);
|
||||
|
||||
} else {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR).compose());
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR).compose());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.catalog.CatalogItem;
|
||||
import com.eu.habbo.habbohotel.catalog.CatalogPage;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.CatalogSearchResultComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.ProductOfferComposer;
|
||||
import gnu.trove.iterator.TIntObjectIterator;
|
||||
|
||||
public class CatalogSearchedItemEvent extends MessageHandler {
|
||||
@ -26,7 +26,7 @@ public class CatalogSearchedItemEvent extends MessageHandler {
|
||||
CatalogItem item = iterator.value();
|
||||
|
||||
if (item.getOfferId() == offerId) {
|
||||
this.client.sendResponse(new CatalogSearchResultComposer(item));
|
||||
this.client.sendResponse(new ProductOfferComposer(item));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -23,13 +23,13 @@ public class CatalogSelectClubGiftEvent extends MessageHandler {
|
||||
|
||||
if(itemName.isEmpty()) {
|
||||
LOGGER.error("itemName is empty");
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.client.getHabbo().getHabboStats().getRemainingClubGifts() < 1) {
|
||||
LOGGER.error("User has no remaining club gifts");
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ public class CatalogSelectClubGiftEvent extends MessageHandler {
|
||||
|
||||
if(page == null) {
|
||||
LOGGER.error("Catalog page not found");
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ public class CatalogSelectClubGiftEvent extends MessageHandler {
|
||||
|
||||
if(catalogItem == null) {
|
||||
LOGGER.error("Catalog item not found");
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ public class CatalogSelectClubGiftEvent extends MessageHandler {
|
||||
|
||||
if(daysRequired > (int) Math.floor(this.client.getHabbo().getHabboStats().getPastTimeAsClub() / 86400.0)) {
|
||||
LOGGER.error("Not been member for long enough");
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.catalog.marketplace.MarketPlace;
|
||||
import com.eu.habbo.habbohotel.modtool.ScripterManager;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.marketplace.MarketplaceMakeOfferResult;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -31,7 +31,7 @@ public class SellItemEvent extends MessageHandler {
|
||||
String message = Emulator.getTexts().getValue("scripter.warning.marketplace.forbidden").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()).replace("%itemname%", item.getBaseItem().getName()).replace("%credits%", credits + "");
|
||||
ScripterManager.scripterDetected(this.client, message);
|
||||
LOGGER.info(message);
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ public class SellItemEvent extends MessageHandler {
|
||||
String message = Emulator.getTexts().getValue("scripter.warning.marketplace.negative").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()).replace("%itemname%", item.getBaseItem().getName()).replace("%credits%", credits + "");
|
||||
ScripterManager.scripterDetected(this.client, message);
|
||||
LOGGER.info(message);
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.HeightMapUpdateMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.items.PresentItemOpenedComposer;
|
||||
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.users.RoomUserWhisperComposer;
|
||||
import com.eu.habbo.threading.runnables.OpenGift;
|
||||
@ -46,7 +46,7 @@ public class OpenRecycleBoxEvent extends MessageHandler {
|
||||
this.client.sendResponse(new AddHabboItemComposer(reward));
|
||||
this.client.sendResponse(new FurniListInvalidateComposer());
|
||||
|
||||
this.client.sendResponse(new PresentItemOpenedComposer(reward, item.getExtradata(), true));
|
||||
this.client.sendResponse(new PresentOpenedMessageComposer(reward, item.getExtradata(), true));
|
||||
}
|
||||
}
|
||||
room.sendComposer(new RemoveFloorItemComposer(item).compose());
|
||||
|
@ -5,8 +5,8 @@ import com.eu.habbo.habbohotel.achievements.AchievementManager;
|
||||
import com.eu.habbo.habbohotel.items.ItemManager;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.RecyclerCompleteComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.RecyclerFinishedComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.HotelWillCloseInMinutesComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||
@ -47,24 +47,24 @@ public class RecycleEvent extends MessageHandler {
|
||||
Emulator.getThreading().run(new QueryDeleteHabboItem(item.getId()));
|
||||
}
|
||||
} else {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
HabboItem reward = Emulator.getGameEnvironment().getItemManager().handleRecycle(this.client.getHabbo(), Emulator.getGameEnvironment().getCatalogManager().getRandomRecyclerPrize().getId() + "");
|
||||
if (reward == null) {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
this.client.sendResponse(new AddHabboItemComposer(reward));
|
||||
this.client.getHabbo().getInventory().getItemsComponent().addItem(reward);
|
||||
this.client.sendResponse(new RecyclerCompleteComposer(RecyclerCompleteComposer.RECYCLING_COMPLETE));
|
||||
this.client.sendResponse(new RecyclerFinishedComposer(RecyclerFinishedComposer.RECYCLING_COMPLETE));
|
||||
this.client.sendResponse(new FurniListInvalidateComposer());
|
||||
|
||||
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("FurnimaticQuest"));
|
||||
} else {
|
||||
this.client.sendResponse(new RecyclerCompleteComposer(RecyclerCompleteComposer.RECYCLING_CLOSED));
|
||||
this.client.sendResponse(new RecyclerFinishedComposer(RecyclerFinishedComposer.RECYCLING_CLOSED));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.eu.habbo.messages.incoming.catalog.recycler;
|
||||
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.RecyclerLogicComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.RecyclerPrizesComposer;
|
||||
|
||||
public class RequestRecyclerLogicEvent extends MessageHandler {
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
this.client.sendResponse(new RecyclerLogicComposer());
|
||||
this.client.sendResponse(new RecyclerPrizesComposer());
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.guilds.GuildCreatedMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.guilds.GuildEditFailedMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
||||
@ -37,7 +37,7 @@ public class RequestGuildBuyEvent extends MessageHandler {
|
||||
if (this.client.getHabbo().getHabboInfo().getCredits() >= guildPrice) {
|
||||
this.client.getHabbo().giveCredits(-guildPrice);
|
||||
} else {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -96,7 +96,7 @@ public class RequestGuildBuyEvent extends MessageHandler {
|
||||
Emulator.getBadgeImager().generate(guild);
|
||||
}
|
||||
|
||||
this.client.sendResponse(new PurchaseOKComposer());
|
||||
this.client.sendResponse(new PurchaseOKMessageComposer());
|
||||
this.client.sendResponse(new GuildCreatedMessageComposer(guild));
|
||||
for (Habbo habbo : r.getHabbos()) {
|
||||
habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, null));
|
||||
|
@ -10,7 +10,7 @@ import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadMessagesComposer;
|
||||
import com.eu.habbo.messages.outgoing.guilds.forums.PostThreadMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadsComposer;
|
||||
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
|
||||
|
||||
@ -59,7 +59,7 @@ public class GuildForumModerateThreadEvent extends MessageHandler {
|
||||
break;
|
||||
}
|
||||
|
||||
this.client.sendResponse(new GuildForumThreadMessagesComposer(thread));
|
||||
this.client.sendResponse(new PostThreadMessageComposer(thread));
|
||||
this.client.sendResponse(new GuildForumThreadsComposer(guild, 0));
|
||||
}
|
||||
}
|
@ -8,8 +8,8 @@ import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadComment;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumAddCommentComposer;
|
||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadMessagesComposer;
|
||||
import com.eu.habbo.messages.outgoing.guilds.forums.PostMessageMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.guilds.forums.PostThreadMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.handshake.ErrorReportComposer;
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ public class GuildForumPostThreadEvent extends MessageHandler {
|
||||
|
||||
this.client.getHabbo().getHabboStats().forumPostsCount += 1;
|
||||
thread.setPostsCount(thread.getPostsCount() + 1);
|
||||
this.client.sendResponse(new GuildForumThreadMessagesComposer(thread));
|
||||
this.client.sendResponse(new PostThreadMessageComposer(thread));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ public class GuildForumPostThreadEvent extends MessageHandler {
|
||||
thread.setUpdatedAt(Emulator.getIntUnixTimestamp());
|
||||
this.client.getHabbo().getHabboStats().forumPostsCount += 1;
|
||||
thread.setPostsCount(thread.getPostsCount() + 1);
|
||||
this.client.sendResponse(new GuildForumAddCommentComposer(comment));
|
||||
this.client.sendResponse(new PostMessageMessageComposer(comment));
|
||||
} else {
|
||||
this.client.sendResponse(new ErrorReportComposer(500));
|
||||
}
|
||||
|
@ -4,13 +4,13 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.hotelview.CommunityGoalHallOfFameMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.hotelview.CurrentTimingCodeMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.hotelview.NewsListComposer;
|
||||
import com.eu.habbo.messages.outgoing.hotelview.PromoArticlesMessageComposer;
|
||||
|
||||
public class RequestNewsListEvent extends MessageHandler {
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
this.client.sendResponse(new CurrentTimingCodeMessageComposer("2013-05-08 13:0", "gamesmaker"));
|
||||
this.client.sendResponse(new CommunityGoalHallOfFameMessageComposer(Emulator.getGameEnvironment().getHotelViewManager().getHallOfFame()));
|
||||
this.client.sendResponse(new NewsListComposer());
|
||||
this.client.sendResponse(new PromoArticlesMessageComposer());
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,11 @@ package com.eu.habbo.messages.incoming.navigator;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.navigator.TagsComposer;
|
||||
import com.eu.habbo.messages.outgoing.navigator.PopularRoomTagsResultComposer;
|
||||
|
||||
public class RequestTagsEvent extends MessageHandler {
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
this.client.sendResponse(new TagsComposer(Emulator.getGameEnvironment().getRoomManager().getTags()));
|
||||
this.client.sendResponse(new PopularRoomTagsResultComposer(Emulator.getGameEnvironment().getRoomManager().getTags()));
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.HeightMapUpdateMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.pets.PerkAllowancesComposer;
|
||||
@ -65,7 +65,7 @@ public class PetPackageNameEvent extends MessageHandler {
|
||||
room.sendComposer(new HeightMapUpdateMessageComposer(tile.x, tile.y, tile.z, tile.relativeHeight()).compose());
|
||||
item.setUserId(0);
|
||||
} else {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
}
|
||||
} else {
|
||||
this.client.sendResponse(new PerkAllowancesComposer(itemId, PerkAllowancesComposer.CONTAINS_INVALID_CHARS, name.replaceAll("^[a-zA-Z0-9]*$", "")));
|
||||
|
@ -7,8 +7,8 @@ import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomRightLevels;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.navigator.NewNavigatorEventCategoriesComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.promotions.RoomPromotionMessageComposer;
|
||||
|
||||
@ -57,14 +57,14 @@ public class BuyRoomPromotionEvent extends MessageHandler {
|
||||
this.client.getHabbo().givePoints(item.getPointsType(), -item.getPoints());
|
||||
}
|
||||
|
||||
this.client.sendResponse(new PurchaseOKComposer());
|
||||
this.client.sendResponse(new PurchaseOKMessageComposer());
|
||||
room.sendComposer(new RoomPromotionMessageComposer(room, room.getPromotion()).compose());
|
||||
|
||||
if (!this.client.getHabbo().getInventory().getBadgesComponent().hasBadge(BuyRoomPromotionEvent.ROOM_PROMOTION_BADGE)) {
|
||||
this.client.getHabbo().addBadge(BuyRoomPromotionEvent.ROOM_PROMOTION_BADGE);
|
||||
}
|
||||
} else {
|
||||
this.client.sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.SERVER_ERROR));
|
||||
this.client.sendResponse(new PurchaseErrorMessageComposer(PurchaseErrorMessageComposer.SERVER_ERROR));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class CatalogSearchResultComposer extends MessageComposer {
|
||||
public class ProductOfferComposer extends MessageComposer {
|
||||
private final CatalogItem item;
|
||||
|
||||
public CatalogSearchResultComposer(CatalogItem item) {
|
||||
public ProductOfferComposer(CatalogItem item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
@ -4,13 +4,13 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class AlertPurchaseFailedComposer extends MessageComposer {
|
||||
public class PurchaseErrorMessageComposer extends MessageComposer {
|
||||
public static final int SERVER_ERROR = 0;
|
||||
public static final int ALREADY_HAVE_BADGE = 1;
|
||||
|
||||
private final int error;
|
||||
|
||||
public AlertPurchaseFailedComposer(int error) {
|
||||
public PurchaseErrorMessageComposer(int error) {
|
||||
this.error = error;
|
||||
}
|
||||
|
@ -4,13 +4,13 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class AlertPurchaseUnavailableComposer extends MessageComposer {
|
||||
public class PurchaseNotAllowedMessageComposer extends MessageComposer {
|
||||
public final static int ILLEGAL = 0;
|
||||
public final static int REQUIRES_CLUB = 1;
|
||||
|
||||
private final int code;
|
||||
|
||||
public AlertPurchaseUnavailableComposer(int code) {
|
||||
public PurchaseNotAllowedMessageComposer(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
@ -5,14 +5,14 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class PurchaseOKComposer extends MessageComposer {
|
||||
public class PurchaseOKMessageComposer extends MessageComposer {
|
||||
private final CatalogItem catalogItem;
|
||||
|
||||
public PurchaseOKComposer(CatalogItem catalogItem) {
|
||||
public PurchaseOKMessageComposer(CatalogItem catalogItem) {
|
||||
this.catalogItem = catalogItem;
|
||||
}
|
||||
|
||||
public PurchaseOKComposer() {
|
||||
public PurchaseOKMessageComposer() {
|
||||
this.catalogItem = null;
|
||||
}
|
||||
|
@ -4,13 +4,13 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class RecyclerCompleteComposer extends MessageComposer {
|
||||
public class RecyclerFinishedComposer extends MessageComposer {
|
||||
public static final int RECYCLING_COMPLETE = 1;
|
||||
public static final int RECYCLING_CLOSED = 2;
|
||||
|
||||
private final int code;
|
||||
|
||||
public RecyclerCompleteComposer(int code) {
|
||||
public RecyclerFinishedComposer(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import gnu.trove.set.hash.THashSet;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class RecyclerLogicComposer extends MessageComposer {
|
||||
public class RecyclerPrizesComposer extends MessageComposer {
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.RecyclerPrizesComposer);
|
@ -5,10 +5,10 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class GuildForumAddCommentComposer extends MessageComposer {
|
||||
public class PostMessageMessageComposer extends MessageComposer {
|
||||
private final ForumThreadComment comment;
|
||||
|
||||
public GuildForumAddCommentComposer(ForumThreadComment comment) {
|
||||
public PostMessageMessageComposer(ForumThreadComment comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class GuildForumThreadMessagesComposer extends MessageComposer {
|
||||
public class PostThreadMessageComposer extends MessageComposer {
|
||||
public final ForumThread thread;
|
||||
|
||||
public GuildForumThreadMessagesComposer(ForumThread thread) {
|
||||
public PostThreadMessageComposer(ForumThread thread) {
|
||||
this.thread = thread;
|
||||
}
|
||||
|
@ -4,11 +4,11 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class HabboWayQuizComposer2 extends MessageComposer {
|
||||
public class QuizDataMessageComposer extends MessageComposer {
|
||||
public final String name;
|
||||
public final int[] items;
|
||||
|
||||
public HabboWayQuizComposer2(String name, int[] items) {
|
||||
public QuizDataMessageComposer(String name, int[] items) {
|
||||
this.name = name;
|
||||
this.items = items;
|
||||
}
|
@ -7,7 +7,7 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class NewsListComposer extends MessageComposer {
|
||||
public class PromoArticlesMessageComposer extends MessageComposer {
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.PromoArticlesMessageComposer);
|
@ -6,10 +6,10 @@ import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class TagsComposer extends MessageComposer {
|
||||
public class PopularRoomTagsResultComposer extends MessageComposer {
|
||||
private final Set<String> tags;
|
||||
|
||||
public TagsComposer(Set<String> tags) {
|
||||
public PopularRoomTagsResultComposer(Set<String> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
@ -4,13 +4,13 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class SimplePollAnswerComposer extends MessageComposer {
|
||||
public class QuestionAnsweredComposer extends MessageComposer {
|
||||
private final int userId;
|
||||
private final String choice;
|
||||
private final int no;
|
||||
private final int yes;
|
||||
|
||||
public SimplePollAnswerComposer(int userId, String choice, int no, int yes) {
|
||||
public QuestionAnsweredComposer(int userId, String choice, int no, int yes) {
|
||||
this.userId = userId;
|
||||
this.choice = choice;
|
||||
this.no = no;
|
@ -4,11 +4,11 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class SimplePollStartComposer extends MessageComposer {
|
||||
public class QuestionComposer extends MessageComposer {
|
||||
public final int duration;
|
||||
public final String question;
|
||||
|
||||
public SimplePollStartComposer(int duration, String question) {
|
||||
public QuestionComposer(int duration, String question) {
|
||||
this.duration = duration;
|
||||
this.question = question;
|
||||
}
|
@ -4,11 +4,11 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class SimplePollAnswersComposer extends MessageComposer {
|
||||
public class QuestionFinishedComposer extends MessageComposer {
|
||||
private final int no;
|
||||
private final int yes;
|
||||
|
||||
public SimplePollAnswersComposer(int no, int yes) {
|
||||
public QuestionFinishedComposer(int no, int yes) {
|
||||
this.no = no;
|
||||
this.yes = yes;
|
||||
}
|
@ -4,10 +4,10 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class QuestExpiredComposer extends MessageComposer {
|
||||
public class QuestCancelledMessageComposer extends MessageComposer {
|
||||
private final boolean expired;
|
||||
|
||||
public QuestExpiredComposer(boolean expired) {
|
||||
public QuestCancelledMessageComposer(boolean expired) {
|
||||
this.expired = expired;
|
||||
}
|
||||
|
@ -5,11 +5,11 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class QuestCompletedComposer extends MessageComposer {
|
||||
public class QuestCompletedMessageComposer extends MessageComposer {
|
||||
private final UnknownClass unknownClass;
|
||||
private final boolean unknowbOolean;
|
||||
|
||||
public QuestCompletedComposer(UnknownClass unknownClass, boolean unknowbOolean) {
|
||||
public QuestCompletedMessageComposer(UnknownClass unknownClass, boolean unknowbOolean) {
|
||||
this.unknownClass = unknownClass;
|
||||
this.unknowbOolean = unknowbOolean;
|
||||
}
|
@ -4,10 +4,10 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class QuestComposer extends MessageComposer {
|
||||
private final QuestsComposer.Quest quest;
|
||||
public class QuestMessageComposer extends MessageComposer {
|
||||
private final QuestsMessageComposer.Quest quest;
|
||||
|
||||
public QuestComposer(QuestsComposer.Quest quest) {
|
||||
public QuestMessageComposer(QuestsMessageComposer.Quest quest) {
|
||||
this.quest = quest;
|
||||
}
|
||||
|
@ -7,11 +7,11 @@ import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class QuestsComposer extends MessageComposer {
|
||||
public class QuestsMessageComposer extends MessageComposer {
|
||||
private final List<Quest> quests;
|
||||
private final boolean unknownBoolean;
|
||||
|
||||
public QuestsComposer(List<Quest> quests, boolean unknownBoolean) {
|
||||
public QuestsMessageComposer(List<Quest> quests, boolean unknownBoolean) {
|
||||
this.quests = quests;
|
||||
this.unknownBoolean = unknownBoolean;
|
||||
}
|
@ -5,12 +5,12 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class PresentItemOpenedComposer extends MessageComposer {
|
||||
public class PresentOpenedMessageComposer extends MessageComposer {
|
||||
private final HabboItem item;
|
||||
private final String text;
|
||||
private final boolean unknown;
|
||||
|
||||
public PresentItemOpenedComposer(HabboItem item, String text, boolean unknown) {
|
||||
public PresentOpenedMessageComposer(HabboItem item, String text, boolean unknown) {
|
||||
this.item = item;
|
||||
this.text = text;
|
||||
this.unknown = unknown;
|
@ -5,11 +5,11 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class UnknownFurniModelComposer extends MessageComposer {
|
||||
public class PostItPlacedComposer extends MessageComposer {
|
||||
private final HabboItem item;
|
||||
private final int unknownInt;
|
||||
|
||||
public UnknownFurniModelComposer(HabboItem item, int unknownInt) {
|
||||
public PostItPlacedComposer(HabboItem item, int unknownInt) {
|
||||
this.item = item;
|
||||
this.unknownInt = unknownInt;
|
||||
}
|
@ -6,11 +6,11 @@ import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UnknownHabboWayQuizComposer extends MessageComposer {
|
||||
public class QuizResultsMessageComposer extends MessageComposer {
|
||||
private final String unknownString;
|
||||
private final List<Integer> unknownIntegerList;
|
||||
|
||||
public UnknownHabboWayQuizComposer(String unknownString, List<Integer> unknownIntegerList) {
|
||||
public QuizResultsMessageComposer(String unknownString, List<Integer> unknownIntegerList) {
|
||||
this.unknownString = unknownString;
|
||||
this.unknownIntegerList = unknownIntegerList;
|
||||
}
|
@ -19,7 +19,7 @@ public class UpdateCatalog extends RCONMessage<UpdateCatalog.JSONUpdateCatalog>
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new BundleDiscountRulesetMessageComposer());
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new MarketplaceConfigurationComposer());
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new GiftWrappingConfigurationComposer());
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new RecyclerLogicComposer());
|
||||
Emulator.getGameServer().getGameClientManager().sendBroadcastResponse(new RecyclerPrizesComposer());
|
||||
Emulator.getGameEnvironment().getCraftingManager().reload();
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.FurniListInvalidateComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.FurniListAddOrUpdateComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.items.PresentItemOpenedComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.items.PresentOpenedMessageComposer;
|
||||
import gnu.trove.set.hash.THashSet;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -101,7 +101,7 @@ public class OpenGift implements Runnable {
|
||||
|
||||
if (inside != null) {
|
||||
this.habbo.getClient().sendResponse(new FurniListAddOrUpdateComposer(inside));
|
||||
this.habbo.getClient().sendResponse(new PresentItemOpenedComposer(inside, "", false));
|
||||
this.habbo.getClient().sendResponse(new PresentOpenedMessageComposer(inside, "", false));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Caught exception", e);
|
||||
|
Loading…
Reference in New Issue
Block a user