mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 23:10:52 +01:00
Ability for plugins to catch or cancel outgoing packets
This commit is contained in:
parent
0a6355996a
commit
1bef0e5865
@ -6,6 +6,7 @@ import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.plugin.events.emulator.OutgoingPacketEvent;
|
||||
import io.netty.channel.Channel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -87,6 +88,17 @@ public class GameClient {
|
||||
return;
|
||||
}
|
||||
|
||||
OutgoingPacketEvent event = new OutgoingPacketEvent(this.habbo, response.getComposer(), response);
|
||||
Emulator.getPluginManager().fireEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.hasCustomMessage()) {
|
||||
response = event.getCustomMessage();
|
||||
}
|
||||
|
||||
this.channel.write(response, this.channel.voidPromise());
|
||||
this.channel.flush();
|
||||
}
|
||||
@ -99,6 +111,17 @@ public class GameClient {
|
||||
return;
|
||||
}
|
||||
|
||||
OutgoingPacketEvent event = new OutgoingPacketEvent(this.habbo, response.getComposer(), response);
|
||||
Emulator.getPluginManager().fireEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (event.hasCustomMessage()) {
|
||||
response = event.getCustomMessage();
|
||||
}
|
||||
|
||||
this.channel.write(response);
|
||||
}
|
||||
|
||||
|
@ -4795,16 +4795,28 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
if(height > MAXIMUM_FURNI_HEIGHT) return FurnitureMovementError.CANT_STACK;
|
||||
if(height < this.getLayout().getHeightAtSquare(tile.x, tile.y)) return FurnitureMovementError.CANT_STACK; //prevent furni going under the floor
|
||||
boolean cantStack = false;
|
||||
boolean pluginHeight = false;
|
||||
|
||||
if(height > MAXIMUM_FURNI_HEIGHT) {
|
||||
cantStack = true;
|
||||
}
|
||||
if(height < this.getLayout().getHeightAtSquare(tile.x, tile.y)) {
|
||||
cantStack = true;
|
||||
}
|
||||
|
||||
if (Emulator.getPluginManager().isRegistered(FurnitureBuildheightEvent.class, true)) {
|
||||
FurnitureBuildheightEvent event = Emulator.getPluginManager().fireEvent(new FurnitureBuildheightEvent(item, actor, 0.00, height));
|
||||
if (event.hasChangedHeight()) {
|
||||
height = event.getUpdatedHeight();
|
||||
pluginHeight = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!pluginHeight && cantStack) {
|
||||
return FurnitureMovementError.CANT_STACK;
|
||||
}
|
||||
|
||||
item.setX(tile.x);
|
||||
item.setY(tile.y);
|
||||
item.setZ(height);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.eu.habbo.messages;
|
||||
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.util.PacketUtils;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufOutputStream;
|
||||
@ -19,6 +20,7 @@ public class ServerMessage {
|
||||
private AtomicInteger refs;
|
||||
private ByteBufOutputStream stream;
|
||||
private ByteBuf channelBuffer;
|
||||
private MessageComposer composer;
|
||||
|
||||
public ServerMessage() {
|
||||
|
||||
@ -38,6 +40,7 @@ public class ServerMessage {
|
||||
this.refs = new AtomicInteger(0);
|
||||
this.channelBuffer = Unpooled.buffer();
|
||||
this.stream = new ByteBufOutputStream(this.channelBuffer);
|
||||
this.composer = null;
|
||||
|
||||
try {
|
||||
this.stream.writeInt(0);
|
||||
@ -185,4 +188,12 @@ public class ServerMessage {
|
||||
return this.channelBuffer.copy();
|
||||
}
|
||||
|
||||
public MessageComposer getComposer() {
|
||||
return composer;
|
||||
}
|
||||
|
||||
public void setComposer(MessageComposer composer) {
|
||||
this.composer = composer;
|
||||
}
|
||||
|
||||
}
|
@ -17,6 +17,7 @@ public abstract class MessageComposer {
|
||||
public ServerMessage compose() {
|
||||
if (this.composed == null) {
|
||||
this.composed = this.composeInternal();
|
||||
this.composed.setComposer(this);
|
||||
}
|
||||
|
||||
return this.composed;
|
||||
|
@ -58,4 +58,8 @@ public class AchievementListComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
}
|
@ -56,4 +56,12 @@ public class AchievementProgressComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
|
||||
public Achievement getAchievement() {
|
||||
return achievement;
|
||||
}
|
||||
}
|
@ -35,4 +35,12 @@ public class AchievementUnlockedComposer extends MessageComposer {
|
||||
this.response.appendBoolean(true);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Achievement getAchievement() {
|
||||
return achievement;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
}
|
||||
|
@ -38,4 +38,12 @@ public class TalentLevelUpdateComposer extends MessageComposer {
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public TalentTrackType getTalentTrackType() {
|
||||
return talentTrackType;
|
||||
}
|
||||
|
||||
public TalentTrackLevel getTalentTrackLevel() {
|
||||
return talentTrackLevel;
|
||||
}
|
||||
}
|
@ -127,4 +127,12 @@ public class TalentTrackComposer extends MessageComposer {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
|
||||
public TalentTrackType getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,12 @@ public class CameraCompetitionStatusComposer extends MessageComposer {
|
||||
this.response.appendString(this.unknownString);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public boolean isUnknownBoolean() {
|
||||
return unknownBoolean;
|
||||
}
|
||||
|
||||
public String getUnknownString() {
|
||||
return unknownString;
|
||||
}
|
||||
}
|
@ -23,4 +23,16 @@ public class CameraPriceComposer extends MessageComposer {
|
||||
this.response.appendInt(this.pointsType);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCredits() {
|
||||
return credits;
|
||||
}
|
||||
|
||||
public int getPoints() {
|
||||
return points;
|
||||
}
|
||||
|
||||
public int getPointsType() {
|
||||
return pointsType;
|
||||
}
|
||||
}
|
@ -28,4 +28,16 @@ public class CameraPublishWaitMessageComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public boolean isOk() {
|
||||
return isOk;
|
||||
}
|
||||
|
||||
public int getCooldownSeconds() {
|
||||
return cooldownSeconds;
|
||||
}
|
||||
|
||||
public String getExtraDataId() {
|
||||
return extraDataId;
|
||||
}
|
||||
}
|
@ -17,4 +17,8 @@ public class CameraURLComposer extends MessageComposer {
|
||||
this.response.appendString(this.URL);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getURL() {
|
||||
return URL;
|
||||
}
|
||||
}
|
@ -20,4 +20,8 @@ public class AlertPurchaseFailedComposer extends MessageComposer {
|
||||
this.response.appendInt(this.error);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getError() {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,8 @@ public class AlertPurchaseUnavailableComposer extends MessageComposer {
|
||||
this.response.appendInt(this.code);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,8 @@ public class CatalogModeComposer extends MessageComposer {
|
||||
this.response.appendInt(this.mode);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getMode() {
|
||||
return mode;
|
||||
}
|
||||
}
|
||||
|
@ -68,4 +68,20 @@ public class CatalogPageComposer extends MessageComposer {
|
||||
page.serialize(message);
|
||||
}
|
||||
}
|
||||
|
||||
public CatalogPage getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
|
||||
public int getOfferId() {
|
||||
return offerId;
|
||||
}
|
||||
|
||||
public String getMode() {
|
||||
return mode;
|
||||
}
|
||||
}
|
||||
|
@ -75,4 +75,17 @@ public class CatalogPagesListComposer extends MessageComposer {
|
||||
this.append(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
|
||||
public String getMode() {
|
||||
return mode;
|
||||
}
|
||||
|
||||
public boolean isHasPermission() {
|
||||
return hasPermission;
|
||||
}
|
||||
}
|
||||
|
@ -18,4 +18,8 @@ public class CatalogSearchResultComposer extends MessageComposer {
|
||||
this.item.serialize(this.response);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public CatalogItem getItem() {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
@ -50,5 +50,39 @@ public class ClubCenterDataComposer extends MessageComposer {
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCurrentHcStreak() {
|
||||
return currentHcStreak;
|
||||
}
|
||||
|
||||
public String getFirstSubDate() {
|
||||
return firstSubDate;
|
||||
}
|
||||
|
||||
public double getKickbackPercentage() {
|
||||
return kickbackPercentage;
|
||||
}
|
||||
|
||||
public int getTotalCreditsMissed() {
|
||||
return totalCreditsMissed;
|
||||
}
|
||||
|
||||
public int getTotalCreditsRewarded() {
|
||||
return totalCreditsRewarded;
|
||||
}
|
||||
|
||||
public int getTotalCreditsSpent() {
|
||||
return totalCreditsSpent;
|
||||
}
|
||||
|
||||
public int getCreditRewardForStreakBonus() {
|
||||
return creditRewardForStreakBonus;
|
||||
}
|
||||
|
||||
public int getCreditRewardForMonthlySpent() {
|
||||
return creditRewardForMonthlySpent;
|
||||
}
|
||||
|
||||
public int getTimeUntilPayday() {
|
||||
return timeUntilPayday;
|
||||
}
|
||||
}
|
@ -34,4 +34,12 @@ public class ClubDataComposer extends MessageComposer {
|
||||
this.response.appendInt(this.windowId);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getWindowId() {
|
||||
return windowId;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
}
|
||||
|
@ -65,4 +65,16 @@ public class ClubGiftsComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getDaysTillNextGift() {
|
||||
return daysTillNextGift;
|
||||
}
|
||||
|
||||
public int getAvailableGifts() {
|
||||
return availableGifts;
|
||||
}
|
||||
|
||||
public int getDaysAsHc() {
|
||||
return daysAsHc;
|
||||
}
|
||||
}
|
||||
|
@ -23,4 +23,16 @@ public class NotEnoughPointsTypeComposer extends MessageComposer {
|
||||
this.response.appendInt(this.pointsType);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public boolean isCredits() {
|
||||
return isCredits;
|
||||
}
|
||||
|
||||
public boolean isPixels() {
|
||||
return isPixels;
|
||||
}
|
||||
|
||||
public int getPointsType() {
|
||||
return pointsType;
|
||||
}
|
||||
}
|
@ -21,4 +21,12 @@ public class PetBoughtNotificationComposer extends MessageComposer {
|
||||
this.pet.serialize(this.response);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Pet getPet() {
|
||||
return pet;
|
||||
}
|
||||
|
||||
public boolean isGift() {
|
||||
return gift;
|
||||
}
|
||||
}
|
||||
|
@ -31,4 +31,12 @@ public class PetBreedsComposer extends MessageComposer {
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getPetName() {
|
||||
return petName;
|
||||
}
|
||||
|
||||
public THashSet<PetRace> getPetRaces() {
|
||||
return petRaces;
|
||||
}
|
||||
}
|
||||
|
@ -26,4 +26,12 @@ public class PetNameErrorComposer extends MessageComposer {
|
||||
this.response.appendString(this.value);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
@ -40,4 +40,8 @@ public class PurchaseOKComposer extends MessageComposer {
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public CatalogItem getCatalogItem() {
|
||||
return catalogItem;
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,8 @@ public class RecyclerCompleteComposer extends MessageComposer {
|
||||
this.response.appendInt(0); //prize ID.
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,8 @@ public class RedeemVoucherErrorComposer extends MessageComposer {
|
||||
this.response.appendString(this.code + "");
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
@ -23,4 +23,12 @@ public class TargetedOfferComposer extends MessageComposer {
|
||||
this.offer.serialize(this.response, purchase);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
|
||||
public TargetOffer getOffer() {
|
||||
return offer;
|
||||
}
|
||||
}
|
@ -31,4 +31,20 @@ public class MarketplaceBuyErrorComposer extends MessageComposer {
|
||||
this.response.appendInt(this.price); //requestedOfferId
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
public int getUnknown() {
|
||||
return unknown;
|
||||
}
|
||||
|
||||
public int getOfferId() {
|
||||
return offerId;
|
||||
}
|
||||
|
||||
public int getPrice() {
|
||||
return price;
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,12 @@ public class MarketplaceCancelSaleComposer extends MessageComposer {
|
||||
this.response.appendBoolean(this.success);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public MarketPlaceOffer getOffer() {
|
||||
return offer;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
}
|
||||
|
@ -18,4 +18,8 @@ public class MarketplaceItemInfoComposer extends MessageComposer {
|
||||
MarketPlace.serializeItemInfo(this.itemId, this.response);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
}
|
||||
|
@ -22,4 +22,8 @@ public class MarketplaceItemPostedComposer extends MessageComposer {
|
||||
this.response.appendInt(this.code);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
@ -45,4 +45,8 @@ public class MarketplaceOffersComposer extends MessageComposer {
|
||||
this.response.appendInt(this.offers.size());
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public List<MarketPlaceOffer> getOffers() {
|
||||
return offers;
|
||||
}
|
||||
}
|
||||
|
@ -64,4 +64,8 @@ public class MarketplaceOwnItemsComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
}
|
||||
|
@ -27,4 +27,16 @@ public class MarketplaceSellItemComposer extends MessageComposer {
|
||||
this.response.appendInt(this.valueB);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
public int getValueA() {
|
||||
return valueA;
|
||||
}
|
||||
|
||||
public int getValueB() {
|
||||
return valueB;
|
||||
}
|
||||
}
|
||||
|
@ -35,4 +35,12 @@ public class CraftableProductsComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public List<CraftingRecipe> getRecipes() {
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public Collection<Item> getIngredients() {
|
||||
return ingredients;
|
||||
}
|
||||
}
|
||||
|
@ -26,4 +26,8 @@ public class CraftingRecipeComposer extends MessageComposer {
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public CraftingRecipe getRecipe() {
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,12 @@ public class CraftingRecipesAvailableComposer extends MessageComposer {
|
||||
this.response.appendBoolean(this.found);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public boolean isFound() {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
@ -32,4 +32,12 @@ public class CraftingResultComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public CraftingRecipe getRecipe() {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
public boolean isSucces() {
|
||||
return succes;
|
||||
}
|
||||
}
|
||||
|
@ -61,4 +61,28 @@ public class AdventCalendarDataComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getEventName() {
|
||||
return eventName;
|
||||
}
|
||||
|
||||
public String getCampaignImage() {
|
||||
return campaignImage;
|
||||
}
|
||||
|
||||
public int getTotalDays() {
|
||||
return totalDays;
|
||||
}
|
||||
|
||||
public int getCurrentDay() {
|
||||
return currentDay;
|
||||
}
|
||||
|
||||
public ArrayList<CalendarRewardClaimed> getUnlocked() {
|
||||
return unlocked;
|
||||
}
|
||||
|
||||
public boolean isLockExpired() {
|
||||
return lockExpired;
|
||||
}
|
||||
}
|
@ -46,4 +46,16 @@ public class AdventCalendarProductComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public CalendarRewardObject getRewardObject() {
|
||||
return rewardObject;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
}
|
@ -20,4 +20,12 @@ public class MysticBoxPrizeComposer extends MessageComposer {
|
||||
this.response.appendInt(this.itemId);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
}
|
||||
|
@ -18,4 +18,8 @@ public class NewYearResolutionCompletedComposer extends MessageComposer {
|
||||
this.response.appendString(this.badge);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getBadge() {
|
||||
return badge;
|
||||
}
|
||||
}
|
@ -32,4 +32,28 @@ public class NewYearResolutionProgressComposer extends MessageComposer {
|
||||
this.response.appendInt(this.timeLeft);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getStuffId() {
|
||||
return stuffId;
|
||||
}
|
||||
|
||||
public int getAchievementId() {
|
||||
return achievementId;
|
||||
}
|
||||
|
||||
public String getAchievementName() {
|
||||
return achievementName;
|
||||
}
|
||||
|
||||
public int getCurrentProgress() {
|
||||
return currentProgress;
|
||||
}
|
||||
|
||||
public int getProgressNeeded() {
|
||||
return progressNeeded;
|
||||
}
|
||||
|
||||
public int getTimeLeft() {
|
||||
return timeLeft;
|
||||
}
|
||||
}
|
@ -28,4 +28,8 @@ public class FloorPlanEditorBlockedTilesComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Room getRoom() {
|
||||
return room;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,8 @@ public class FloorPlanEditorDoorSettingsComposer extends MessageComposer {
|
||||
this.response.appendInt(this.room.getLayout().getDoorDirection());
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Room getRoom() {
|
||||
return room;
|
||||
}
|
||||
}
|
||||
|
@ -50,4 +50,16 @@ public class FriendChatMessageComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Message getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public int getToId() {
|
||||
return toId;
|
||||
}
|
||||
|
||||
public int getFromId() {
|
||||
return fromId;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,8 @@ public class FriendFindingRoomComposer extends MessageComposer {
|
||||
this.response.appendInt(this.errorCode);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
@ -31,4 +31,16 @@ public class FriendNotificationComposer extends MessageComposer {
|
||||
this.response.appendString(this.data);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
@ -22,4 +22,8 @@ public class FriendRequestComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
}
|
||||
|
@ -23,4 +23,8 @@ public class FriendRequestErrorComposer extends MessageComposer {
|
||||
this.response.appendInt(this.errorCode);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
@ -80,4 +80,16 @@ public class FriendsComposer extends MessageComposer {
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
public int getTotalPages() {
|
||||
return totalPages;
|
||||
}
|
||||
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
public Collection<MessengerBuddy> getFriends() {
|
||||
return friends;
|
||||
}
|
||||
}
|
@ -30,4 +30,8 @@ public class LoadFriendRequestsComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
}
|
@ -44,5 +44,9 @@ public class MessengerInitComposer extends MessageComposer {
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,4 +30,8 @@ public class RemoveFriendComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public TIntArrayList getUnfriendIds() {
|
||||
return unfriendIds;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,12 @@ public class RoomInviteComposer extends MessageComposer {
|
||||
this.response.appendString(this.message);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
@ -30,4 +30,12 @@ public class RoomInviteErrorComposer extends MessageComposer {
|
||||
});
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
public THashSet<MessengerBuddy> getBuddies() {
|
||||
return buddies;
|
||||
}
|
||||
}
|
@ -22,4 +22,8 @@ public class StalkErrorComposer extends MessageComposer {
|
||||
this.response.appendInt(this.errorCode);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
@ -51,27 +51,39 @@ public class UpdateFriendComposer extends MessageComposer {
|
||||
|
||||
for(MessengerBuddy buddy : buddies){
|
||||
|
||||
if (buddy != null) {
|
||||
this.response.appendInt(this.action); // -1 = removed friendId / 0 = updated friend / 1 = added friend
|
||||
this.response.appendInt(buddy.getId());
|
||||
if (this.action == -1) {
|
||||
continue;
|
||||
if (buddy != null) {
|
||||
this.response.appendInt(this.action); // -1 = removed friendId / 0 = updated friend / 1 = added friend
|
||||
this.response.appendInt(buddy.getId());
|
||||
if (this.action == -1) {
|
||||
continue;
|
||||
}
|
||||
this.response.appendString(buddy.getUsername());
|
||||
this.response.appendInt(buddy.getGender().equals(HabboGender.M) ? 0 : 1);
|
||||
this.response.appendBoolean(buddy.getOnline() == 1);
|
||||
this.response.appendBoolean(buddy.inRoom()); //In room
|
||||
this.response.appendString(buddy.getLook());
|
||||
this.response.appendInt(buddy.getCategoryId());
|
||||
this.response.appendString(buddy.getMotto());
|
||||
this.response.appendString(""); //Last seen as DATETIMESTRING
|
||||
this.response.appendString(""); //Realname or Facebookame as String
|
||||
this.response.appendBoolean(false); //Offline messaging.
|
||||
this.response.appendBoolean(false);
|
||||
this.response.appendBoolean(false);
|
||||
this.response.appendShort(buddy.getRelation());
|
||||
}
|
||||
this.response.appendString(buddy.getUsername());
|
||||
this.response.appendInt(buddy.getGender().equals(HabboGender.M) ? 0 : 1);
|
||||
this.response.appendBoolean(buddy.getOnline() == 1);
|
||||
this.response.appendBoolean(buddy.inRoom()); //In room
|
||||
this.response.appendString(buddy.getLook());
|
||||
this.response.appendInt(buddy.getCategoryId());
|
||||
this.response.appendString(buddy.getMotto());
|
||||
this.response.appendString(""); //Last seen as DATETIMESTRING
|
||||
this.response.appendString(""); //Realname or Facebookame as String
|
||||
this.response.appendBoolean(false); //Offline messaging.
|
||||
this.response.appendBoolean(false);
|
||||
this.response.appendBoolean(false);
|
||||
this.response.appendShort(buddy.getRelation());
|
||||
}
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Collection<MessengerBuddy> getBuddies() {
|
||||
return buddies;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
|
||||
public int getAction() {
|
||||
return action;
|
||||
}
|
||||
}
|
||||
|
@ -77,4 +77,16 @@ public class UserSearchResultComposer extends MessageComposer {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public THashSet<MessengerBuddy> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
public THashSet<MessengerBuddy> getFriends() {
|
||||
return friends;
|
||||
}
|
||||
|
||||
public Habbo getHabbo() {
|
||||
return habbo;
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,12 @@ public class GameCenterAccountInfoComposer extends MessageComposer {
|
||||
this.response.appendInt(1);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getGameId() {
|
||||
return gameId;
|
||||
}
|
||||
|
||||
public int getGamesLeft() {
|
||||
return gamesLeft;
|
||||
}
|
||||
}
|
@ -23,4 +23,12 @@ public class GameCenterGameComposer extends MessageComposer {
|
||||
this.response.appendInt(this.status);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getGameId() {
|
||||
return gameId;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,8 @@ public class BaseJumpJoinQueueComposer extends MessageComposer {
|
||||
this.response.appendInt(this.gameId);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getGameId() {
|
||||
return gameId;
|
||||
}
|
||||
}
|
@ -48,4 +48,12 @@ public class BaseJumpLoadGameComposer extends MessageComposer {
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public GameClient getClient() {
|
||||
return client;
|
||||
}
|
||||
|
||||
public int getGame() {
|
||||
return game;
|
||||
}
|
||||
}
|
@ -17,4 +17,8 @@ public class PickMonthlyClubGiftNotificationComposer extends MessageComposer {
|
||||
this.response.appendInt(this.count);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
@ -23,4 +23,8 @@ public class BotErrorComposer extends MessageComposer {
|
||||
this.response.appendInt(this.errorCode);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
@ -38,4 +38,12 @@ public class BubbleAlertComposer extends MessageComposer {
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getErrorKey() {
|
||||
return errorKey;
|
||||
}
|
||||
|
||||
public THashMap<String, String> getKeys() {
|
||||
return keys;
|
||||
}
|
||||
}
|
||||
|
@ -23,4 +23,8 @@ public class CustomNotificationComposer extends MessageComposer {
|
||||
this.response.appendInt(this.type);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
@ -24,4 +24,8 @@ public class GenericAlertComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
@ -25,4 +25,8 @@ public class GenericErrorMessagesComposer extends MessageComposer {
|
||||
this.response.appendInt(this.errorCode);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,12 @@ public class HotelClosedAndOpensComposer extends MessageComposer {
|
||||
this.response.appendInt(this.minute);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getHour() {
|
||||
return hour;
|
||||
}
|
||||
|
||||
public int getMinute() {
|
||||
return minute;
|
||||
}
|
||||
}
|
||||
|
@ -23,4 +23,16 @@ public class HotelClosesAndWillOpenAtComposer extends MessageComposer {
|
||||
this.response.appendBoolean(this.disconnected);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getHour() {
|
||||
return hour;
|
||||
}
|
||||
|
||||
public int getMinute() {
|
||||
return minute;
|
||||
}
|
||||
|
||||
public boolean isDisconnected() {
|
||||
return disconnected;
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,12 @@ public class HotelWillCloseInMinutesAndBackInComposer extends MessageComposer {
|
||||
this.response.appendInt(this.reopenInMinutes);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCloseInMinutes() {
|
||||
return closeInMinutes;
|
||||
}
|
||||
|
||||
public int getReopenInMinutes() {
|
||||
return reopenInMinutes;
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,8 @@ public class HotelWillCloseInMinutesComposer extends MessageComposer {
|
||||
this.response.appendInt(this.minutes);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getMinutes() {
|
||||
return minutes;
|
||||
}
|
||||
}
|
||||
|
@ -36,4 +36,12 @@ public class MessagesForYouComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String[] getMessages() {
|
||||
return messages;
|
||||
}
|
||||
|
||||
public List<String> getNewMessages() {
|
||||
return newMessages;
|
||||
}
|
||||
}
|
||||
|
@ -24,4 +24,8 @@ public class PetErrorComposer extends MessageComposer {
|
||||
this.response.appendInt(this.errorCode);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,8 @@ public class StaffAlertAndOpenHabboWayComposer extends MessageComposer {
|
||||
this.response.appendString(this.message);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,12 @@ public class StaffAlertWIthLinkAndOpenHabboWayComposer extends MessageComposer {
|
||||
this.response.appendString(this.link);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,12 @@ public class StaffAlertWithLinkComposer extends MessageComposer {
|
||||
this.response.appendString(this.link);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,8 @@ public class UpdateFailedComposer extends MessageComposer {
|
||||
this.response.appendString(this.message);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
@ -47,4 +47,8 @@ public class GuardianVotingRequestedComposer extends MessageComposer {
|
||||
//2015 10 17 14 24 30
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public GuardianTicket getTicket() {
|
||||
return ticket;
|
||||
}
|
||||
}
|
||||
|
@ -34,4 +34,12 @@ public class GuardianVotingResultComposer extends MessageComposer {
|
||||
}
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public GuardianTicket getTicket() {
|
||||
return ticket;
|
||||
}
|
||||
|
||||
public GuardianVote getVote() {
|
||||
return vote;
|
||||
}
|
||||
}
|
||||
|
@ -32,4 +32,12 @@ public class GuardianVotingVotesComposer extends MessageComposer {
|
||||
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public GuardianTicket getTicket() {
|
||||
return ticket;
|
||||
}
|
||||
|
||||
public Habbo getGuardian() {
|
||||
return guardian;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,8 @@ public class BullyReportClosedComposer extends MessageComposer {
|
||||
this.response.appendInt(this.code);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
@ -25,4 +25,12 @@ public class GuideSessionAttachedComposer extends MessageComposer {
|
||||
this.response.appendInt(this.isHelper ? 60 : Emulator.getGameEnvironment().getGuideManager().getAverageWaitingTime()); //? Avarage Waiting Time (for noob) | Time left to pickup (For helper)
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public GuideTour getTour() {
|
||||
return tour;
|
||||
}
|
||||
|
||||
public boolean isHelper() {
|
||||
return isHelper;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,8 @@ public class GuideSessionEndedComposer extends MessageComposer {
|
||||
this.response.appendInt(this.errorCode); //?
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,8 @@ public class GuideSessionErrorComposer extends MessageComposer {
|
||||
this.response.appendInt(this.errorCode);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,8 @@ public class GuideSessionInvitedToGuideRoomComposer extends MessageComposer {
|
||||
this.response.appendString(this.room != null ? this.room.getName() : "");
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Room getRoom() {
|
||||
return room;
|
||||
}
|
||||
}
|
||||
|
@ -19,4 +19,8 @@ public class GuideSessionMessageComposer extends MessageComposer {
|
||||
this.response.appendInt(this.message.userId); //Sender ID
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public GuideChatMessage getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,8 @@ public class GuideSessionPartnerIsPlayingComposer extends MessageComposer {
|
||||
this.response.appendBoolean(this.isPlaying);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public boolean isPlaying() {
|
||||
return isPlaying;
|
||||
}
|
||||
}
|
@ -17,4 +17,8 @@ public class GuideSessionPartnerIsTypingComposer extends MessageComposer {
|
||||
this.response.appendBoolean(this.typing);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public boolean isTyping() {
|
||||
return typing;
|
||||
}
|
||||
}
|
||||
|
@ -18,4 +18,8 @@ public class GuideSessionRequesterRoomComposer extends MessageComposer {
|
||||
this.response.appendInt(this.room != null ? this.room.getId() : 0);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Room getRoom() {
|
||||
return room;
|
||||
}
|
||||
}
|
||||
|
@ -23,4 +23,8 @@ public class GuideSessionStartedComposer extends MessageComposer {
|
||||
this.response.appendString(this.tour.getHelper().getHabboInfo().getLook());
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public GuideTour getTour() {
|
||||
return tour;
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,8 @@ public class GuideToolsComposer extends MessageComposer {
|
||||
this.response.appendInt(Emulator.getGameEnvironment().getGuideManager().getGuardiansCount()); //Guardians On Duty
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public boolean isOnDuty() {
|
||||
return onDuty;
|
||||
}
|
||||
}
|
||||
|
@ -24,4 +24,12 @@ public class GuildAcceptMemberErrorComposer extends MessageComposer {
|
||||
this.response.appendInt(this.errorCode);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getGuildId() {
|
||||
return guildId;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
}
|
@ -19,4 +19,8 @@ public class GuildBoughtComposer extends MessageComposer {
|
||||
this.response.appendInt(this.guild.getId());
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public Guild getGuild() {
|
||||
return guild;
|
||||
}
|
||||
}
|
||||
|
@ -49,4 +49,8 @@ public class GuildBuyRoomsComposer extends MessageComposer {
|
||||
this.response.appendInt(0);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public THashSet<Room> getRooms() {
|
||||
return rooms;
|
||||
}
|
||||
}
|
||||
|
@ -20,4 +20,12 @@ public class GuildConfirmRemoveMemberComposer extends MessageComposer {
|
||||
this.response.appendInt(this.furniCount);
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public int getFurniCount() {
|
||||
return furniCount;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user