From 85739666b4634aaed2f6d688a70cca199522f548 Mon Sep 17 00:00:00 2001 From: Bill Date: Sat, 18 Sep 2021 04:27:20 -0400 Subject: [PATCH] Update various packets --- src/nitro/communication/NitroMessages.ts | 258 +++++++----------- .../messages/incoming/IncomingHeader.ts | 7 +- .../bots/BotAddedToInventoryEvent.ts | 6 +- .../bots/BotInventoryMessageEvent.ts | 6 +- .../incoming/bots/BotReceivedMessageEvent.ts | 16 ++ .../bots/BotRemovedFromInventoryEvent.ts | 6 +- .../incoming/{inventory => }/bots/index.ts | 2 +- .../incoming/catalog/ClubGiftSelectedEvent.ts | 8 +- .../communication/messages/incoming/index.ts | 3 +- .../inventory/bots/BotInventoryEvent.ts | 16 -- .../messages/incoming/inventory/index.ts | 1 - .../inventory/pets/PetReceivedMessageEvent.ts | 16 ++ .../messages/incoming/inventory/pets/index.ts | 1 + .../moderation/ModeratorCautionEvent.ts | 16 ++ .../moderation/UserBannedMessageEvent.ts | 16 ++ .../messages/incoming/moderation/index.ts | 2 + .../PetLevelNotificationEvent.ts | 16 ++ .../messages/incoming/notifications/index.ts | 1 + .../bots/BotAddedToInventoryParser.ts | 2 +- .../parser/{inventory => }/bots/BotData.ts | 2 +- .../bots/BotInventoryMessageParser.ts | 2 +- .../bots/BotReceivedMessageParser.ts | 4 +- .../bots/BotRemovedFromInventoryParser.ts | 2 +- .../parser/{inventory => }/bots/index.ts | 0 .../communication/messages/parser/index.ts | 2 + .../messages/parser/inventory/index.ts | 1 - .../PetBoughtNotificationMessageParser.ts | 31 --- .../pets/PetReceivedMessageParser.ts | 34 +++ .../messages/parser/inventory/pets/index.ts | 2 +- .../moderation/ModerationCautionParser.ts | 35 +++ .../moderation/UserBannedMessageParser.ts | 27 ++ .../messages/parser/moderation/index.ts | 2 + .../parser/modtool/ModtoolCFHTopicsParser.ts | 1 + .../PetLevelNotificationParser.ts | 52 ++++ .../messages/parser/notifications/index.ts | 1 + src/nitro/room/IGetImageListener.ts | 4 +- src/nitro/room/preview/RoomPreviewer.ts | 3 +- src/nitro/session/IRoomSession.ts | 2 +- src/nitro/session/RoomSession.ts | 9 +- 39 files changed, 377 insertions(+), 238 deletions(-) rename src/nitro/communication/messages/incoming/{inventory => }/bots/BotAddedToInventoryEvent.ts (51%) rename src/nitro/communication/messages/incoming/{inventory => }/bots/BotInventoryMessageEvent.ts (51%) create mode 100644 src/nitro/communication/messages/incoming/bots/BotReceivedMessageEvent.ts rename src/nitro/communication/messages/incoming/{inventory => }/bots/BotRemovedFromInventoryEvent.ts (52%) rename src/nitro/communication/messages/incoming/{inventory => }/bots/index.ts (75%) delete mode 100644 src/nitro/communication/messages/incoming/inventory/bots/BotInventoryEvent.ts create mode 100644 src/nitro/communication/messages/incoming/inventory/pets/PetReceivedMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/moderation/ModeratorCautionEvent.ts create mode 100644 src/nitro/communication/messages/incoming/moderation/UserBannedMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/notifications/PetLevelNotificationEvent.ts rename src/nitro/communication/messages/parser/{inventory => }/bots/BotAddedToInventoryParser.ts (97%) rename src/nitro/communication/messages/parser/{inventory => }/bots/BotData.ts (93%) rename src/nitro/communication/messages/parser/{inventory => }/bots/BotInventoryMessageParser.ts (97%) rename src/nitro/communication/messages/parser/{inventory => }/bots/BotReceivedMessageParser.ts (89%) rename src/nitro/communication/messages/parser/{inventory => }/bots/BotRemovedFromInventoryParser.ts (96%) rename src/nitro/communication/messages/parser/{inventory => }/bots/index.ts (100%) delete mode 100644 src/nitro/communication/messages/parser/inventory/pets/PetBoughtNotificationMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/inventory/pets/PetReceivedMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts create mode 100644 src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/moderation/index.ts create mode 100644 src/nitro/communication/messages/parser/notifications/PetLevelNotificationParser.ts diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index db0f8af5..0ee0d2ad 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -1,6 +1,7 @@ import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration'; import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, ClubGiftNotificationEvent, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetUserSongDisksMessageComposer, GroupBadgesComposer, GroupBadgesEvent, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, MarketplaceBuyOfferComposer, MarketplaceRedeemCreditsComposer, MarketplaceRequesstItemStatsComposer, MarketplaceRequestComposer, MarketplaceRequestOffersComposer, MarketplaceRequestOwnItemsComposer, MarketplaceTakeItemBackComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetTargetedOfferStateComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, UnseenResetCategoryComposer, UnseenResetItemsComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VoteForRoomMessageComposer, WardrobeMessageEvent } from './messages'; import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent'; +import { BotAddedToInventoryEvent, BotInventoryMessageEvent, BotReceivedMessageEvent, BotRemovedFromInventoryEvent } from './messages/incoming/bots'; import { CfhSanctionMessageEvent, CfhTopicsInitEvent, SanctionStatusEvent } from './messages/incoming/callforhelp'; import { CameraPublishStatusMessageEvent } from './messages/incoming/camera/CameraPublishStatusMessageEvent'; import { CameraPurchaseOKMessageEvent } from './messages/incoming/camera/CameraPurchaseOKMessageEvent'; @@ -34,6 +35,7 @@ import { InstantMessageErrorEvent } from './messages/incoming/friendlist/Instant import { MessageErrorEvent } from './messages/incoming/friendlist/MessageErrorEvent'; import { MessengerInitEvent } from './messages/incoming/friendlist/MessengerInitEvent'; import { MiniMailNewMessageEvent } from './messages/incoming/friendlist/MiniMailNewMessageEvent'; +import { MiniMailUnreadCountEvent } from './messages/incoming/friendlist/MiniMailUnreadCountEvent'; import { NewConsoleMessageEvent } from './messages/incoming/friendlist/NewConsoleMessageEvent'; import { NewFriendRequestEvent } from './messages/incoming/friendlist/NewFriendRequestEvent'; import { RoomInviteErrorEvent } from './messages/incoming/friendlist/RoomInviteErrorEvent'; @@ -57,9 +59,6 @@ import { AvatarEffectAddedEvent } from './messages/incoming/inventory/avatareffe import { AvatarEffectExpiredEvent } from './messages/incoming/inventory/avatareffect/AvatarEffectExpiredEvent'; import { AvatarEffectsEvent } from './messages/incoming/inventory/avatareffect/AvatarEffectsEvent'; import { BadgesEvent } from './messages/incoming/inventory/badges/BadgesEvent'; -import { BotAddedToInventoryEvent } from './messages/incoming/inventory/bots/BotAddedToInventoryEvent'; -import { BotInventoryMessageEvent } from './messages/incoming/inventory/bots/BotInventoryMessageEvent'; -import { BotRemovedFromInventoryEvent } from './messages/incoming/inventory/bots/BotRemovedFromInventoryEvent'; import { FigureSetIdsMessageEvent } from './messages/incoming/inventory/clothes/FigureSetIdsMessageEvent'; import { FurnitureListAddOrUpdateEvent } from './messages/incoming/inventory/furni/FurnitureListAddOrUpdateEvent'; import { FurnitureListEvent } from './messages/incoming/inventory/furni/FurnitureListEvent'; @@ -69,6 +68,7 @@ import { FurniturePostItPlacedEvent } from './messages/incoming/inventory/furni/ import { PresentOpenedMessageEvent } from './messages/incoming/inventory/furni/gifts/PresentOpenedMessageEvent'; import { PetAddedToInventoryEvent } from './messages/incoming/inventory/pets/PetAddedToInventoryEvent'; import { PetInventoryEvent } from './messages/incoming/inventory/pets/PetInventoryEvent'; +import { PetReceivedMessageEvent } from './messages/incoming/inventory/pets/PetReceivedMessageEvent'; import { PetRemovedFromInventory } from './messages/incoming/inventory/pets/PetRemovedFromInventoryEvent'; import { TradingAcceptEvent } from './messages/incoming/inventory/trading/TradingAcceptEvent'; import { TradingCloseEvent } from './messages/incoming/inventory/trading/TradingCloseEvent'; @@ -90,6 +90,8 @@ import { MarketplaceItemStatsEvent } from './messages/incoming/marketplace/Marke import { MarketplaceMakeOfferResult } from './messages/incoming/marketplace/MarketplaceMakeOfferResult'; import { MarketPlaceOffersEvent } from './messages/incoming/marketplace/MarketplaceOffersEvent'; import { MarketplaceOwnOffersEvent } from './messages/incoming/marketplace/MarketplaceOwnOffersEvent'; +import { UserBannedMessageEvent } from './messages/incoming/moderation'; +import { ModeratorCautionEvent } from './messages/incoming/moderation/ModeratorCautionEvent'; import { ModtoolCallForHelpTopicsEvent } from './messages/incoming/modtool/ModtoolCallForHelpTopicsEvent'; import { ModtoolMainEvent } from './messages/incoming/modtool/ModtoolMainEvent'; import { ModtoolReceivedRoomsUserEvent } from './messages/incoming/modtool/ModtoolReceivedRoomsUserEvent'; @@ -109,10 +111,10 @@ import { NavigatorSearchEvent } from './messages/incoming/navigator/NavigatorSea import { NavigatorSettingsEvent } from './messages/incoming/navigator/NavigatorSettingsEvent'; import { BotErrorEvent } from './messages/incoming/notifications/BotErrorEvent'; import { HabboBroadcastMessageEvent } from './messages/incoming/notifications/HabboBroadcastMessageEvent'; -import { HotelWillShutdownEvent } from './messages/incoming/notifications/HotelWillShutdownEvent'; import { ModeratorMessageEvent } from './messages/incoming/notifications/ModeratorMessageEvent'; import { MOTDNotificationEvent } from './messages/incoming/notifications/MOTDNotificationEvent'; import { NotificationDialogMessageEvent } from './messages/incoming/notifications/NotificationDialogMessageEvent'; +import { PetLevelNotificationEvent } from './messages/incoming/notifications/PetLevelNotificationEvent'; import { PetPlacingErrorEvent } from './messages/incoming/notifications/PetPlacingErrorEvent'; import { UnseenItemsEvent } from './messages/incoming/notifications/UnseenItemsEvent'; import { CommunityGoalEarnedPrizesMessageEvent } from './messages/incoming/quest/CommunityGoalEarnedPrizesMessageEvent'; @@ -454,7 +456,6 @@ import { UserSettingsOldChatComposer } from './messages/outgoing/user/settings/U import { UserSettingsRoomInvitesComposer } from './messages/outgoing/user/settings/UserSettingsRoomInvitesComposer'; import { UserSettingsSoundComposer } from './messages/outgoing/user/settings/UserSettingsSoundComposer'; import { UserRespectComposer } from './messages/outgoing/user/UserRespectComposer'; -import { MiniMailUnreadCountParser } from './messages/parser/friendlist/MiniMailUnreadCountParser'; export class NitroMessages implements IMessageConfiguration { @@ -484,15 +485,18 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.HOTEL_WILL_CLOSE_MINUTES, HotelWillCloseInMinutesEvent); this._events.set(IncomingHeader.HOTEL_MAINTENANCE, MaintenanceStatusMessageEvent); - - this._events.set(IncomingHeader.GENERIC_ERROR, GenericErrorEvent); - // AVATAR this._events.set(IncomingHeader.USER_CHANGE_NAME, ChangeUserNameResultMessageEvent); this._events.set(IncomingHeader.CHECK_USER_NAME, CheckUserNameResultMessageEvent); this._events.set(IncomingHeader.USER_FIGURE, FigureUpdateEvent); this._events.set(IncomingHeader.USER_OUTFITS, WardrobeMessageEvent); + // BOTS + this._events.set(IncomingHeader.ADD_BOT_TO_INVENTORY, BotAddedToInventoryEvent); + this._events.set(IncomingHeader.USER_BOTS, BotInventoryMessageEvent); + this._events.set(IncomingHeader.BOT_RECEIVED, BotReceivedMessageEvent); + this._events.set(IncomingHeader.REMOVE_BOT_FROM_INVENTORY, BotRemovedFromInventoryEvent); + // CALL FOR HELP this._events.set(IncomingHeader.CFH_SANCTION, CfhSanctionMessageEvent); this._events.set(IncomingHeader.CFH_TOPICS, CfhTopicsInitEvent); @@ -543,9 +547,8 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.REDEEM_VOUCHER_ERROR, VoucherRedeemErrorMessageEvent); this._events.set(IncomingHeader.REDEEM_VOUCHER_OK, VoucherRedeemOkMessageEvent); - - this._events.set(IncomingHeader.GROUP_LIST, GuildMembershipsMessageEvent); - this._events.set(IncomingHeader.CATALOG_APPROVE_NAME_RESULT, ApproveNameMessageEvent); + // CLIENT + this._events.set(IncomingHeader.CLIENT_PING, ClientPingEvent); // COMPETITION this._events.set(IncomingHeader.COMPETITION_ENTRY_SUBMIT, CompetitionEntrySubmitResultEvent); @@ -555,8 +558,11 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.COMPETITION_NO_OWNED_ROOMS, NoOwnedRoomsAlertMessageEvent); this._events.set(IncomingHeader.COMPETITION_SECONDS_UNTIL, SecondsUntilMessageEvent); - // CLIENT - this._events.set(IncomingHeader.CLIENT_PING, ClientPingEvent); + // CRAFTING + this._events.set(IncomingHeader.CRAFTABLE_PRODUCTS, CraftableProductsEvent); + this._events.set(IncomingHeader.CRAFTING_RECIPE, CraftingRecipeEvent); + this._events.set(IncomingHeader.CRAFTING_RECIPES_AVAILABLE, CraftingRecipesAvailableEvent); + this._events.set(IncomingHeader.CRAFTING_RESULT, CraftingResultEvent); // DESKTOP this._events.set(IncomingHeader.DESKTOP_VIEW, DesktopViewEvent); @@ -574,12 +580,15 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.MESSENGER_MESSAGE_ERROR, MessageErrorEvent); this._events.set(IncomingHeader.MESSENGER_INIT, MessengerInitEvent); this._events.set(IncomingHeader.MESSENGER_MINIMAIL_NEW, MiniMailNewMessageEvent); - this._events.set(IncomingHeader.MESSENGER_MINIMAIL_COUNT, MiniMailUnreadCountParser); + this._events.set(IncomingHeader.MESSENGER_MINIMAIL_COUNT, MiniMailUnreadCountEvent); this._events.set(IncomingHeader.MESSENGER_CHAT, NewConsoleMessageEvent); this._events.set(IncomingHeader.MESSENGER_REQUEST, NewFriendRequestEvent); this._events.set(IncomingHeader.MESSENGER_INVITE_ERROR, RoomInviteErrorEvent); this._events.set(IncomingHeader.MESSENGER_INVITE, RoomInviteEvent); + // GAMES + this._events.set(IncomingHeader.LOAD_GAME_URL, LoadGameUrlEvent); + // GROUP this._events.set(IncomingHeader.GROUP_INFO, GroupInformationEvent); this._events.set(IncomingHeader.GROUP_MEMBER_REMOVE_CONFIRM, GroupConfirmMemberRemoveEvent); @@ -592,31 +601,31 @@ export class NitroMessages implements IMessageConfiguration // HELP this._events.set(IncomingHeader.CFH_RESULT_MESSAGE, CallForHelpResultMessageEvent); + this._events.set(IncomingHeader.HELPER_TALENT_TRACK, TalentTrackEvent); // INVENTORY - - // ACHIEVEMENTS this._events.set(IncomingHeader.ACHIEVEMENT_PROGRESSED, AchievementEvent); this._events.set(IncomingHeader.ACHIEVEMENT_LIST, AchievementsEvent); this._events.set(IncomingHeader.USER_ACHIEVEMENT_SCORE,AchievementsScoreEvent); - - // EFFECTS this._events.set(IncomingHeader.USER_EFFECT_ACTIVATE, AvatarEffectActivatedEvent); this._events.set(IncomingHeader.USER_EFFECT_LIST_ADD, AvatarEffectAddedEvent); this._events.set(IncomingHeader.USER_EFFECT_LIST_REMOVE, AvatarEffectExpiredEvent); this._events.set(IncomingHeader.USER_EFFECT_LIST, AvatarEffectsEvent); - - // CLOTHES + this._events.set(IncomingHeader.USER_BADGES, BadgesEvent); + this._events.set(IncomingHeader.USER_BADGES_ADD, BadgeReceivedEvent); + this._events.set(IncomingHeader.BADGE_POINT_LIMITS, BadgePointLimitsEvent); + this._events.set(IncomingHeader.BADGE_REQUEST_FULFILLED, IsBadgeRequestFulfilledEvent); this._events.set(IncomingHeader.USER_CLOTHING, FigureSetIdsMessageEvent); - - // FURNITURE this._events.set(IncomingHeader.USER_FURNITURE_ADD, FurnitureListAddOrUpdateEvent); this._events.set(IncomingHeader.USER_FURNITURE, FurnitureListEvent); this._events.set(IncomingHeader.USER_FURNITURE_REFRESH, FurnitureListInvalidateEvent); this._events.set(IncomingHeader.USER_FURNITURE_REMOVE, FurnitureListRemovedEvent); this._events.set(IncomingHeader.USER_FURNITURE_POSTIT_PLACED, FurniturePostItPlacedEvent); - - // TRADING + this._events.set(IncomingHeader.USER_PETS, PetInventoryEvent); + this._events.set(IncomingHeader.USER_PET_REMOVE, PetRemovedFromInventory); + this._events.set(IncomingHeader.USER_PET_ADD, PetAddedToInventoryEvent); + this._events.set(IncomingHeader.PET_RECEIVED, PetReceivedMessageEvent); + this._events.set(IncomingHeader.PET_PLACING_ERROR, PetPlacingErrorEvent); this._events.set(IncomingHeader.TRADE_ACCEPTED, TradingAcceptEvent); this._events.set(IncomingHeader.TRADE_CLOSED, TradingCloseEvent); this._events.set(IncomingHeader.TRADE_COMPLETED, TradingCompletedEvent); @@ -628,10 +637,32 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.TRADE_OTHER_NOT_ALLOWED, TradingOtherNotAllowedEvent); this._events.set(IncomingHeader.TRADE_YOU_NOT_ALLOWED, TradingYouAreNotAllowedEvent); + // LANDING VIEW + this._events.set(IncomingHeader.COMMUNITY_GOAL_VOTE_EVENT, CommunityGoalVoteMessageEvent); + this._events.set(IncomingHeader.PROMO_ARTICLES, PromoArticlesMessageEvent); + + // MARKETPLACE + this._events.set(IncomingHeader.MARKETPLACE_AFTER_ORDER_STATUS, MarketplaceBuyOfferResultEvent); + this._events.set(IncomingHeader.MARKETPLACE_CANCEL_SALE, MarketplaceCancelOfferResultEvent); + this._events.set(IncomingHeader.MARKETPLACE_SELL_ITEM, MarketplaceCanMakeOfferResult); + this._events.set(IncomingHeader.MARKETPLACE_CONFIG, MarketplaceConfigurationEvent); + this._events.set(IncomingHeader.MARKETPLACE_ITEM_STATS, MarketplaceItemStatsEvent); + this._events.set(IncomingHeader.MARKETPLACE_ITEM_POSTED, MarketplaceMakeOfferResult); + this._events.set(IncomingHeader.MARKETPLACE_ITEMS_SEARCHED, MarketPlaceOffersEvent); + this._events.set(IncomingHeader.MARKETPLACE_OWN_ITEMS, MarketplaceOwnOffersEvent); + + // MODERATION + this._events.set(IncomingHeader.MARKETPLACE_OWN_ITEMS, UserBannedMessageEvent); + this._events.set(IncomingHeader.MODERATION_CAUTION, ModeratorCautionEvent); + // MODTOOL this._events.set(IncomingHeader.MODTOOL_ROOM_INFO, ModtoolRoomInfoEvent); this._events.set(IncomingHeader.MODTOOL_USER_CHATLOG, ModtoolUserChatlogEvent); this._events.set(IncomingHeader.MODTOOL_ROOM_CHATLOG, ModtoolRoomChatlogEvent); + this._events.set(IncomingHeader.MODERATION_USER_INFO, ModtoolUserInfoEvent); + this._events.set(IncomingHeader.MODERATION_TOPICS, ModtoolCallForHelpTopicsEvent); + this._events.set(IncomingHeader.MODERATION_TOOL, ModtoolMainEvent); + this._events.set(IncomingHeader.MODTOOL_VISITED_ROOMS_USER, ModtoolReceivedRoomsUserEvent); // MYSTERY BOX this._events.set(IncomingHeader.MYSTERY_BOX_KEYS, MysteryBoxKeysEvent); @@ -653,31 +684,38 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.MOTD_MESSAGES, MOTDNotificationEvent); this._events.set(IncomingHeader.NOTIFICATION_LIST, NotificationDialogMessageEvent); this._events.set(IncomingHeader.UNSEEN_ITEMS, UnseenItemsEvent); - this._events.set(IncomingHeader.HOTEL_WILL_SHUTDOWN, HotelWillShutdownEvent); this._events.set(IncomingHeader.ACHIEVEMENT_NOTIFICATION, AchievementNotificationMessageEvent); this._events.set(IncomingHeader.INFO_FEED_ENABLE, InfoFeedEnableMessageEvent); this._events.set(IncomingHeader.CLUB_GIFT_NOTIFICATION, ClubGiftNotificationEvent); this._events.set(IncomingHeader.MODERATOR_MESSAGE, ModeratorMessageEvent); this._events.set(IncomingHeader.ACTIVITY_POINT_NOTIFICATION, ActivityPointNotificationMessageEvent); + this._events.set(IncomingHeader.BOT_ERROR, BotErrorEvent); + this._events.set(IncomingHeader.PET_LEVEL_NOTIFICATION, PetLevelNotificationEvent); + + // QUEST + this._events.set(IncomingHeader.COMMUNITY_GOAL_EARNED_PRIZES, CommunityGoalEarnedPrizesMessageEvent); + this._events.set(IncomingHeader.COMMUNITY_GOAL_PROGRESS, CommunityGoalProgressMessageEvent); + this._events.set(IncomingHeader.CONCURRENT_USERS_GOAL_PROGRESS, ConcurrentUsersGoalProgressMessageEvent); + this._events.set(IncomingHeader.QUEST_DAILY, QuestDailyMessageEvent); + this._events.set(IncomingHeader.QUEST_CANCELLED, QuestCancelledMessageEvent); + this._events.set(IncomingHeader.QUEST_COMPLETED, QuestCompletedMessageEvent); + this._events.set(IncomingHeader.COMMUNITY_GOAL_HALL_OF_FAME, CommunityGoalHallOfFameMessageEvent); + this._events.set(IncomingHeader.EPIC_POPUP, EpicPopupMessageEvent); + this._events.set(IncomingHeader.SEASONAL_QUESTS, SeasonalQuestsMessageEvent); + this._events.set(IncomingHeader.QUESTS, QuestsMessageEvent); + this._events.set(IncomingHeader.QUEST, QuestMessageEvent); // ROOM - - // ACCESS this._events.set(IncomingHeader.ROOM_ENTER_ERROR, RoomEnterErrorEvent); this._events.set(IncomingHeader.ROOM_ENTER, RoomEnterEvent); this._events.set(IncomingHeader.ROOM_FORWARD, RoomForwardEvent); - - // DOORBELL this._events.set(IncomingHeader.ROOM_DOORBELL, RoomDoorbellEvent); this._events.set(IncomingHeader.ROOM_DOORBELL_ACCEPTED, RoomDoorbellAcceptedEvent); this._events.set(IncomingHeader.ROOM_DOORBELL_REJECTED, RoomDoorbellRejectedEvent); - - // RIGHTS this._events.set(IncomingHeader.ROOM_RIGHTS_CLEAR, RoomRightsClearEvent); this._events.set(IncomingHeader.ROOM_RIGHTS_OWNER, RoomRightsOwnerEvent); this._events.set(IncomingHeader.ROOM_RIGHTS, RoomRightsEvent); - - // DATA + this._events.set(IncomingHeader.BOT_COMMAND_CONFIGURATION, BotCommandConfigurationEvent); this._events.set(IncomingHeader.ROOM_SETTINGS_CHAT, RoomChatSettingsEvent); this._events.set(IncomingHeader.ROOM_INFO, RoomInfoEvent); this._events.set(IncomingHeader.ROOM_INFO_OWNER, RoomInfoOwnerEvent); @@ -688,16 +726,16 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.ROOM_SETTINGS_UPDATED, RoomSettingsUpdatedEvent); this._events.set(IncomingHeader.ROOM_RIGHTS_LIST, RoomUsersWithRightsEvent); this._events.set(IncomingHeader.ROOM_BAN_LIST, RoomBannedUsersEvent); - - // ENGINE this._events.set(IncomingHeader.ROOM_ROLLING, ObjectsRollingEvent); this._events.set(IncomingHeader.ROOM_CREATED, RoomCreatedEvent); - - // BOTS - this._events.set(IncomingHeader.BOT_COMMAND_CONFIGURATION, BotCommandConfigurationEvent); - this._events.set(IncomingHeader.BOT_ERROR, BotErrorEvent); - - // FURNITURE + this._events.set(IncomingHeader.FURNITURE_FLOOR_ADD, FurnitureFloorAddEvent); + this._events.set(IncomingHeader.FURNITURE_FLOOR, FurnitureFloorEvent); + this._events.set(IncomingHeader.FURNITURE_FLOOR_REMOVE, FurnitureFloorRemoveEvent); + this._events.set(IncomingHeader.FURNITURE_FLOOR_UPDATE, FurnitureFloorUpdateEvent); + this._events.set(IncomingHeader.ITEM_WALL_ADD, FurnitureWallAddEvent); + this._events.set(IncomingHeader.ITEM_WALL, FurnitureWallEvent); + this._events.set(IncomingHeader.ITEM_WALL_REMOVE, FurnitureWallRemoveEvent); + this._events.set(IncomingHeader.ITEM_WALL_UPDATE, FurnitureWallUpdateEvent); this._events.set(IncomingHeader.FURNITURE_ALIASES, FurnitureAliasesEvent); this._events.set(IncomingHeader.FURNITURE_DATA, FurnitureDataEvent); this._events.set(IncomingHeader.FURNITURE_ITEMDATA, FurnitureItemDataEvent); @@ -710,20 +748,6 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.LOVELOCK_FURNI_START, LoveLockFurniStartEvent); this._events.set(IncomingHeader.OBJECTS_DATA_UPDATE, ObjectsDataUpdateEvent); this._events.set(IncomingHeader.FURNITURE_GROUP_CONTEXT_MENU_INFO, GroupFurniContextMenuInfoMessageEvent); - - // FLOOR - this._events.set(IncomingHeader.FURNITURE_FLOOR_ADD, FurnitureFloorAddEvent); - this._events.set(IncomingHeader.FURNITURE_FLOOR, FurnitureFloorEvent); - this._events.set(IncomingHeader.FURNITURE_FLOOR_REMOVE, FurnitureFloorRemoveEvent); - this._events.set(IncomingHeader.FURNITURE_FLOOR_UPDATE, FurnitureFloorUpdateEvent); - - // WALL - this._events.set(IncomingHeader.ITEM_WALL_ADD, FurnitureWallAddEvent); - this._events.set(IncomingHeader.ITEM_WALL, FurnitureWallEvent); - this._events.set(IncomingHeader.ITEM_WALL_REMOVE, FurnitureWallRemoveEvent); - this._events.set(IncomingHeader.ITEM_WALL_UPDATE, FurnitureWallUpdateEvent); - - // MAPPING this._events.set(IncomingHeader.ROOM_MODEL_DOOR, RoomDoorEvent); this._events.set(IncomingHeader.ROOM_HEIGHT_MAP, RoomHeightMapEvent); this._events.set(IncomingHeader.ROOM_HEIGHT_MAP_UPDATE, RoomHeightMapUpdateEvent); @@ -732,16 +756,10 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.ROOM_PAINT, RoomPaintEvent); this._events.set(IncomingHeader.ROOM_THICKNESS, RoomThicknessEvent); this._events.set(IncomingHeader.ROOM_MODEL_BLOCKED_TILES, RoomBlockedTilesEvent); - - // PET this._events.set(IncomingHeader.PET_FIGURE_UPDATE, PetFigureUpdateEvent); this._events.set(IncomingHeader.PET_INFO, PetInfoEvent); this._events.set(IncomingHeader.PET_EXPERIENCE, PetExperienceEvent); - - // SESSION this._events.set(IncomingHeader.PLAYING_GAME, YouArePlayingGameEvent); - - // UNIT this._events.set(IncomingHeader.UNIT_DANCE, RoomUnitDanceEvent); this._events.set(IncomingHeader.UNIT_EFFECT, RoomUnitEffectEvent); this._events.set(IncomingHeader.UNIT, RoomUnitEvent); @@ -753,8 +771,6 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.UNIT_REMOVE, RoomUnitRemoveEvent); this._events.set(IncomingHeader.UNIT_STATUS, RoomUnitStatusEvent); this._events.set(IncomingHeader.HAND_ITEM_RECEIVED, RoomUnitHandItemReceivedEvent); - - // CHAT this._events.set(IncomingHeader.FLOOD_CONTROL, FloodControlEvent); this._events.set(IncomingHeader.REMAINING_MUTE, RemainingMuteEvent); this._events.set(IncomingHeader.UNIT_CHAT, RoomUnitChatEvent); @@ -775,98 +791,6 @@ export class NitroMessages implements IMessageConfiguration // SECURITY this._events.set(IncomingHeader.AUTHENTICATED, AuthenticatedEvent); - // USER - this._events.set(IncomingHeader.IN_CLIENT_LINK, InClientLinkEvent); - this._events.set(IncomingHeader.USER_IGNORED, IgnoredUsersEvent); - this._events.set(IncomingHeader.USER_IGNORED_RESULT, IgnoreResultEvent); - this._events.set(IncomingHeader.USER_RESPECT, RespectReceivedEvent); - - // BADGES - this._events.set(IncomingHeader.USER_BADGES, BadgesEvent); - this._events.set(IncomingHeader.USER_BADGES_ADD, BadgeReceivedEvent); - this._events.set(IncomingHeader.BADGE_POINT_LIMITS, BadgePointLimitsEvent); - this._events.set(IncomingHeader.BADGE_REQUEST_FULFILLED, IsBadgeRequestFulfilledEvent); - - // ACCESS - this._events.set(IncomingHeader.USER_PERKS, UserPerksEvent); - this._events.set(IncomingHeader.USER_PERMISSIONS, UserPermissionsEvent); - - // DATA - this._events.set(IncomingHeader.USER_BADGES_CURRENT, UserCurrentBadgesEvent); - this._events.set(IncomingHeader.USER_INFO, UserInfoEvent); - this._events.set(IncomingHeader.UNIT_CHANGE_NAME, UserNameChangeMessageEvent); - this._events.set(IncomingHeader.USER_SETTINGS, UserSettingsEvent); - this._events.set(IncomingHeader.USER_PROFILE, UserProfileEvent); - this._events.set(IncomingHeader.MESSENGER_RELATIONSHIPS, RelationshipStatusInfoEvent); - - // GIFTS - this._events.set(IncomingHeader.GIFT_OPENED, PresentOpenedMessageEvent); - - // INVENTORY - - // BOTS - this._events.set(IncomingHeader.USER_BOTS, BotInventoryMessageEvent); - this._events.set(IncomingHeader.REMOVE_BOT_FROM_INVENTORY, BotRemovedFromInventoryEvent); - this._events.set(IncomingHeader.ADD_BOT_TO_INVENTORY, BotAddedToInventoryEvent); - - // CURRENCY - this._events.set(IncomingHeader.USER_CREDITS, UserCreditsEvent); - this._events.set(IncomingHeader.USER_CURRENCY, UserCurrencyEvent); - - // SUBSCRIPTION - this._events.set(IncomingHeader.USER_SUBSCRIPTION, UserSubscriptionEvent); - - // GAMES - this._events.set(IncomingHeader.LOAD_GAME_URL, LoadGameUrlEvent); - - // WARDROBE - this._events.set(IncomingHeader.USER_WARDROBE_PAGE, UserWardrobePageEvent); - - // PETS - this._events.set(IncomingHeader.USER_PETS, PetInventoryEvent); - this._events.set(IncomingHeader.USER_PET_REMOVE, PetRemovedFromInventory); - this._events.set(IncomingHeader.USER_PET_ADD, PetAddedToInventoryEvent); - this._events.set(IncomingHeader.PET_PLACING_ERROR, PetPlacingErrorEvent); - - // MOD TOOL - this._events.set(IncomingHeader.MODERATION_USER_INFO, ModtoolUserInfoEvent); - this._events.set(IncomingHeader.MODERATION_TOPICS, ModtoolCallForHelpTopicsEvent); - this._events.set(IncomingHeader.MODERATION_TOOL, ModtoolMainEvent); - this._events.set(IncomingHeader.MODTOOL_VISITED_ROOMS_USER, ModtoolReceivedRoomsUserEvent); - - // MARKETPLACE - this._events.set(IncomingHeader.MARKETPLACE_AFTER_ORDER_STATUS, MarketplaceBuyOfferResultEvent); - this._events.set(IncomingHeader.MARKETPLACE_CANCEL_SALE, MarketplaceCancelOfferResultEvent); - this._events.set(IncomingHeader.MARKETPLACE_SELL_ITEM, MarketplaceCanMakeOfferResult); - this._events.set(IncomingHeader.MARKETPLACE_CONFIG, MarketplaceConfigurationEvent); - this._events.set(IncomingHeader.MARKETPLACE_ITEM_STATS, MarketplaceItemStatsEvent); - this._events.set(IncomingHeader.MARKETPLACE_ITEM_POSTED, MarketplaceMakeOfferResult); - this._events.set(IncomingHeader.MARKETPLACE_ITEMS_SEARCHED, MarketPlaceOffersEvent); - this._events.set(IncomingHeader.MARKETPLACE_OWN_ITEMS, MarketplaceOwnOffersEvent); - - // LANDING VIEW - this._events.set(IncomingHeader.COMMUNITY_GOAL_VOTE_EVENT, CommunityGoalVoteMessageEvent); - this._events.set(IncomingHeader.PROMO_ARTICLES, PromoArticlesMessageEvent); - - // QUESTS - this._events.set(IncomingHeader.COMMUNITY_GOAL_EARNED_PRIZES, CommunityGoalEarnedPrizesMessageEvent); - this._events.set(IncomingHeader.COMMUNITY_GOAL_PROGRESS, CommunityGoalProgressMessageEvent); - this._events.set(IncomingHeader.CONCURRENT_USERS_GOAL_PROGRESS, ConcurrentUsersGoalProgressMessageEvent); - this._events.set(IncomingHeader.QUEST_DAILY, QuestDailyMessageEvent); - this._events.set(IncomingHeader.QUEST_CANCELLED, QuestCancelledMessageEvent); - this._events.set(IncomingHeader.QUEST_COMPLETED, QuestCompletedMessageEvent); - this._events.set(IncomingHeader.COMMUNITY_GOAL_HALL_OF_FAME, CommunityGoalHallOfFameMessageEvent); - this._events.set(IncomingHeader.EPIC_POPUP, EpicPopupMessageEvent); - this._events.set(IncomingHeader.SEASONAL_QUESTS, SeasonalQuestsMessageEvent); - this._events.set(IncomingHeader.QUESTS, QuestsMessageEvent); - this._events.set(IncomingHeader.QUEST, QuestMessageEvent); - - // CRAFTING - this._events.set(IncomingHeader.CRAFTABLE_PRODUCTS, CraftableProductsEvent); - this._events.set(IncomingHeader.CRAFTING_RECIPE, CraftingRecipeEvent); - this._events.set(IncomingHeader.CRAFTING_RECIPES_AVAILABLE, CraftingRecipesAvailableEvent); - this._events.set(IncomingHeader.CRAFTING_RESULT, CraftingResultEvent); - // SOUNDS this._events.set(IncomingHeader.JUKEBOX_PLAYLIST_FULL, JukeboxPlayListFullMessageEvent); this._events.set(IncomingHeader.JUKEBOX_SONG_DISKS, JukeboxSongDisksMessageEvent); @@ -877,8 +801,28 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.TRAX_SONG_INFO, TraxSongInfoMessageEvent); this._events.set(IncomingHeader.USER_SONG_DISKS_INVENTORY, UserSongDisksInventoryMessageEvent); - // HELPER - this._events.set(IncomingHeader.HELPER_TALENT_TRACK, TalentTrackEvent); + // USER + this._events.set(IncomingHeader.IN_CLIENT_LINK, InClientLinkEvent); + this._events.set(IncomingHeader.USER_IGNORED, IgnoredUsersEvent); + this._events.set(IncomingHeader.USER_IGNORED_RESULT, IgnoreResultEvent); + this._events.set(IncomingHeader.USER_RESPECT, RespectReceivedEvent); + this._events.set(IncomingHeader.USER_PERKS, UserPerksEvent); + this._events.set(IncomingHeader.USER_PERMISSIONS, UserPermissionsEvent); + this._events.set(IncomingHeader.USER_BADGES_CURRENT, UserCurrentBadgesEvent); + this._events.set(IncomingHeader.USER_INFO, UserInfoEvent); + this._events.set(IncomingHeader.UNIT_CHANGE_NAME, UserNameChangeMessageEvent); + this._events.set(IncomingHeader.USER_SETTINGS, UserSettingsEvent); + this._events.set(IncomingHeader.USER_PROFILE, UserProfileEvent); + this._events.set(IncomingHeader.MESSENGER_RELATIONSHIPS, RelationshipStatusInfoEvent); + this._events.set(IncomingHeader.GIFT_OPENED, PresentOpenedMessageEvent); + this._events.set(IncomingHeader.USER_CREDITS, UserCreditsEvent); + this._events.set(IncomingHeader.USER_CURRENCY, UserCurrencyEvent); + this._events.set(IncomingHeader.USER_SUBSCRIPTION, UserSubscriptionEvent); + this._events.set(IncomingHeader.USER_WARDROBE_PAGE, UserWardrobePageEvent); + + this._events.set(IncomingHeader.GENERIC_ERROR, GenericErrorEvent); + this._events.set(IncomingHeader.GROUP_LIST, GuildMembershipsMessageEvent); + this._events.set(IncomingHeader.CATALOG_APPROVE_NAME_RESULT, ApproveNameMessageEvent); } private registerComposers(): void diff --git a/src/nitro/communication/messages/incoming/IncomingHeader.ts b/src/nitro/communication/messages/incoming/IncomingHeader.ts index 736bec3a..4fa3e630 100644 --- a/src/nitro/communication/messages/incoming/IncomingHeader.ts +++ b/src/nitro/communication/messages/incoming/IncomingHeader.ts @@ -168,7 +168,6 @@ export class IncomingHeader public static USER_BADGES = 717; public static USER_BADGES_ADD = 2493; public static USER_BADGES_CURRENT = 1087; - public static USER_BOT_ADD = 1352; public static USER_BOT_REMOVE = 233; public static USER_BOTS = 3086; public static USER_CHANGE_NAME = 118; @@ -221,7 +220,6 @@ export class IncomingHeader public static LOVELOCK_FURNI_FINISHED = 770; public static GIFT_RECEIVER_NOT_FOUND = 1517; public static GIFT_OPENED = 56; - public static HOTEL_WILL_SHUTDOWN = 1050; public static FLOOD_CONTROL = 566; public static REMAINING_MUTE = 826; public static USER_EFFECT_LIST = 340; @@ -318,4 +316,9 @@ export class IncomingHeader public static BADGE_POINT_LIMITS = 2501; public static BADGE_REQUEST_FULFILLED = 2998; public static HELPER_TALENT_TRACK = 3406; + public static USER_BANNED = 1683; + public static BOT_RECEIVED = 3684; + public static PET_LEVEL_NOTIFICATION = 859; + public static PET_RECEIVED = 1111; + public static MODERATION_CAUTION = 1890; } diff --git a/src/nitro/communication/messages/incoming/inventory/bots/BotAddedToInventoryEvent.ts b/src/nitro/communication/messages/incoming/bots/BotAddedToInventoryEvent.ts similarity index 51% rename from src/nitro/communication/messages/incoming/inventory/bots/BotAddedToInventoryEvent.ts rename to src/nitro/communication/messages/incoming/bots/BotAddedToInventoryEvent.ts index 926163a0..710d708e 100644 --- a/src/nitro/communication/messages/incoming/inventory/bots/BotAddedToInventoryEvent.ts +++ b/src/nitro/communication/messages/incoming/bots/BotAddedToInventoryEvent.ts @@ -1,6 +1,6 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { BotAddedToInventoryParser } from '../../../parser/inventory/bots/BotAddedToInventoryParser'; +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { BotAddedToInventoryParser } from '../../parser/bots/BotAddedToInventoryParser'; export class BotAddedToInventoryEvent extends MessageEvent implements IMessageEvent { diff --git a/src/nitro/communication/messages/incoming/inventory/bots/BotInventoryMessageEvent.ts b/src/nitro/communication/messages/incoming/bots/BotInventoryMessageEvent.ts similarity index 51% rename from src/nitro/communication/messages/incoming/inventory/bots/BotInventoryMessageEvent.ts rename to src/nitro/communication/messages/incoming/bots/BotInventoryMessageEvent.ts index 15538d67..a1473591 100644 --- a/src/nitro/communication/messages/incoming/inventory/bots/BotInventoryMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/bots/BotInventoryMessageEvent.ts @@ -1,6 +1,6 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { BotInventoryMessageParser } from '../../../parser/inventory/bots/BotInventoryMessageParser'; +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { BotInventoryMessageParser } from '../../parser/bots/BotInventoryMessageParser'; export class BotInventoryMessageEvent extends MessageEvent implements IMessageEvent { diff --git a/src/nitro/communication/messages/incoming/bots/BotReceivedMessageEvent.ts b/src/nitro/communication/messages/incoming/bots/BotReceivedMessageEvent.ts new file mode 100644 index 00000000..2a1d77a6 --- /dev/null +++ b/src/nitro/communication/messages/incoming/bots/BotReceivedMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { BotReceivedMessageParser } from '../../parser/bots/BotReceivedMessageParser'; + +export class BotReceivedMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, BotReceivedMessageParser); + } + + public getParser(): BotReceivedMessageParser + { + return this.parser as BotReceivedMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/inventory/bots/BotRemovedFromInventoryEvent.ts b/src/nitro/communication/messages/incoming/bots/BotRemovedFromInventoryEvent.ts similarity index 52% rename from src/nitro/communication/messages/incoming/inventory/bots/BotRemovedFromInventoryEvent.ts rename to src/nitro/communication/messages/incoming/bots/BotRemovedFromInventoryEvent.ts index b0742936..ffe8fdc7 100644 --- a/src/nitro/communication/messages/incoming/inventory/bots/BotRemovedFromInventoryEvent.ts +++ b/src/nitro/communication/messages/incoming/bots/BotRemovedFromInventoryEvent.ts @@ -1,6 +1,6 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { BotRemovedFromInventoryParser } from '../../../parser/inventory/bots/BotRemovedFromInventoryParser'; +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { BotRemovedFromInventoryParser } from '../../parser/bots/BotRemovedFromInventoryParser'; export class BotRemovedFromInventoryEvent extends MessageEvent implements IMessageEvent { diff --git a/src/nitro/communication/messages/incoming/inventory/bots/index.ts b/src/nitro/communication/messages/incoming/bots/index.ts similarity index 75% rename from src/nitro/communication/messages/incoming/inventory/bots/index.ts rename to src/nitro/communication/messages/incoming/bots/index.ts index c89ec936..dde10bf2 100644 --- a/src/nitro/communication/messages/incoming/inventory/bots/index.ts +++ b/src/nitro/communication/messages/incoming/bots/index.ts @@ -1,4 +1,4 @@ export * from './BotAddedToInventoryEvent'; -export * from './BotInventoryEvent'; export * from './BotInventoryMessageEvent'; +export * from './BotReceivedMessageEvent'; export * from './BotRemovedFromInventoryEvent'; diff --git a/src/nitro/communication/messages/incoming/catalog/ClubGiftSelectedEvent.ts b/src/nitro/communication/messages/incoming/catalog/ClubGiftSelectedEvent.ts index d9ed2588..da108e45 100644 --- a/src/nitro/communication/messages/incoming/catalog/ClubGiftSelectedEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/ClubGiftSelectedEvent.ts @@ -1,16 +1,16 @@ import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; -import { ClubGiftInfoParser } from '../../parser'; +import { ClubGiftSelectedParser } from '../../parser'; export class ClubGiftSelectedEvent extends MessageEvent implements IMessageEvent { constructor(callBack: Function) { - super(callBack, ClubGiftInfoParser); + super(callBack, ClubGiftSelectedParser); } - public getParser(): ClubGiftInfoParser + public getParser(): ClubGiftSelectedParser { - return this.parser as ClubGiftInfoParser; + return this.parser as ClubGiftSelectedParser; } } diff --git a/src/nitro/communication/messages/incoming/index.ts b/src/nitro/communication/messages/incoming/index.ts index f1552983..39f22de2 100644 --- a/src/nitro/communication/messages/incoming/index.ts +++ b/src/nitro/communication/messages/incoming/index.ts @@ -1,6 +1,7 @@ export * from './advertisement'; export * from './availability'; export * from './avatar'; +export * from './bots'; export * from './camera'; export * from './catalog'; export * from './client'; @@ -15,7 +16,6 @@ export * from './inventory'; export * from './inventory/achievements'; export * from './inventory/avatareffect'; export * from './inventory/badges'; -export * from './inventory/bots'; export * from './inventory/clothes'; export * from './inventory/furni'; export * from './inventory/furni/gifts'; @@ -23,6 +23,7 @@ export * from './inventory/pets'; export * from './inventory/trading'; export * from './landingview'; export * from './marketplace'; +export * from './moderation'; export * from './modtool'; export * from './mysterybox'; export * from './navigator'; diff --git a/src/nitro/communication/messages/incoming/inventory/bots/BotInventoryEvent.ts b/src/nitro/communication/messages/incoming/inventory/bots/BotInventoryEvent.ts deleted file mode 100644 index e5452974..00000000 --- a/src/nitro/communication/messages/incoming/inventory/bots/BotInventoryEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { BotInventoryParser } from '../../../parser/inventory/bots/BotReceivedMessageParser'; - -export class BotInventoryEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, BotInventoryParser); - } - - public getParser(): BotInventoryParser - { - return this.parser as BotInventoryParser; - } -} diff --git a/src/nitro/communication/messages/incoming/inventory/index.ts b/src/nitro/communication/messages/incoming/inventory/index.ts index 54d73f27..6146ac07 100644 --- a/src/nitro/communication/messages/incoming/inventory/index.ts +++ b/src/nitro/communication/messages/incoming/inventory/index.ts @@ -1,7 +1,6 @@ export * from './achievements'; export * from './avatareffect'; export * from './badges'; -export * from './bots'; export * from './clothes'; export * from './furni'; export * from './pets'; diff --git a/src/nitro/communication/messages/incoming/inventory/pets/PetReceivedMessageEvent.ts b/src/nitro/communication/messages/incoming/inventory/pets/PetReceivedMessageEvent.ts new file mode 100644 index 00000000..cfa6603b --- /dev/null +++ b/src/nitro/communication/messages/incoming/inventory/pets/PetReceivedMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; +import { PetReceivedMessageParser } from '../../../parser/inventory/pets/PetReceivedMessageParser'; + +export class PetReceivedMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, PetReceivedMessageParser); + } + + public getParser(): PetReceivedMessageParser + { + return this.parser as PetReceivedMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/inventory/pets/index.ts b/src/nitro/communication/messages/incoming/inventory/pets/index.ts index 6e171c0d..3ed03eb2 100644 --- a/src/nitro/communication/messages/incoming/inventory/pets/index.ts +++ b/src/nitro/communication/messages/incoming/inventory/pets/index.ts @@ -1,3 +1,4 @@ export * from './PetAddedToInventoryEvent'; export * from './PetInventoryEvent'; +export * from './PetReceivedMessageEvent'; export * from './PetRemovedFromInventoryEvent'; diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorCautionEvent.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorCautionEvent.ts new file mode 100644 index 00000000..9b14a0b9 --- /dev/null +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorCautionEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { ModerationCautionParser } from '../../parser/moderation'; + +export class ModeratorCautionEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ModerationCautionParser); + } + + public getParser(): ModerationCautionParser + { + return this.parser as ModerationCautionParser; + } +} diff --git a/src/nitro/communication/messages/incoming/moderation/UserBannedMessageEvent.ts b/src/nitro/communication/messages/incoming/moderation/UserBannedMessageEvent.ts new file mode 100644 index 00000000..e30f5cd7 --- /dev/null +++ b/src/nitro/communication/messages/incoming/moderation/UserBannedMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { UserBannedMessageParser } from '../../parser/moderation'; + +export class UserBannedMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, UserBannedMessageParser); + } + + public getParser(): UserBannedMessageParser + { + return this.parser as UserBannedMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/moderation/index.ts b/src/nitro/communication/messages/incoming/moderation/index.ts index 599d890b..51e7049b 100644 --- a/src/nitro/communication/messages/incoming/moderation/index.ts +++ b/src/nitro/communication/messages/incoming/moderation/index.ts @@ -1 +1,3 @@ export * from './INamed'; +export * from './ModeratorCautionEvent'; +export * from './UserBannedMessageEvent'; diff --git a/src/nitro/communication/messages/incoming/notifications/PetLevelNotificationEvent.ts b/src/nitro/communication/messages/incoming/notifications/PetLevelNotificationEvent.ts new file mode 100644 index 00000000..ae78db32 --- /dev/null +++ b/src/nitro/communication/messages/incoming/notifications/PetLevelNotificationEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { PetLevelNotificationParser } from '../../parser/notifications/PetLevelNotificationParser'; + +export class PetLevelNotificationEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, PetLevelNotificationParser); + } + + public getParser(): PetLevelNotificationParser + { + return this.parser as PetLevelNotificationParser; + } +} diff --git a/src/nitro/communication/messages/incoming/notifications/index.ts b/src/nitro/communication/messages/incoming/notifications/index.ts index 02fc474e..59453798 100644 --- a/src/nitro/communication/messages/incoming/notifications/index.ts +++ b/src/nitro/communication/messages/incoming/notifications/index.ts @@ -9,5 +9,6 @@ export * from './InfoFeedEnableMessageEvent'; export * from './ModeratorMessageEvent'; export * from './MOTDNotificationEvent'; export * from './NotificationDialogMessageEvent'; +export * from './PetLevelNotificationEvent'; export * from './PetPlacingErrorEvent'; export * from './UnseenItemsEvent'; diff --git a/src/nitro/communication/messages/parser/inventory/bots/BotAddedToInventoryParser.ts b/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts similarity index 97% rename from src/nitro/communication/messages/parser/inventory/bots/BotAddedToInventoryParser.ts rename to src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts index 63c4d122..e0576029 100644 --- a/src/nitro/communication/messages/parser/inventory/bots/BotAddedToInventoryParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; import { BotData } from './BotData'; export class BotAddedToInventoryParser implements IMessageParser diff --git a/src/nitro/communication/messages/parser/inventory/bots/BotData.ts b/src/nitro/communication/messages/parser/bots/BotData.ts similarity index 93% rename from src/nitro/communication/messages/parser/inventory/bots/BotData.ts rename to src/nitro/communication/messages/parser/bots/BotData.ts index 29afd162..410e51e0 100644 --- a/src/nitro/communication/messages/parser/inventory/bots/BotData.ts +++ b/src/nitro/communication/messages/parser/bots/BotData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../core'; export class BotData { diff --git a/src/nitro/communication/messages/parser/inventory/bots/BotInventoryMessageParser.ts b/src/nitro/communication/messages/parser/bots/BotInventoryMessageParser.ts similarity index 97% rename from src/nitro/communication/messages/parser/inventory/bots/BotInventoryMessageParser.ts rename to src/nitro/communication/messages/parser/bots/BotInventoryMessageParser.ts index e7c8e47d..7bc3a112 100644 --- a/src/nitro/communication/messages/parser/inventory/bots/BotInventoryMessageParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotInventoryMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; import { BotData } from './BotData'; export class BotInventoryMessageParser implements IMessageParser diff --git a/src/nitro/communication/messages/parser/inventory/bots/BotReceivedMessageParser.ts b/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts similarity index 89% rename from src/nitro/communication/messages/parser/inventory/bots/BotReceivedMessageParser.ts rename to src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts index 27aa4527..314b7eea 100644 --- a/src/nitro/communication/messages/parser/inventory/bots/BotReceivedMessageParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts @@ -1,7 +1,7 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; import { BotData } from './BotData'; -export class BotInventoryParser implements IMessageParser +export class BotReceivedMessageParser implements IMessageParser { private _boughtAsGift: boolean; private _item: BotData; diff --git a/src/nitro/communication/messages/parser/inventory/bots/BotRemovedFromInventoryParser.ts b/src/nitro/communication/messages/parser/bots/BotRemovedFromInventoryParser.ts similarity index 96% rename from src/nitro/communication/messages/parser/inventory/bots/BotRemovedFromInventoryParser.ts rename to src/nitro/communication/messages/parser/bots/BotRemovedFromInventoryParser.ts index c8a764f9..29f31e01 100644 --- a/src/nitro/communication/messages/parser/inventory/bots/BotRemovedFromInventoryParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotRemovedFromInventoryParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; export class BotRemovedFromInventoryParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/inventory/bots/index.ts b/src/nitro/communication/messages/parser/bots/index.ts similarity index 100% rename from src/nitro/communication/messages/parser/inventory/bots/index.ts rename to src/nitro/communication/messages/parser/bots/index.ts diff --git a/src/nitro/communication/messages/parser/index.ts b/src/nitro/communication/messages/parser/index.ts index a50fc39b..598c2b67 100644 --- a/src/nitro/communication/messages/parser/index.ts +++ b/src/nitro/communication/messages/parser/index.ts @@ -1,6 +1,7 @@ export * from './advertisement'; export * from './availability'; export * from './avatar'; +export * from './bots'; export * from './camera'; export * from './catalog'; export * from './client'; @@ -14,6 +15,7 @@ export * from './help'; export * from './inventory'; export * from './landingview'; export * from './marketplace'; +export * from './moderation'; export * from './modtool'; export * from './mysterybox'; export * from './navigator'; diff --git a/src/nitro/communication/messages/parser/inventory/index.ts b/src/nitro/communication/messages/parser/inventory/index.ts index b2dd91f8..01f6a810 100644 --- a/src/nitro/communication/messages/parser/inventory/index.ts +++ b/src/nitro/communication/messages/parser/inventory/index.ts @@ -1,7 +1,6 @@ export * from './achievements'; export * from './avatareffect'; export * from './badges'; -export * from './bots'; export * from './clothing'; export * from './furniture'; export * from './pets'; diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetBoughtNotificationMessageParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetBoughtNotificationMessageParser.ts deleted file mode 100644 index ba980978..00000000 --- a/src/nitro/communication/messages/parser/inventory/pets/PetBoughtNotificationMessageParser.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; -import { PetData } from './PetData'; - -export class PetBoughtNotificationMessageParser implements IMessageParser -{ - private _gift: boolean; - private _pet: PetData; - - public flush(): boolean - { - return true; - } - - public parse(k: IMessageDataWrapper): boolean - { - this._gift = k.readBoolean(); - this._pet = new PetData(k); - - return true; - } - - public get gift(): boolean - { - return this._gift; - } - - public get pet(): PetData - { - return this._pet; - } -} diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetReceivedMessageParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetReceivedMessageParser.ts new file mode 100644 index 00000000..83ad33c6 --- /dev/null +++ b/src/nitro/communication/messages/parser/inventory/pets/PetReceivedMessageParser.ts @@ -0,0 +1,34 @@ +import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { PetData } from './PetData'; + +export class PetReceivedMessageParser implements IMessageParser +{ + private _boughtAsGift: boolean; + private _pet: PetData; + + public flush(): boolean + { + this._boughtAsGift = false; + this._pet = null; + + return true; + } + + public parse(k: IMessageDataWrapper): boolean + { + this._boughtAsGift = k.readBoolean(); + this._pet = new PetData(k); + + return true; + } + + public get boughtAsGift(): boolean + { + return this._boughtAsGift; + } + + public get pet(): PetData + { + return this._pet; + } +} diff --git a/src/nitro/communication/messages/parser/inventory/pets/index.ts b/src/nitro/communication/messages/parser/inventory/pets/index.ts index 8a829173..a69532ac 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/index.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/index.ts @@ -3,9 +3,9 @@ export * from './ConfirmBreedingResultParser'; export * from './GoToBreedingNestFailureParser'; export * from './NestBreedingSuccessParser'; export * from './PetAddedToInventoryParser'; -export * from './PetBoughtNotificationMessageParser'; export * from './PetBreedingMessageParser'; export * from './PetData'; export * from './PetFigureDataParser'; export * from './PetInventoryParser'; +export * from './PetReceivedMessageParser'; export * from './PetRemovedFromInventoryParser'; diff --git a/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts b/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts new file mode 100644 index 00000000..a815a52a --- /dev/null +++ b/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts @@ -0,0 +1,35 @@ +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; + +export class ModerationCautionParser implements IMessageParser +{ + private _message: string; + private _url: string; + + public flush(): boolean + { + this._message = ''; + this._url = null; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._message = wrapper.readString(); + this._url = wrapper.readString(); + + return true; + } + + public get message(): string + { + return this._message; + } + + public get url(): string + { + return this._url; + } +} diff --git a/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts b/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts new file mode 100644 index 00000000..46d384da --- /dev/null +++ b/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts @@ -0,0 +1,27 @@ +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; + +export class UserBannedMessageParser implements IMessageParser +{ + private _message: string; + + public flush(): boolean + { + this._message = ''; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._message = wrapper.readString(); + + return true; + } + + public get message(): string + { + return this._message; + } +} diff --git a/src/nitro/communication/messages/parser/moderation/index.ts b/src/nitro/communication/messages/parser/moderation/index.ts new file mode 100644 index 00000000..aead77be --- /dev/null +++ b/src/nitro/communication/messages/parser/moderation/index.ts @@ -0,0 +1,2 @@ +export * from './ModerationCautionParser'; +export * from './UserBannedMessageParser'; diff --git a/src/nitro/communication/messages/parser/modtool/ModtoolCFHTopicsParser.ts b/src/nitro/communication/messages/parser/modtool/ModtoolCFHTopicsParser.ts index 42deee1b..4ae62e6d 100644 --- a/src/nitro/communication/messages/parser/modtool/ModtoolCFHTopicsParser.ts +++ b/src/nitro/communication/messages/parser/modtool/ModtoolCFHTopicsParser.ts @@ -4,6 +4,7 @@ import { CallForHelpCategoryData } from './utils/CallForHelpCategoryData'; export class ModtoolCFHTopicsParser implements IMessageParser { private _callForHelpCategories: CallForHelpCategoryData[]; + public flush(): boolean { return true; diff --git a/src/nitro/communication/messages/parser/notifications/PetLevelNotificationParser.ts b/src/nitro/communication/messages/parser/notifications/PetLevelNotificationParser.ts new file mode 100644 index 00000000..44b1e33f --- /dev/null +++ b/src/nitro/communication/messages/parser/notifications/PetLevelNotificationParser.ts @@ -0,0 +1,52 @@ +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { PetFigureDataParser } from '../inventory/pets/PetFigureDataParser'; + +export class PetLevelNotificationParser implements IMessageParser +{ + private _petId: number; + private _petName: string; + private _level: number; + private _figureData: PetFigureDataParser; + + public flush(): boolean + { + this._petId = -1; + this._petName = null; + this._level = 0; + this._figureData = null; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._petId = wrapper.readInt(); + this._petName = wrapper.readString(); + this._level = wrapper.readInt(); + this._figureData = new PetFigureDataParser(wrapper); + + return true; + } + + public get petId(): number + { + return this._petId; + } + + public get petName(): string + { + return this._petName; + } + + public get level(): number + { + return this._level; + } + + public get figureData(): PetFigureDataParser + { + return this._figureData; + } +} diff --git a/src/nitro/communication/messages/parser/notifications/index.ts b/src/nitro/communication/messages/parser/notifications/index.ts index 8991fac5..3837191f 100644 --- a/src/nitro/communication/messages/parser/notifications/index.ts +++ b/src/nitro/communication/messages/parser/notifications/index.ts @@ -8,5 +8,6 @@ export * from './InfoFeedEnableMessageParser'; export * from './ModeratorMessageParser'; export * from './MOTDNotificationParser'; export * from './NotificationDialogMessageParser'; +export * from './PetLevelNotificationParser'; export * from './PetPlacingErrorEventParser'; export * from './UnseenItemsParser'; diff --git a/src/nitro/room/IGetImageListener.ts b/src/nitro/room/IGetImageListener.ts index ad2592ef..4241e62f 100644 --- a/src/nitro/room/IGetImageListener.ts +++ b/src/nitro/room/IGetImageListener.ts @@ -1,7 +1,7 @@ -import { RenderTexture } from '@pixi/core'; +import { NitroRenderTexture } from '../..'; export interface IGetImageListener { - imageReady(id: number, texture: RenderTexture, image?: HTMLImageElement): void; + imageReady(id: number, texture: NitroRenderTexture, image?: HTMLImageElement): void; imageFailed(id: number): void; } diff --git a/src/nitro/room/preview/RoomPreviewer.ts b/src/nitro/room/preview/RoomPreviewer.ts index 68cdb8c0..1f84935d 100644 --- a/src/nitro/room/preview/RoomPreviewer.ts +++ b/src/nitro/room/preview/RoomPreviewer.ts @@ -160,7 +160,8 @@ export class RoomPreviewer parser.flush(); parser.parseModel(model, wallHeight, scale); - const wallGeometry = ( this._roomEngine as IRoomCreator).getLegacyWallGeometry(this._previewRoomId); + //@ts-ignore + const wallGeometry = (this._roomEngine as IRoomCreator).getLegacyWallGeometry(this._previewRoomId); if(!wallGeometry) return; diff --git a/src/nitro/session/IRoomSession.ts b/src/nitro/session/IRoomSession.ts index 682a11b8..d4847481 100644 --- a/src/nitro/session/IRoomSession.ts +++ b/src/nitro/session/IRoomSession.ts @@ -28,7 +28,7 @@ export interface IRoomSession extends IDisposable sendBanMessage(userId: number, type: string): void; sendGiveRightsMessage(userId: number): void; sendTakeRightsMessage(userId: number): void; - updateMoodlightData(_Str_25037: number, _Str_24446: number, color: number, brightness: number, apply: boolean): void; + updateMoodlightData(id: number, effectId: number, color: number, brightness: number, apply: boolean): void; toggleMoodlightState(): void; pickupPet(id: number): void; pickupBot(id: number): void; diff --git a/src/nitro/session/RoomSession.ts b/src/nitro/session/RoomSession.ts index 3858d63e..34df6dff 100644 --- a/src/nitro/session/RoomSession.ts +++ b/src/nitro/session/RoomSession.ts @@ -225,11 +225,12 @@ export class RoomSession extends Disposable implements IRoomSession this._connection.send(new RoomTakeRightsComposer(userId)); } - public updateMoodlightData(id: number, _Str_24446: number, color: number, brightness: number, apply: boolean): void + public updateMoodlightData(id: number, effectId: number, color: number, brightness: number, apply: boolean): void { - const local6 = '000000' + color.toString(16).toUpperCase(); - const local7 = '#' + local6.substring((local6.length - 6)); - this.connection.send(new MoodlightSettingsSaveComposer(id, _Str_24446, local7, brightness, apply)); + let colorString = '000000' + color.toString(16).toUpperCase(); + colorString = '#' + colorString.substring((colorString.length - 6)); + + this.connection.send(new MoodlightSettingsSaveComposer(id, effectId, colorString, brightness, apply)); } public toggleMoodlightState(): void