From df97afd3f129a43d9e27f25bcf3757bbfb20dd61 Mon Sep 17 00:00:00 2001 From: skeletor Date: Sat, 18 Jun 2022 04:55:42 +0000 Subject: [PATCH] Navigator packets --- src/nitro/communication/NitroMessages.ts | 126 ++++--- .../messages/incoming/IncomingHeader.ts | 13 +- .../incoming/navigator/CanCreateRoomEvent.ts | 16 + .../CategoriesWithVisitorCountEvent.ts | 16 + .../CompetitionRoomsDataMessageEvent.ts | 16 + .../navigator/ConvertedRoomIdEvent.ts | 16 + .../navigator/DoorbellMessageEvent.ts | 21 ++ .../navigator/FavouriteChangedEvent.ts | 16 + .../incoming/navigator/FavouritesEvent.ts | 16 + .../navigator/FlatAccessDeniedMessageEvent.ts | 16 + .../incoming/navigator/FlatCreatedEvent.ts | 16 + .../navigator/GetGuestRoomResultEvent.ts | 16 + .../navigator/GuestRoomSearchResultEvent.ts | 16 + .../navigator/NavigatorCategoriesEvent.ts | 16 - .../NavigatorEventCategoriesEvent.ts | 16 - .../navigator/RoomEventCancelEvent.ts | 16 + .../incoming/navigator/RoomEventEvent.ts | 16 + .../RoomSettingsUpdatedEvent.ts | 6 +- .../RoomThumbnailUpdateResultEvent.ts | 16 + .../incoming/navigator/UserEventCatsEvent.ts | 16 + .../incoming/navigator/UserFlatCatsEvent.ts | 16 + .../messages/incoming/navigator/index.ts | 19 +- .../room/access/doorbell/RoomDoorbellEvent.ts | 21 -- .../doorbell/RoomDoorbellRejectedEvent.ts | 16 - .../incoming/room/access/doorbell/index.ts | 2 - .../room/data/GetGuestRoomResultEvent.ts | 16 - .../incoming/room/data/RoomSettingsEvent.ts | 16 - .../messages/incoming/room/data/index.ts | 5 - .../incoming/room/engine/RoomCreatedEvent.ts | 16 - .../messages/incoming/room/engine/index.ts | 1 - .../incoming/roomevents/RoomMutedEvent.ts | 16 - .../messages/incoming/roomevents/index.ts | 1 - .../roomsettings/MuteAllInRoomEvent.ts | 16 + .../incoming/roomsettings/NoSuchFlatEvent.ts | 16 + .../roomsettings}/RoomChatSettings.ts | 23 +- .../roomsettings}/RoomModerationSettings.ts | 15 +- .../incoming/roomsettings/RoomSettingsData.ts | 332 ++++++++++++++++++ .../roomsettings/RoomSettingsDataEvent.ts | 16 + .../RoomSettingsErrorEvent.ts | 6 +- .../RoomSettingsSaveErrorEvent.ts | 16 + .../RoomSettingsSavedEvent.ts | 6 +- .../ShowEnforceRoomCategoryDialogEvent.ts | 16 + .../roomsettings/UserUnbannedFromRoomEvent.ts | 16 + .../messages/incoming/roomsettings/index.ts | 8 + .../messages/outgoing/OutgoingHeader.ts | 33 +- .../handshake/ClientHelloMessageComposer.ts | 2 +- .../communication/messages/outgoing/index.ts | 1 + .../AddFavouriteRoomMessageComposer.ts | 21 ++ ...ser.ts => CanCreateRoomMessageComposer.ts} | 6 +- .../navigator/CancelEventMessageComposer.ts | 21 ++ .../CompetitionRoomsSearchMessageComposer.ts | 21 ++ .../CreateFlatMessageComposer.ts} | 6 +- .../DeleteFavouriteRoomMessageComposer.ts | 21 ++ .../navigator/EditEventMessageComposer.ts | 21 ++ ...ardToARandomPromotedRoomMessageComposer.ts | 21 ++ .../ForwardToSomeRoomMessageComposer.ts | 21 ++ ...tCategoriesWithUserCountMessageComposer.ts | 21 ++ .../GetGuestRoomMessageComposer.ts} | 6 +- .../GetOfficialRoomsMessageComposer.ts | 21 ++ .../GetPopularRoomTagsMessageComposer.ts | 21 ++ .../GetUserEventCatsMessageComposer.ts | 21 ++ .../GetUserFlatCatsMessageComposer.ts | 21 ++ .../GuildBaseSearchMessageComposer.ts | 21 ++ .../MyFavouriteRoomsSearchMessageComposer.ts | 21 ++ ...requentRoomHistorySearchMessageComposer.ts | 21 ++ .../MyFriendsRoomsSearchMessageComposer.ts | 21 ++ .../MyGuildBasesSearchMessageComposer.ts | 21 ++ .../MyRecommendedRoomsMessageComposer.ts | 21 ++ .../MyRoomHistorySearchMessageComposer.ts | 21 ++ .../MyRoomRightsSearchMessageComposer.ts | 21 ++ ...ser.ts => MyRoomsSearchMessageComposer.ts} | 6 +- .../PopularRoomsSearchMessageComposer.ts | 21 ++ .../navigator/RateFlatMessageComposer.ts | 21 ++ .../RoomAdEventTabAdClickedComposer.ts | 21 ++ .../navigator/RoomAdEventTabViewedComposer.ts | 21 ++ .../navigator/RoomAdSearchMessageComposer.ts | 21 ++ .../RoomTextSearchMessageComposer.ts | 21 ++ ...sWhereMyFriendsAreSearchMessageComposer.ts | 21 ++ ...msWithHighestScoreSearchMessageComposer.ts | 21 ++ .../SetRoomSessionTagsMessageComposer.ts | 21 ++ .../ToggleStaffPickMessageComposer.ts | 21 ++ .../UpdateHomeRoomMessageComposer.ts | 21 ++ .../UpdateRoomThumbnailMessageComposer.ts | 21 ++ .../messages/outgoing/navigator/index.ts | 38 +- .../room/action/RoomLikeRoomComposer.ts | 21 -- .../room/action/RoomStaffPickComposer.ts | 21 -- .../messages/outgoing/room/action/index.ts | 2 - .../messages/outgoing/room/data/index.ts | 1 - .../messages/outgoing/room/index.ts | 1 - .../roomsettings/SaveableRoomSettingsData.ts | 267 ++++++++++++++ .../messages/outgoing/roomsettings/index.ts | 1 + .../user/data/UserHomeRoomComposer.ts | 21 -- .../messages/outgoing/user/data/index.ts | 1 - .../navigator/CanCreateRoomMessageParser.ts | 36 ++ .../CategoriesWithVisitorCountParser.ts | 27 ++ .../CompetitionRoomsDataMessageParser.ts | 27 ++ .../navigator/ConvertedRoomIdMessageParser.ts | 33 ++ .../DoorbellMessageParser.ts} | 5 +- .../FavouriteChangedMessageParser.ts | 33 ++ .../navigator/FavouritesMessageParser.ts | 40 +++ .../FlatAccessDeniedMessageParser.ts} | 4 +- .../FlatCreatedMessageParser.ts} | 4 +- .../GetGuestRoomResultMessageParser.ts} | 12 +- .../GuestRoomSearchResultMessageParser.ts | 28 ++ .../navigator/RoomEventCancelMessageParser.ts | 16 + .../navigator/RoomEventMessageParser.ts | 24 ++ .../RoomSettingsUpdatedParser.ts | 2 +- .../RoomThumbnailUpdateResultMessageParser.ts | 31 ++ ...arser.ts => UserEventCatsMessageParser.ts} | 2 +- ...Parser.ts => UserFlatCatsMessageParser.ts} | 2 +- .../messages/parser/navigator/index.ts | 19 +- .../utils/CategoriesWithVisitorCountData.ts | 34 ++ .../navigator/utils/CompetitionRoomsData.ts | 36 ++ .../utils/GuestRoomSearchResultData.ts | 76 ++++ .../navigator/utils/OfficialRoomEntryData.ts | 148 ++++++++ .../parser/navigator/utils/RoomEventData.ts | 104 ++++++ .../messages/parser/navigator/utils/index.ts | 4 + .../parser/room/access/doorbell/index.ts | 2 - .../room/data/RoomChatSettingsParser.ts | 2 +- .../parser/room/data/RoomSettingsParser.ts | 162 --------- .../messages/parser/room/data/index.ts | 7 - .../messages/parser/room/engine/index.ts | 1 - .../messages/parser/roomevents/index.ts | 1 - .../MuteAllInRoomParser.ts} | 5 +- .../parser/roomsettings/NoSuchFlatParser.ts | 28 ++ .../roomsettings/RoomSettingsDataParser.ts | 60 ++++ .../RoomSettingsErrorParser.ts | 11 +- .../RoomSettingsSaveErrorParser.ts | 58 +++ .../RoomSettingsSavedParser.ts | 2 +- .../ShowEnforceRoomCategoryDialogParser.ts | 27 ++ .../UserUnbannedFromRoomParser.ts | 35 ++ .../messages/parser/roomsettings/index.ts | 6 + src/nitro/room/RoomEngine.ts | 8 +- src/nitro/room/RoomObjectEventHandler.ts | 12 + .../events/RoomEngineTriggerWidgetEvent.ts | 3 + .../events/RoomObjectWidgetRequestEvent.ts | 3 + .../FurnitureCustomStackHeightLogic.ts | 19 +- .../furniture/FurnitureExternalImageLogic.ts | 19 +- .../logic/furniture/FurnitureYoutubeLogic.ts | 11 +- .../visualization/pet/PetVisualization.ts | 2 + src/nitro/session/IRoomSession.ts | 2 +- src/nitro/session/RoomSession.ts | 2 +- src/nitro/session/handler/RoomDataHandler.ts | 2 +- .../session/handler/RoomSessionHandler.ts | 8 +- src/nitro/session/handler/RoomUsersHandler.ts | 6 +- 145 files changed, 2867 insertions(+), 543 deletions(-) create mode 100644 src/nitro/communication/messages/incoming/navigator/CanCreateRoomEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/CategoriesWithVisitorCountEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/CompetitionRoomsDataMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/ConvertedRoomIdEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/DoorbellMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/FavouriteChangedEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/FavouritesEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/FlatCreatedEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/GetGuestRoomResultEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/GuestRoomSearchResultEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/navigator/NavigatorCategoriesEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/navigator/NavigatorEventCategoriesEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/RoomEventCancelEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/RoomEventEvent.ts rename src/nitro/communication/messages/incoming/{room/data => navigator}/RoomSettingsUpdatedEvent.ts (52%) create mode 100644 src/nitro/communication/messages/incoming/navigator/RoomThumbnailUpdateResultEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/UserEventCatsEvent.ts create mode 100644 src/nitro/communication/messages/incoming/navigator/UserFlatCatsEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellRejectedEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/room/data/GetGuestRoomResultEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/room/data/RoomSettingsEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/room/engine/RoomCreatedEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/roomevents/RoomMutedEvent.ts create mode 100644 src/nitro/communication/messages/incoming/roomsettings/MuteAllInRoomEvent.ts create mode 100644 src/nitro/communication/messages/incoming/roomsettings/NoSuchFlatEvent.ts rename src/nitro/communication/messages/{parser/room/data => incoming/roomsettings}/RoomChatSettings.ts (77%) rename src/nitro/communication/messages/{parser/room/data => incoming/roomsettings}/RoomModerationSettings.ts (70%) create mode 100644 src/nitro/communication/messages/incoming/roomsettings/RoomSettingsData.ts create mode 100644 src/nitro/communication/messages/incoming/roomsettings/RoomSettingsDataEvent.ts rename src/nitro/communication/messages/incoming/{room/data => roomsettings}/RoomSettingsErrorEvent.ts (52%) create mode 100644 src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSaveErrorEvent.ts rename src/nitro/communication/messages/incoming/{room/data => roomsettings}/RoomSettingsSavedEvent.ts (52%) create mode 100644 src/nitro/communication/messages/incoming/roomsettings/ShowEnforceRoomCategoryDialogEvent.ts create mode 100644 src/nitro/communication/messages/incoming/roomsettings/UserUnbannedFromRoomEvent.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/AddFavouriteRoomMessageComposer.ts rename src/nitro/communication/messages/outgoing/navigator/{NavigatorCategoriesComposer.ts => CanCreateRoomMessageComposer.ts} (57%) create mode 100644 src/nitro/communication/messages/outgoing/navigator/CancelEventMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/CompetitionRoomsSearchMessageComposer.ts rename src/nitro/communication/messages/outgoing/{room/RoomCreateComposer.ts => navigator/CreateFlatMessageComposer.ts} (69%) create mode 100644 src/nitro/communication/messages/outgoing/navigator/DeleteFavouriteRoomMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/EditEventMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/GetCategoriesWithUserCountMessageComposer.ts rename src/nitro/communication/messages/outgoing/{room/data/RoomInfoComposer.ts => navigator/GetGuestRoomMessageComposer.ts} (63%) create mode 100644 src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/GetPopularRoomTagsMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/GetUserEventCatsMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/GetUserFlatCatsMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/MyFavouriteRoomsSearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/MyFrequentRoomHistorySearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/MyFriendsRoomsSearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/MyGuildBasesSearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/MyRecommendedRoomsMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/MyRoomHistorySearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/MyRoomRightsSearchMessageComposer.ts rename src/nitro/communication/messages/outgoing/navigator/{NavigatorSettingsComposer.ts => MyRoomsSearchMessageComposer.ts} (57%) create mode 100644 src/nitro/communication/messages/outgoing/navigator/PopularRoomsSearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabViewedComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/RoomTextSearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/RoomsWhereMyFriendsAreSearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/ToggleStaffPickMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/UpdateHomeRoomMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/navigator/UpdateRoomThumbnailMessageComposer.ts delete mode 100644 src/nitro/communication/messages/outgoing/room/action/RoomLikeRoomComposer.ts delete mode 100644 src/nitro/communication/messages/outgoing/room/action/RoomStaffPickComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/roomsettings/SaveableRoomSettingsData.ts create mode 100644 src/nitro/communication/messages/outgoing/roomsettings/index.ts delete mode 100644 src/nitro/communication/messages/outgoing/user/data/UserHomeRoomComposer.ts create mode 100644 src/nitro/communication/messages/parser/navigator/CanCreateRoomMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/navigator/CategoriesWithVisitorCountParser.ts create mode 100644 src/nitro/communication/messages/parser/navigator/CompetitionRoomsDataMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/navigator/ConvertedRoomIdMessageParser.ts rename src/nitro/communication/messages/parser/{room/access/doorbell/RoomDoorbellRejectedParser.ts => navigator/DoorbellMessageParser.ts} (59%) create mode 100644 src/nitro/communication/messages/parser/navigator/FavouriteChangedMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/navigator/FavouritesMessageParser.ts rename src/nitro/communication/messages/parser/{room/access/doorbell/RoomDoorbellParser.ts => navigator/FlatAccessDeniedMessageParser.ts} (84%) rename src/nitro/communication/messages/parser/{room/engine/RoomCreatedParser.ts => navigator/FlatCreatedMessageParser.ts} (89%) rename src/nitro/communication/messages/parser/{room/data/RoomInfoParser.ts => navigator/GetGuestRoomResultMessageParser.ts} (77%) create mode 100644 src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/navigator/RoomEventMessageParser.ts rename src/nitro/communication/messages/parser/{room/data => navigator}/RoomSettingsUpdatedParser.ts (97%) create mode 100644 src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts rename src/nitro/communication/messages/parser/navigator/{NavigatorEventCategoriesParser.ts => UserEventCatsMessageParser.ts} (91%) rename src/nitro/communication/messages/parser/navigator/{NavigatorCategoriesParser.ts => UserFlatCatsMessageParser.ts} (92%) create mode 100644 src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts create mode 100644 src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts create mode 100644 src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts create mode 100644 src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts create mode 100644 src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts delete mode 100644 src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts rename src/nitro/communication/messages/parser/{roomevents/RoomMutedParser.ts => roomsettings/MuteAllInRoomParser.ts} (57%) create mode 100644 src/nitro/communication/messages/parser/roomsettings/NoSuchFlatParser.ts create mode 100644 src/nitro/communication/messages/parser/roomsettings/RoomSettingsDataParser.ts rename src/nitro/communication/messages/parser/{room/data => roomsettings}/RoomSettingsErrorParser.ts (69%) create mode 100644 src/nitro/communication/messages/parser/roomsettings/RoomSettingsSaveErrorParser.ts rename src/nitro/communication/messages/parser/{room/data => roomsettings}/RoomSettingsSavedParser.ts (97%) create mode 100644 src/nitro/communication/messages/parser/roomsettings/ShowEnforceRoomCategoryDialogParser.ts create mode 100644 src/nitro/communication/messages/parser/roomsettings/UserUnbannedFromRoomParser.ts diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index fc8830ad..75fbe758 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -1,5 +1,5 @@ import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration'; -import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, BuyMarketplaceOfferMessageComposer, BuyMarketplaceTokensMessageComposer, CallForHelpFromForumMessageMessageComposer, CallForHelpFromForumThreadMessageComposer, CallForHelpFromIMMessageComposer, CallForHelpFromPhotoMessageComposer, CallForHelpFromSelfieMessageComposer, CallForHelpMessageComposer, CallForHelpPendingCallsDeletedMessageEvent, CallForHelpPendingCallsMessageEvent, CallForHelpReplyMessageEvent, CancelMarketplaceOfferMessageComposer, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, ChatReviewGuideDecidesOnOfferMessageComposer, ChatReviewGuideDetachedMessageComposer, ChatReviewGuideVoteMessageComposer, ChatReviewSessionCreateMessageComposer, ChatReviewSessionDetachedMessageEvent, ChatReviewSessionOfferedToGuideMessageEvent, ChatReviewSessionResultsMessageEvent, ChatReviewSessionStartedMessageEvent, ChatReviewSessionVotingStatusMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, CloseIssueDefaultActionMessageComposer, CloseIssuesMessageComposer, ClubGiftNotificationEvent, ControlYoutubeDisplayPlaybackMessageComposer, DeletePendingCallsForHelpMessageComposer, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCfhChatlogMessageComposer, GetCfhStatusMessageComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetExtendedProfileByNameMessageComposer, GetFaqCategoryMessageComposer, GetFaqTextMessageComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetGuideReportingStatusMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetHabboGroupBadgesMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMarketplaceConfigurationMessageComposer, GetMarketplaceItemStatsComposer, GetMarketplaceOffersMessageComposer, GetMarketplaceOwnOffersMessageComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetPendingCallsForHelpMessageComposer, GetQuizQuestionsComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GoToFlatMessageComposer, GuideOnDutyStatusMessageEvent, GuideSessionAttachedMessageEvent, GuideSessionCreateMessageComposer, GuideSessionDetachedMessageEvent, GuideSessionEndedMessageEvent, GuideSessionErrorMessageEvent, GuideSessionFeedbackMessageComposer, GuideSessionGetRequesterRoomMessageComposer, GuideSessionGuideDecidesMessageComposer, GuideSessionInvitedToGuideRoomMessageEvent, GuideSessionInviteRequesterMessageComposer, GuideSessionIsTypingMessageComposer, GuideSessionMessageMessageComposer, GuideSessionMessageMessageEvent, GuideSessionOnDutyUpdateMessageComposer, GuideSessionPartnerIsTypingMessageEvent, GuideSessionReportMessageComposer, GuideSessionRequesterCancelsMessageComposer, GuideSessionRequesterRoomMessageEvent, GuideSessionResolvedMessageComposer, GuideSessionStartedMessageEvent, GuideTicketCreationResultMessageEvent, GuideTicketResolutionMessageEvent, HabboClubExtendOfferMessageEvent, HabboGroupBadgesMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelMergeNameChangeEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, IssueCloseNotificationMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, ModToolPreferencesComposer, ModToolSanctionComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PickIssuesMessageComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PollAnswerComposer, PollContentsEvent, PollErrorEvent, PollOfferEvent, PollRejectComposer, PollStartComposer, PostMessageMessageComposer, PostQuizAnswersComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, QuestionAnsweredEvent, QuestionEvent, QuestionFinishedEvent, QuizDataMessageEvent, QuizResultsMessageEvent, RedeemMarketplaceOfferCreditsMessageComposer, ReleaseIssuesMessageComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, ScrGetKickbackInfoMessageComposer, ScrSendKickbackInfoMessageEvent, SearchFaqsMessageComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackMessageEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, TryPhoneNumberMessageComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UpdateForumReadMarkerMessageComposer, UpdateForumSettingsMessageComposer, UpdateThreadMessageComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VerifyCodeMessageComposer, VoteForRoomMessageComposer, WardrobeMessageEvent } from './messages'; +import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddFavouriteRoomMessageComposer, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, BuyMarketplaceOfferMessageComposer, BuyMarketplaceTokensMessageComposer, CallForHelpFromForumMessageMessageComposer, CallForHelpFromForumThreadMessageComposer, CallForHelpFromIMMessageComposer, CallForHelpFromPhotoMessageComposer, CallForHelpFromSelfieMessageComposer, CallForHelpMessageComposer, CallForHelpPendingCallsDeletedMessageEvent, CallForHelpPendingCallsMessageEvent, CallForHelpReplyMessageEvent, CancelEventMessageComposer, CancelMarketplaceOfferMessageComposer, CanCreateRoomEvent, CanCreateRoomMessageComposer, CategoriesWithVisitorCountEvent, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, ChatReviewGuideDecidesOnOfferMessageComposer, ChatReviewGuideDetachedMessageComposer, ChatReviewGuideVoteMessageComposer, ChatReviewSessionCreateMessageComposer, ChatReviewSessionDetachedMessageEvent, ChatReviewSessionOfferedToGuideMessageEvent, ChatReviewSessionResultsMessageEvent, ChatReviewSessionStartedMessageEvent, ChatReviewSessionVotingStatusMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, CloseIssueDefaultActionMessageComposer, CloseIssuesMessageComposer, ClubGiftNotificationEvent, CompetitionRoomsDataMessageEvent, CompetitionRoomsSearchMessageComposer, ControlYoutubeDisplayPlaybackMessageComposer, ConvertedRoomIdEvent, DeleteFavouriteRoomMessageComposer, DeletePendingCallsForHelpMessageComposer, DirectSMSClubBuyAvailableMessageEvent, DoorbellMessageEvent, EditEventMessageComposer, FavouriteChangedEvent, FavouritesEvent, FigureUpdateEvent, FlatAccessDeniedMessageEvent, FlatCreatedEvent, ForwardToARandomPromotedRoomMessageComposer, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, ForwardToSomeRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCategoriesWithUserCountMessageComposer, GetCfhChatlogMessageComposer, GetCfhStatusMessageComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetExtendedProfileByNameMessageComposer, GetFaqCategoryMessageComposer, GetFaqTextMessageComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetGuestRoomMessageComposer, GetGuestRoomResultEvent, GetGuideReportingStatusMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetHabboGroupBadgesMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMarketplaceConfigurationMessageComposer, GetMarketplaceItemStatsComposer, GetMarketplaceOffersMessageComposer, GetMarketplaceOwnOffersMessageComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialRoomsMessageComposer, GetOfficialSongIdMessageComposer, GetPendingCallsForHelpMessageComposer, GetPopularRoomTagsMessageComposer, GetQuizQuestionsComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GoToFlatMessageComposer, GuideOnDutyStatusMessageEvent, GuideSessionAttachedMessageEvent, GuideSessionCreateMessageComposer, GuideSessionDetachedMessageEvent, GuideSessionEndedMessageEvent, GuideSessionErrorMessageEvent, GuideSessionFeedbackMessageComposer, GuideSessionGetRequesterRoomMessageComposer, GuideSessionGuideDecidesMessageComposer, GuideSessionInvitedToGuideRoomMessageEvent, GuideSessionInviteRequesterMessageComposer, GuideSessionIsTypingMessageComposer, GuideSessionMessageMessageComposer, GuideSessionMessageMessageEvent, GuideSessionOnDutyUpdateMessageComposer, GuideSessionPartnerIsTypingMessageEvent, GuideSessionReportMessageComposer, GuideSessionRequesterCancelsMessageComposer, GuideSessionRequesterRoomMessageEvent, GuideSessionResolvedMessageComposer, GuideSessionStartedMessageEvent, GuideTicketCreationResultMessageEvent, GuideTicketResolutionMessageEvent, GuildBaseSearchMessageComposer, HabboClubExtendOfferMessageEvent, HabboGroupBadgesMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelMergeNameChangeEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, IssueCloseNotificationMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, ModToolPreferencesComposer, ModToolSanctionComposer, MyFavouriteRoomsSearchMessageComposer, MyFrequentRoomHistorySearchMessageComposer, MyFriendsRoomsSearchMessageComposer, MyGuildBasesSearchMessageComposer, MyRecommendedRoomsMessageComposer, MyRoomHistorySearchMessageComposer, MyRoomRightsSearchMessageComposer, MyRoomsSearchMessageComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PickIssuesMessageComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PollAnswerComposer, PollContentsEvent, PollErrorEvent, PollOfferEvent, PollRejectComposer, PollStartComposer, PopularRoomsSearchMessageComposer, PostMessageMessageComposer, PostQuizAnswersComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, QuestionAnsweredEvent, QuestionEvent, QuestionFinishedEvent, QuizDataMessageEvent, QuizResultsMessageEvent, RateFlatMessageComposer, RedeemMarketplaceOfferCreditsMessageComposer, ReleaseIssuesMessageComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdEventTabAdClickedComposer, RoomAdEventTabViewedComposer, RoomAdPurchaseInfoEvent, RoomAdSearchMessageComposer, RoomCompetitionInitMessageComposer, RoomEventCancelEvent, RoomEventEvent, RoomsWhereMyFriendsAreSearchMessageComposer, RoomsWithHighestScoreSearchMessageComposer, RoomTextSearchMessageComposer, RoomThumbnailUpdateResultEvent, RoomUnitGiveHandItemPetComposer, ScrGetKickbackInfoMessageComposer, ScrSendKickbackInfoMessageEvent, SearchFaqsMessageComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetRoomSessionTagsMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackMessageEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, ToggleStaffPickMessageComposer, TraxSongInfoMessageEvent, TryPhoneNumberMessageComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UpdateForumReadMarkerMessageComposer, UpdateForumSettingsMessageComposer, UpdateHomeRoomMessageComposer, UpdateRoomThumbnailMessageComposer, UpdateThreadMessageComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VerifyCodeMessageComposer, 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'; @@ -98,9 +98,8 @@ import { MarketplaceOwnOffersEvent } from './messages/incoming/marketplace/Marke import { CfhChatlogEvent, IssueDeletedMessageEvent, IssueInfoMessageEvent, IssuePickFailedMessageEvent, ModeratorActionResultMessageEvent, ModeratorInitMessageEvent, ModeratorMessageEvent, ModeratorRoomInfoEvent, ModeratorToolPreferencesEvent, ModeratorUserInfoEvent, RoomChatlogEvent, RoomVisitsEvent, UserBannedMessageEvent, UserChatlogEvent } from './messages/incoming/moderation'; import { ModeratorCautionEvent } from './messages/incoming/moderation/ModeratorCautionEvent'; import { CanCreateRoomEventEvent } from './messages/incoming/navigator/CanCreateRoomEventEvent'; -import { NavigatorCategoriesEvent } from './messages/incoming/navigator/NavigatorCategoriesEvent'; +import { GuestRoomSearchResultEvent } from './messages/incoming/navigator/GuestRoomSearchResultEvent'; import { NavigatorCollapsedEvent } from './messages/incoming/navigator/NavigatorCollapsedEvent'; -import { NavigatorEventCategoriesEvent } from './messages/incoming/navigator/NavigatorEventCategoriesEvent'; import { NavigatorHomeRoomEvent } from './messages/incoming/navigator/NavigatorHomeRoomEvent'; import { NavigatorLiftedEvent } from './messages/incoming/navigator/NavigatorLiftedEvent'; import { NavigatorMetadataEvent } from './messages/incoming/navigator/NavigatorMetadataEvent'; @@ -108,6 +107,9 @@ import { NavigatorOpenRoomCreatorEvent } from './messages/incoming/navigator/Nav import { NavigatorSearchesEvent } from './messages/incoming/navigator/NavigatorSearchesEvent'; import { NavigatorSearchEvent } from './messages/incoming/navigator/NavigatorSearchEvent'; import { NavigatorSettingsEvent } from './messages/incoming/navigator/NavigatorSettingsEvent'; +import { RoomSettingsUpdatedEvent } from './messages/incoming/navigator/RoomSettingsUpdatedEvent'; +import { UserEventCatsEvent } from './messages/incoming/navigator/UserEventCatsEvent'; +import { UserFlatCatsEvent } from './messages/incoming/navigator/UserFlatCatsEvent'; import { BotErrorEvent } from './messages/incoming/notifications/BotErrorEvent'; import { HabboBroadcastMessageEvent } from './messages/incoming/notifications/HabboBroadcastMessageEvent'; import { MOTDNotificationEvent } from './messages/incoming/notifications/MOTDNotificationEvent'; @@ -128,8 +130,6 @@ import { QuestMessageEvent } from './messages/incoming/quest/QuestMessageEvent'; import { QuestsMessageEvent } from './messages/incoming/quest/QuestsMessageEvent'; import { SeasonalQuestsMessageEvent } from './messages/incoming/quest/SeasonalQuestsMessageEvent'; import { RoomDoorbellAcceptedEvent } from './messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent'; -import { RoomDoorbellEvent } from './messages/incoming/room/access/doorbell/RoomDoorbellEvent'; -import { RoomDoorbellRejectedEvent } from './messages/incoming/room/access/doorbell/RoomDoorbellRejectedEvent'; import { RoomRightsClearEvent } from './messages/incoming/room/access/rights/RoomRightsClearEvent'; import { RoomRightsEvent } from './messages/incoming/room/access/rights/RoomRightsEvent'; import { RoomRightsOwnerEvent } from './messages/incoming/room/access/rights/RoomRightsOwnerEvent'; @@ -137,18 +137,12 @@ import { RoomEnterErrorEvent } from './messages/incoming/room/access/RoomEnterEr import { RoomEnterEvent } from './messages/incoming/room/access/RoomEnterEvent'; import { RoomForwardEvent } from './messages/incoming/room/access/RoomForwardEvent'; import { BotCommandConfigurationEvent } from './messages/incoming/room/bots/BotCommandConfigurationEvent'; -import { GetGuestRoomResultEvent } from './messages/incoming/room/data/GetGuestRoomResultEvent'; import { RoomChatSettingsEvent } from './messages/incoming/room/data/RoomChatSettingsEvent'; import { RoomEntryInfoMessageEvent } from './messages/incoming/room/data/RoomEntryInfoMessageEvent'; import { RoomScoreEvent } from './messages/incoming/room/data/RoomScoreEvent'; -import { RoomSettingsErrorEvent } from './messages/incoming/room/data/RoomSettingsErrorEvent'; -import { RoomSettingsEvent } from './messages/incoming/room/data/RoomSettingsEvent'; -import { RoomSettingsSavedEvent } from './messages/incoming/room/data/RoomSettingsSavedEvent'; -import { RoomSettingsUpdatedEvent } from './messages/incoming/room/data/RoomSettingsUpdatedEvent'; import { FavoriteMembershipUpdateMessageEvent } from './messages/incoming/room/engine/FavoriteMembershipUpdateMessageEvent'; import { ObjectsDataUpdateEvent } from './messages/incoming/room/engine/ObjectsDataUpdateEvent'; import { ObjectsRollingEvent } from './messages/incoming/room/engine/ObjectsRollingEvent'; -import { RoomCreatedEvent } from './messages/incoming/room/engine/RoomCreatedEvent'; import { DiceValueMessageEvent } from './messages/incoming/room/furniture/DiceValueMessageEvent'; import { FurnitureFloorAddEvent } from './messages/incoming/room/furniture/floor/FurnitureFloorAddEvent'; import { FurnitureFloorEvent } from './messages/incoming/room/furniture/floor/FurnitureFloorEvent'; @@ -202,7 +196,6 @@ import { RoomUnitInfoEvent } from './messages/incoming/room/unit/RoomUnitInfoEve import { RoomUnitNumberEvent } from './messages/incoming/room/unit/RoomUnitNumberEvent'; import { RoomUnitRemoveEvent } from './messages/incoming/room/unit/RoomUnitRemoveEvent'; import { RoomUnitStatusEvent } from './messages/incoming/room/unit/RoomUnitStatusEvent'; -import { RoomMutedEvent } from './messages/incoming/roomevents/RoomMutedEvent'; import { WiredFurniActionEvent } from './messages/incoming/roomevents/WiredFurniActionEvent'; import { WiredFurniConditionEvent } from './messages/incoming/roomevents/WiredFurniConditionEvent'; import { WiredFurniTriggerEvent } from './messages/incoming/roomevents/WiredFurniTriggerEvent'; @@ -214,6 +207,14 @@ import { BannedUsersFromRoomEvent } from './messages/incoming/roomsettings/Banne import { FlatControllerAddedEvent } from './messages/incoming/roomsettings/FlatControllerAddedEvent'; import { FlatControllerRemovedEvent } from './messages/incoming/roomsettings/FlatControllerRemovedEvent'; import { FlatControllersEvent } from './messages/incoming/roomsettings/FlatControllersEvent'; +import { MuteAllInRoomEvent } from './messages/incoming/roomsettings/MuteAllInRoomEvent'; +import { NoSuchFlatEvent } from './messages/incoming/roomsettings/NoSuchFlatEvent'; +import { RoomSettingsDataEvent } from './messages/incoming/roomsettings/RoomSettingsDataEvent'; +import { RoomSettingsErrorEvent } from './messages/incoming/roomsettings/RoomSettingsErrorEvent'; +import { RoomSettingsSavedEvent } from './messages/incoming/roomsettings/RoomSettingsSavedEvent'; +import { RoomSettingsSaveErrorEvent } from './messages/incoming/roomsettings/RoomSettingsSaveErrorEvent'; +import { ShowEnforceRoomCategoryDialogEvent } from './messages/incoming/roomsettings/ShowEnforceRoomCategoryDialogEvent'; +import { UserUnbannedFromRoomEvent } from './messages/incoming/roomsettings/UserUnbannedFromRoomEvent'; import { AuthenticatedEvent } from './messages/incoming/security/AuthenticatedEvent'; import { UserPermissionsEvent } from './messages/incoming/user/access/UserPermissionsEvent'; import { RelationshipStatusInfoEvent } from './messages/incoming/user/data/RelationshipStatusInfoEvent'; @@ -345,14 +346,15 @@ import { ModMessageMessageComposer } from './messages/outgoing/moderation/ModMes import { ModMuteMessageComposer } from './messages/outgoing/moderation/ModMuteMessageComposer'; import { ModTradingLockMessageComposer } from './messages/outgoing/moderation/ModTradingLockMessageComposer'; import { ConvertGlobalRoomIdMessageComposer } from './messages/outgoing/navigator/ConvertGlobalRoomIdComposer'; -import { NavigatorCategoriesComposer } from './messages/outgoing/navigator/NavigatorCategoriesComposer'; +import { CreateFlatMessageComposer } from './messages/outgoing/navigator/CreateFlatMessageComposer'; +import { GetUserEventCatsMessageComposer } from './messages/outgoing/navigator/GetUserEventCatsMessageComposer'; +import { GetUserFlatCatsMessageComposer } from './messages/outgoing/navigator/GetUserFlatCatsMessageComposer'; import { NavigatorCategoryListModeComposer } from './messages/outgoing/navigator/NavigatorCategoryListModeComposer'; import { NavigatorInitComposer } from './messages/outgoing/navigator/NavigatorInitComposer'; import { NavigatorSearchCloseComposer } from './messages/outgoing/navigator/NavigatorSearchCloseComposer'; import { NavigatorSearchComposer } from './messages/outgoing/navigator/NavigatorSearchComposer'; import { NavigatorSearchOpenComposer } from './messages/outgoing/navigator/NavigatorSearchOpenComposer'; import { NavigatorSearchSaveComposer } from './messages/outgoing/navigator/NavigatorSearchSaveComposer'; -import { NavigatorSettingsComposer } from './messages/outgoing/navigator/NavigatorSettingsComposer'; import { NavigatorSettingsSaveComposer } from './messages/outgoing/navigator/NavigatorSettingsSaveComposer'; import { OutgoingHeader } from './messages/outgoing/OutgoingHeader'; import { PetRespectComposer } from './messages/outgoing/pet/PetRespectComposer'; @@ -380,14 +382,11 @@ import { RoomBanUserComposer } from './messages/outgoing/room/action/RoomBanUser import { RoomDeleteComposer } from './messages/outgoing/room/action/RoomDeleteComposer'; import { RoomGiveRightsComposer } from './messages/outgoing/room/action/RoomGiveRightsComposer'; import { RoomKickUserComposer } from './messages/outgoing/room/action/RoomKickUserComposer'; -import { RoomLikeRoomComposer } from './messages/outgoing/room/action/RoomLikeRoomComposer'; import { RoomMuteUserComposer } from './messages/outgoing/room/action/RoomMuteUserComposer'; -import { RoomStaffPickComposer } from './messages/outgoing/room/action/RoomStaffPickComposer'; import { RoomTakeRightsComposer } from './messages/outgoing/room/action/RoomTakeRightsComposer'; import { RoomUnbanUserComposer } from './messages/outgoing/room/action/RoomUnbanUserComposer'; import { RequestBotCommandConfigurationComposer } from './messages/outgoing/room/bots/RequestBotConfigurationComposer'; import { RoomBannedUsersComposer } from './messages/outgoing/room/data/RoomBannedUsersComposer'; -import { RoomInfoComposer } from './messages/outgoing/room/data/RoomInfoComposer'; import { RoomSettingsComposer } from './messages/outgoing/room/data/RoomSettingsComposer'; import { RoomUsersWithRightsComposer } from './messages/outgoing/room/data/RoomUsersWithRightsComposer'; import { SaveRoomSettingsComposer } from './messages/outgoing/room/data/SaveRoomSettingsComposer'; @@ -432,7 +431,6 @@ import { GetRoomEntryDataMessageComposer } from './messages/outgoing/room/layout import { GetRoomEntryTileMessageComposer } from './messages/outgoing/room/layout/GetRoomEntryTileMessageComposer'; import { UpdateFloorPropertiesMessageComposer } from './messages/outgoing/room/layout/UpdateFloorPropertiesMessageComposer'; import { RedeemItemClothingComposer } from './messages/outgoing/room/RedeemItemClothingComposer'; -import { RoomCreateComposer } from './messages/outgoing/room/RoomCreateComposer'; import { RoomUnitChatComposer } from './messages/outgoing/room/unit/chat/RoomUnitChatComposer'; import { RoomUnitChatShoutComposer } from './messages/outgoing/room/unit/chat/RoomUnitChatShoutComposer'; import { RoomUnitChatStyleComposer } from './messages/outgoing/room/unit/chat/RoomUnitChatStyleComposer'; @@ -462,7 +460,6 @@ import { IgnoreUserIdComposer } from './messages/outgoing/user/data/IgnoreUserId import { UnignoreUserComposer } from './messages/outgoing/user/data/UnignoreUserComposer'; import { UserCurrentBadgesComposer } from './messages/outgoing/user/data/UserCurrentBadgesComposer'; import { UserFigureComposer } from './messages/outgoing/user/data/UserFigureComposer'; -import { UserHomeRoomComposer } from './messages/outgoing/user/data/UserHomeRoomComposer'; import { UserMottoComposer } from './messages/outgoing/user/data/UserMottoComposer'; import { UserProfileComposer } from './messages/outgoing/user/data/UserProfileComposer'; import { UserRelationshipsComposer } from './messages/outgoing/user/data/UserRelationshipsComposer'; @@ -731,17 +728,33 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.MYSTERY_BOX_KEYS, MysteryBoxKeysEvent); // NAVIGATOR - this._events.set(IncomingHeader.NAVIGATOR_CATEGORIES, NavigatorCategoriesEvent); - this._events.set(IncomingHeader.NAVIGATOR_COLLAPSED, NavigatorCollapsedEvent); - this._events.set(IncomingHeader.NAVIGATOR_EVENT_CATEGORIES, NavigatorEventCategoriesEvent); + this._events.set(IncomingHeader.CAN_CREATE_ROOM, CanCreateRoomEvent); + this._events.set(IncomingHeader.CAN_CREATE_ROOM_EVENT, CanCreateRoomEventEvent); + this._events.set(IncomingHeader.CATEGORIES_WITH_VISITOR_COUNT, CategoriesWithVisitorCountEvent); + this._events.set(IncomingHeader.COMPETITION_ROOMS_DATA, CompetitionRoomsDataMessageEvent); + this._events.set(IncomingHeader.CONVERTED_ROOM_ID, ConvertedRoomIdEvent); + this._events.set(IncomingHeader.ROOM_DOORBELL, DoorbellMessageEvent); + this._events.set(IncomingHeader.USER_FAVORITE_ROOM, FavouriteChangedEvent); + this._events.set(IncomingHeader.USER_FAVORITE_ROOM_COUNT, FavouritesEvent); + this._events.set(IncomingHeader.ROOM_DOORBELL_REJECTED, FlatAccessDeniedMessageEvent); + this._events.set(IncomingHeader.ROOM_CREATED, FlatCreatedEvent); + this._events.set(IncomingHeader.ROOM_INFO, GetGuestRoomResultEvent); + this._events.set(IncomingHeader.GUEST_ROOM_SEARCH_RESULT, GuestRoomSearchResultEvent); this._events.set(IncomingHeader.USER_HOME_ROOM, NavigatorHomeRoomEvent); + this._events.set(IncomingHeader.ROOM_EVENT_CANCEL, RoomEventCancelEvent); + this._events.set(IncomingHeader.ROOM_EVENT, RoomEventEvent); + this._events.set(IncomingHeader.ROOM_INFO_UPDATED, RoomSettingsUpdatedEvent); + this._events.set(IncomingHeader.THUMBNAIL_UPDATE_RESULT, RoomThumbnailUpdateResultEvent); + this._events.set(IncomingHeader.NAVIGATOR_EVENT_CATEGORIES, UserEventCatsEvent); + this._events.set(IncomingHeader.NAVIGATOR_CATEGORIES, UserFlatCatsEvent); + + this._events.set(IncomingHeader.NAVIGATOR_COLLAPSED, NavigatorCollapsedEvent); this._events.set(IncomingHeader.NAVIGATOR_LIFTED, NavigatorLiftedEvent); this._events.set(IncomingHeader.NAVIGATOR_METADATA, NavigatorMetadataEvent); this._events.set(IncomingHeader.NAVIGATOR_OPEN_ROOM_CREATOR, NavigatorOpenRoomCreatorEvent); this._events.set(IncomingHeader.NAVIGATOR_SEARCHES, NavigatorSearchesEvent); this._events.set(IncomingHeader.NAVIGATOR_SEARCH, NavigatorSearchEvent); this._events.set(IncomingHeader.NAVIGATOR_SETTINGS, NavigatorSettingsEvent); - this._events.set(IncomingHeader.CAN_CREATE_ROOM_EVENT, CanCreateRoomEventEvent); // NOTIFICATIONS this._events.set(IncomingHeader.GENERIC_ALERT, HabboBroadcastMessageEvent); @@ -783,23 +796,15 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.ROOM_ENTER_ERROR, RoomEnterErrorEvent); this._events.set(IncomingHeader.ROOM_ENTER, RoomEnterEvent); this._events.set(IncomingHeader.ROOM_FORWARD, RoomForwardEvent); - this._events.set(IncomingHeader.ROOM_DOORBELL, RoomDoorbellEvent); this._events.set(IncomingHeader.ROOM_DOORBELL_ACCEPTED, RoomDoorbellAcceptedEvent); - this._events.set(IncomingHeader.ROOM_DOORBELL_REJECTED, RoomDoorbellRejectedEvent); this._events.set(IncomingHeader.ROOM_RIGHTS_CLEAR, RoomRightsClearEvent); this._events.set(IncomingHeader.ROOM_RIGHTS_OWNER, RoomRightsOwnerEvent); this._events.set(IncomingHeader.ROOM_RIGHTS, RoomRightsEvent); this._events.set(IncomingHeader.BOT_COMMAND_CONFIGURATION, BotCommandConfigurationEvent); this._events.set(IncomingHeader.ROOM_SETTINGS_CHAT, RoomChatSettingsEvent); - this._events.set(IncomingHeader.ROOM_INFO, GetGuestRoomResultEvent); this._events.set(IncomingHeader.ROOM_INFO_OWNER, RoomEntryInfoMessageEvent); this._events.set(IncomingHeader.ROOM_SCORE, RoomScoreEvent); - this._events.set(IncomingHeader.ROOM_SETTINGS_SAVE_ERROR, RoomSettingsErrorEvent); - this._events.set(IncomingHeader.ROOM_SETTINGS, RoomSettingsEvent); - this._events.set(IncomingHeader.ROOM_SETTINGS_SAVE, RoomSettingsSavedEvent); - this._events.set(IncomingHeader.ROOM_SETTINGS_UPDATED, RoomSettingsUpdatedEvent); this._events.set(IncomingHeader.ROOM_ROLLING, ObjectsRollingEvent); - this._events.set(IncomingHeader.ROOM_CREATED, RoomCreatedEvent); this._events.set(IncomingHeader.FURNITURE_FLOOR_ADD, FurnitureFloorAddEvent); this._events.set(IncomingHeader.FURNITURE_FLOOR, FurnitureFloorEvent); this._events.set(IncomingHeader.FURNITURE_FLOOR_REMOVE, FurnitureFloorRemoveEvent); @@ -829,6 +834,16 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.ROOM_RIGHTS_LIST_REMOVE, FlatControllerRemovedEvent); this._events.set(IncomingHeader.ROOM_BAN_LIST, BannedUsersFromRoomEvent); + this._events.set(IncomingHeader.ROOM_SETTINGS_SAVE_ERROR, RoomSettingsSaveErrorEvent); + this._events.set(IncomingHeader.ROOM_SETTINGS, RoomSettingsDataEvent); + this._events.set(IncomingHeader.ROOM_SETTINGS_SAVE, RoomSettingsSavedEvent); + this._events.set(IncomingHeader.ROOM_SETTINGS_ERROR, RoomSettingsErrorEvent); + this._events.set(IncomingHeader.SHOW_ENFORCE_ROOM_CATEGORY, ShowEnforceRoomCategoryDialogEvent); + this._events.set(IncomingHeader.ROOM_BAN_REMOVE, UserUnbannedFromRoomEvent); + + this._events.set(IncomingHeader.ROOM_MUTED, MuteAllInRoomEvent); + this._events.set(IncomingHeader.NO_SUCH_FLAT, NoSuchFlatEvent); + this._events.set(IncomingHeader.FAVORITE_GROUP_UDPATE, FavoriteMembershipUpdateMessageEvent); // MAPPING @@ -871,7 +886,6 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.WIRED_REWARD, WiredRewardResultMessageEvent); this._events.set(IncomingHeader.WIRED_SAVE, WiredSaveSuccessEvent); this._events.set(IncomingHeader.WIRED_ERROR, WiredValidationErrorEvent); - this._events.set(IncomingHeader.ROOM_MUTED, RoomMutedEvent); // SECURITY this._events.set(IncomingHeader.AUTHENTICATED, AuthenticatedEvent); @@ -1111,17 +1125,52 @@ export class NitroMessages implements IMessageConfiguration this._composers.set(OutgoingHeader.GROUP_BADGES, GetHabboGroupBadgesMessageComposer); // NAVIGATOR - this._composers.set(OutgoingHeader.NAVIGATOR_CATEGORIES, NavigatorCategoriesComposer); + this._composers.set(OutgoingHeader.ROOM_FAVORITE, AddFavouriteRoomMessageComposer); + this._composers.set(OutgoingHeader.CAN_CREATE_ROOM, CanCreateRoomMessageComposer); + this._composers.set(OutgoingHeader.CANCEL_ROOM_EVENT, CancelEventMessageComposer); + this._composers.set(OutgoingHeader.CONVERT_GLOBAL_ROOM_ID, ConvertGlobalRoomIdMessageComposer); + this._composers.set(OutgoingHeader.COMPETITION_ROOM_SEARCH, CompetitionRoomsSearchMessageComposer); + this._composers.set(OutgoingHeader.ROOM_CREATE, CreateFlatMessageComposer); + this._composers.set(OutgoingHeader.GET_USER_FLAT_CATS, GetUserFlatCatsMessageComposer); + this._composers.set(OutgoingHeader.GET_USER_EVENT_CATS, GetUserEventCatsMessageComposer); + this._composers.set(OutgoingHeader.ROOM_FAVORITE_REMOVE, DeleteFavouriteRoomMessageComposer); + this._composers.set(OutgoingHeader.EDIT_ROOM_EVENT, EditEventMessageComposer); + this._composers.set(OutgoingHeader.FORWARD_TO_RANDOM_PROMOTED_ROOM, ForwardToARandomPromotedRoomMessageComposer); + this._composers.set(OutgoingHeader.FORWARD_TO_SOME_ROOM, ForwardToSomeRoomMessageComposer); + this._composers.set(OutgoingHeader.GET_CATEGORIES_WITH_USER_COUNT, GetCategoriesWithUserCountMessageComposer); + this._composers.set(OutgoingHeader.GET_GUEST_ROOM, GetGuestRoomMessageComposer); + this._composers.set(OutgoingHeader.GET_OFFICIAL_ROOMS, GetOfficialRoomsMessageComposer); + this._composers.set(OutgoingHeader.GET_POPULAR_ROOM_TAGS, GetPopularRoomTagsMessageComposer); + this._composers.set(OutgoingHeader.GUILD_BASE_SEARCH, GuildBaseSearchMessageComposer); + this._composers.set(OutgoingHeader.MY_FAVOURITE_ROOMS_SEARCH, MyFavouriteRoomsSearchMessageComposer); + this._composers.set(OutgoingHeader.MY_FREQUENT_ROOM_HISTORY_SEARCH, MyFrequentRoomHistorySearchMessageComposer); + this._composers.set(OutgoingHeader.MY_FRIENDS_ROOM_SEARCH, MyFriendsRoomsSearchMessageComposer); + this._composers.set(OutgoingHeader.MY_GUILD_BASES_SEARCH, MyGuildBasesSearchMessageComposer); + this._composers.set(OutgoingHeader.MY_RECOMMENDED_ROOMS, MyRecommendedRoomsMessageComposer); + this._composers.set(OutgoingHeader.MY_ROOM_HISTORY_SEARCH, MyRoomHistorySearchMessageComposer); + this._composers.set(OutgoingHeader.MY_ROOM_RIGHTS_SEARCH, MyRoomRightsSearchMessageComposer); + this._composers.set(OutgoingHeader.MY_ROOMS_SEARCH, MyRoomsSearchMessageComposer); + this._composers.set(OutgoingHeader.POPULAR_ROOMS_SEARCH, PopularRoomsSearchMessageComposer); + this._composers.set(OutgoingHeader.ROOM_LIKE, RateFlatMessageComposer); + this._composers.set(OutgoingHeader.ROOM_RIGHTS_REMOVE_OWN, RemoveOwnRoomRightsRoomMessageComposer); + this._composers.set(OutgoingHeader.ROOM_AD_EVENT_TAB_CLICKED, RoomAdEventTabAdClickedComposer); + this._composers.set(OutgoingHeader.ROOM_AD_EVENT_TAB_VIEWED, RoomAdEventTabViewedComposer); + this._composers.set(OutgoingHeader.ROOM_AD_SEARCH, RoomAdSearchMessageComposer); + this._composers.set(OutgoingHeader.ROOM_TEXT_SEARCH, RoomTextSearchMessageComposer); + this._composers.set(OutgoingHeader.ROOMS_WHERE_MY_FRIENDS_ARE, RoomsWhereMyFriendsAreSearchMessageComposer); + this._composers.set(OutgoingHeader.ROOMS_WITH_HIGHEST_SCORE_SEARCH, RoomsWithHighestScoreSearchMessageComposer); + this._composers.set(OutgoingHeader.SET_ROOM_SESSION_TAGS, SetRoomSessionTagsMessageComposer); + this._composers.set(OutgoingHeader.ROOM_STAFF_PICK, ToggleStaffPickMessageComposer); + this._composers.set(OutgoingHeader.USER_HOME_ROOM, UpdateHomeRoomMessageComposer); + this._composers.set(OutgoingHeader.UPDATE_ROOM_THUMBNAIL, UpdateRoomThumbnailMessageComposer); + // NEW NAVIGATOR this._composers.set(OutgoingHeader.NAVIGATOR_INIT, NavigatorInitComposer); this._composers.set(OutgoingHeader.NAVIGATOR_SEARCH_CLOSE, NavigatorSearchCloseComposer); this._composers.set(OutgoingHeader.NAVIGATOR_SEARCH, NavigatorSearchComposer); this._composers.set(OutgoingHeader.NAVIGATOR_SEARCH_OPEN, NavigatorSearchOpenComposer); this._composers.set(OutgoingHeader.NAVIGATOR_SEARCH_SAVE, NavigatorSearchSaveComposer); - this._composers.set(OutgoingHeader.NAVIGATOR_SETTINGS, NavigatorSettingsComposer); this._composers.set(OutgoingHeader.NAVIGATOR_SETTINGS_SAVE, NavigatorSettingsSaveComposer); this._composers.set(OutgoingHeader.NAVIGATOR_CATEGORY_LIST_MODE, NavigatorCategoryListModeComposer); - this._composers.set(OutgoingHeader.CONVERT_GLOBAL_ROOM_ID, ConvertGlobalRoomIdMessageComposer); - this._composers.set(OutgoingHeader.ROOM_RIGHTS_REMOVE_OWN, RemoveOwnRoomRightsRoomMessageComposer); // POLL this._composers.set(OutgoingHeader.POLL_ANSWER, PollAnswerComposer); @@ -1173,7 +1222,6 @@ export class NitroMessages implements IMessageConfiguration this._composers.set(OutgoingHeader.USE_PET_PRODUCT, UsePetProductComposer); // ROOM - this._composers.set(OutgoingHeader.ROOM_CREATE, RoomCreateComposer); // ACCESS this._composers.set(OutgoingHeader.ROOM_ENTER, RoomEnterComposer); @@ -1190,12 +1238,9 @@ export class NitroMessages implements IMessageConfiguration this._composers.set(OutgoingHeader.ROOM_RIGHTS_REMOVE, RoomTakeRightsComposer); this._composers.set(OutgoingHeader.ROOM_RIGHTS_REMOVE_ALL, RemoveAllRightsMessageComposer); - this._composers.set(OutgoingHeader.ROOM_LIKE, RoomLikeRoomComposer); this._composers.set(OutgoingHeader.ROOM_DELETE, RoomDeleteComposer); - this._composers.set(OutgoingHeader.ROOM_STAFF_PICK, RoomStaffPickComposer); // DATA - this._composers.set(OutgoingHeader.ROOM_INFO, RoomInfoComposer); this._composers.set(OutgoingHeader.ROOM_SETTINGS, RoomSettingsComposer); this._composers.set(OutgoingHeader.ROOM_SETTINGS_SAVE, SaveRoomSettingsComposer); this._composers.set(OutgoingHeader.ROOM_RIGHTS_LIST, RoomUsersWithRightsComposer); @@ -1301,7 +1346,6 @@ export class NitroMessages implements IMessageConfiguration this._composers.set(OutgoingHeader.USER_UNIGNORE, UnignoreUserComposer); this._composers.set(OutgoingHeader.USER_BADGES_CURRENT, UserCurrentBadgesComposer); this._composers.set(OutgoingHeader.USER_FIGURE, UserFigureComposer); - this._composers.set(OutgoingHeader.USER_HOME_ROOM, UserHomeRoomComposer); this._composers.set(OutgoingHeader.USER_MOTTO, UserMottoComposer); this._composers.set(OutgoingHeader.USER_PROFILE, UserProfileComposer); this._composers.set(OutgoingHeader.USER_PROFILE_BY_NAME, GetExtendedProfileByNameMessageComposer); diff --git a/src/nitro/communication/messages/incoming/IncomingHeader.ts b/src/nitro/communication/messages/incoming/IncomingHeader.ts index 0ff09894..9da4cd38 100644 --- a/src/nitro/communication/messages/incoming/IncomingHeader.ts +++ b/src/nitro/communication/messages/incoming/IncomingHeader.ts @@ -99,6 +99,12 @@ export class IncomingHeader public static NAVIGATOR_SEARCH = 2690; public static NAVIGATOR_SEARCHES = 3984; public static NAVIGATOR_SETTINGS = 518; + public static THUMBNAIL_UPDATE_RESULT = 1927; + public static CAN_CREATE_ROOM = 378; + public static CATEGORIES_WITH_VISITOR_COUNT = 1455; + public static COMPETITION_ROOMS_DATA = 3954; + public static CONVERTED_ROOM_ID = 1331; + public static GUEST_ROOM_SEARCH_RESULT = 52; public static NOTIFICATION_LIST = 1992; public static PET_FIGURE_UPDATE = 1924; public static PET_INFO = 2901; @@ -137,7 +143,7 @@ export class IncomingHeader public static ROOM_SETTINGS_CHAT = 1191; public static ROOM_SETTINGS_SAVE = 948; public static ROOM_SETTINGS_SAVE_ERROR = 1555; - public static ROOM_SETTINGS_UPDATED = 3297; + public static ROOM_INFO_UPDATED = 3297; public static ROOM_SPECTATOR = 1033; public static ROOM_THICKNESS = 3547; public static INFO_FEED_ENABLE = 3284; @@ -190,6 +196,8 @@ export class IncomingHeader public static USER_FURNITURE_REFRESH = 3151; public static USER_FURNITURE_REMOVE = 159; public static USER_HOME_ROOM = 2875; + public static ROOM_EVENT_CANCEL = 3479; + public static ROOM_EVENT = 1840; public static USER_IGNORED = 126; public static USER_IGNORED_RESULT = 207; public static USER_INFO = 2725; @@ -375,4 +383,7 @@ export class IncomingHeader public static NOOBNESS_LEVEL = 3738; public static CAN_CREATE_ROOM_EVENT = 2599; public static FAVORITE_GROUP_UDPATE = 3403; + public static NO_SUCH_FLAT = 84; + public static ROOM_SETTINGS_ERROR = 2897; + public static SHOW_ENFORCE_ROOM_CATEGORY = 3896; } diff --git a/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEvent.ts b/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEvent.ts new file mode 100644 index 00000000..df5bc54e --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { CanCreateRoomMessageParser } from '../../parser/navigator/CanCreateRoomMessageParser'; + +export class CanCreateRoomEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, CanCreateRoomMessageParser); + } + + public getParser(): CanCreateRoomMessageParser + { + return this.parser as CanCreateRoomMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/CategoriesWithVisitorCountEvent.ts b/src/nitro/communication/messages/incoming/navigator/CategoriesWithVisitorCountEvent.ts new file mode 100644 index 00000000..4c8be049 --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/CategoriesWithVisitorCountEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { CategoriesWithVisitorCountParser } from '../../parser/navigator/CategoriesWithVisitorCountParser'; + +export class CategoriesWithVisitorCountEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, CategoriesWithVisitorCountParser); + } + + public getParser(): CategoriesWithVisitorCountParser + { + return this.parser as CategoriesWithVisitorCountParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/CompetitionRoomsDataMessageEvent.ts b/src/nitro/communication/messages/incoming/navigator/CompetitionRoomsDataMessageEvent.ts new file mode 100644 index 00000000..09328563 --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/CompetitionRoomsDataMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { CompetitionRoomsDataMessageParser } from '../../parser/navigator/CompetitionRoomsDataMessageParser'; + +export class CompetitionRoomsDataMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, CompetitionRoomsDataMessageParser); + } + + public getParser(): CompetitionRoomsDataMessageParser + { + return this.parser as CompetitionRoomsDataMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/ConvertedRoomIdEvent.ts b/src/nitro/communication/messages/incoming/navigator/ConvertedRoomIdEvent.ts new file mode 100644 index 00000000..7acb8c2e --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/ConvertedRoomIdEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { ConvertedRoomIdMessageParser } from '../../parser/navigator/ConvertedRoomIdMessageParser'; + +export class ConvertedRoomIdEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ConvertedRoomIdMessageParser); + } + + public getParser(): ConvertedRoomIdMessageParser + { + return this.parser as ConvertedRoomIdMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/DoorbellMessageEvent.ts b/src/nitro/communication/messages/incoming/navigator/DoorbellMessageEvent.ts new file mode 100644 index 00000000..ae5629cf --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/DoorbellMessageEvent.ts @@ -0,0 +1,21 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { DoorbellMessageParser } from '../../parser/navigator/DoorbellMessageParser'; + +export class DoorbellMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, DoorbellMessageParser); + } + + public getParser(): DoorbellMessageParser + { + return this.parser as DoorbellMessageParser; + } + + public get userName(): string + { + return this.getParser().userName; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/FavouriteChangedEvent.ts b/src/nitro/communication/messages/incoming/navigator/FavouriteChangedEvent.ts new file mode 100644 index 00000000..271abb37 --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/FavouriteChangedEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { FavouriteChangedMessageParser } from '../../parser/navigator/FavouriteChangedMessageParser'; + +export class FavouriteChangedEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, FavouriteChangedMessageParser); + } + + public getParser(): FavouriteChangedMessageParser + { + return this.parser as FavouriteChangedMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/FavouritesEvent.ts b/src/nitro/communication/messages/incoming/navigator/FavouritesEvent.ts new file mode 100644 index 00000000..99bc50c4 --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/FavouritesEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { FavouritesMessageParser } from '../../parser/navigator/FavouritesMessageParser'; + +export class FavouritesEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, FavouritesMessageParser); + } + + public getParser(): FavouritesMessageParser + { + return this.parser as FavouritesMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent.ts b/src/nitro/communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent.ts new file mode 100644 index 00000000..090f314c --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { FlatAccessDeniedMessageParser } from '../../parser/navigator/FlatAccessDeniedMessageParser'; + +export class FlatAccessDeniedMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, FlatAccessDeniedMessageParser); + } + + public getParser(): FlatAccessDeniedMessageParser + { + return this.parser as FlatAccessDeniedMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/FlatCreatedEvent.ts b/src/nitro/communication/messages/incoming/navigator/FlatCreatedEvent.ts new file mode 100644 index 00000000..a37585a1 --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/FlatCreatedEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { FlatCreatedMessageParser } from '../../parser/navigator/FlatCreatedMessageParser'; + +export class FlatCreatedEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, FlatCreatedMessageParser); + } + + public getParser(): FlatCreatedMessageParser + { + return this.parser as FlatCreatedMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/GetGuestRoomResultEvent.ts b/src/nitro/communication/messages/incoming/navigator/GetGuestRoomResultEvent.ts new file mode 100644 index 00000000..214af93d --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/GetGuestRoomResultEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { GetGuestRoomResultMessageParser } from '../../parser/navigator/GetGuestRoomResultMessageParser'; + +export class GetGuestRoomResultEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, GetGuestRoomResultMessageParser); + } + + public getParser(): GetGuestRoomResultMessageParser + { + return this.parser as GetGuestRoomResultMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/GuestRoomSearchResultEvent.ts b/src/nitro/communication/messages/incoming/navigator/GuestRoomSearchResultEvent.ts new file mode 100644 index 00000000..e1c4b0b2 --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/GuestRoomSearchResultEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { GuestRoomSearchResultMessageParser } from '../../parser/navigator/GuestRoomSearchResultMessageParser'; + +export class GuestRoomSearchResultEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, GuestRoomSearchResultMessageParser); + } + + public getParser(): GuestRoomSearchResultMessageParser + { + return this.parser as GuestRoomSearchResultMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorCategoriesEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorCategoriesEvent.ts deleted file mode 100644 index 8673f8fe..00000000 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorCategoriesEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; -import { NavigatorCategoriesParser } from '../../parser/navigator/NavigatorCategoriesParser'; - -export class NavigatorCategoriesEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, NavigatorCategoriesParser); - } - - public getParser(): NavigatorCategoriesParser - { - return this.parser as NavigatorCategoriesParser; - } -} diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorEventCategoriesEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorEventCategoriesEvent.ts deleted file mode 100644 index 403addb6..00000000 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorEventCategoriesEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; -import { NavigatorEventCategoriesParser } from '../../parser/navigator/NavigatorEventCategoriesParser'; - -export class NavigatorEventCategoriesEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, NavigatorEventCategoriesParser); - } - - public getParser(): NavigatorEventCategoriesParser - { - return this.parser as NavigatorEventCategoriesParser; - } -} diff --git a/src/nitro/communication/messages/incoming/navigator/RoomEventCancelEvent.ts b/src/nitro/communication/messages/incoming/navigator/RoomEventCancelEvent.ts new file mode 100644 index 00000000..da2a3ac7 --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/RoomEventCancelEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { RoomEventCancelMessageParser } from '../../parser/navigator/RoomEventCancelMessageParser'; + +export class RoomEventCancelEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, RoomEventCancelMessageParser); + } + + public getParser(): RoomEventCancelMessageParser + { + return this.parser as RoomEventCancelMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/RoomEventEvent.ts b/src/nitro/communication/messages/incoming/navigator/RoomEventEvent.ts new file mode 100644 index 00000000..f8a543d2 --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/RoomEventEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { RoomEventMessageParser } from '../../parser/navigator/RoomEventMessageParser'; + +export class RoomEventEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, RoomEventMessageParser); + } + + public getParser(): RoomEventMessageParser + { + return this.parser as RoomEventMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/room/data/RoomSettingsUpdatedEvent.ts b/src/nitro/communication/messages/incoming/navigator/RoomSettingsUpdatedEvent.ts similarity index 52% rename from src/nitro/communication/messages/incoming/room/data/RoomSettingsUpdatedEvent.ts rename to src/nitro/communication/messages/incoming/navigator/RoomSettingsUpdatedEvent.ts index d86030b7..4a1dfdb4 100644 --- a/src/nitro/communication/messages/incoming/room/data/RoomSettingsUpdatedEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/RoomSettingsUpdatedEvent.ts @@ -1,6 +1,6 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { RoomSettingsUpdatedParser } from '../../../parser/room/data/RoomSettingsUpdatedParser'; +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { RoomSettingsUpdatedParser } from '../../parser/navigator/RoomSettingsUpdatedParser'; export class RoomSettingsUpdatedEvent extends MessageEvent implements IMessageEvent { diff --git a/src/nitro/communication/messages/incoming/navigator/RoomThumbnailUpdateResultEvent.ts b/src/nitro/communication/messages/incoming/navigator/RoomThumbnailUpdateResultEvent.ts new file mode 100644 index 00000000..8631f984 --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/RoomThumbnailUpdateResultEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { RoomThumbnailUpdateResultMessageParser } from '../../parser/navigator/RoomThumbnailUpdateResultMessageParser'; + +export class RoomThumbnailUpdateResultEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, RoomThumbnailUpdateResultMessageParser); + } + + public getParser(): RoomThumbnailUpdateResultMessageParser + { + return this.parser as RoomThumbnailUpdateResultMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/UserEventCatsEvent.ts b/src/nitro/communication/messages/incoming/navigator/UserEventCatsEvent.ts new file mode 100644 index 00000000..b05f026d --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/UserEventCatsEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { UserEventCatsMessageParser } from '../../parser/navigator/UserEventCatsMessageParser'; + +export class UserEventCatsEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, UserEventCatsMessageParser); + } + + public getParser(): UserEventCatsMessageParser + { + return this.parser as UserEventCatsMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/UserFlatCatsEvent.ts b/src/nitro/communication/messages/incoming/navigator/UserFlatCatsEvent.ts new file mode 100644 index 00000000..205653fc --- /dev/null +++ b/src/nitro/communication/messages/incoming/navigator/UserFlatCatsEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { UserFlatCatsMessageParser } from '../../parser/navigator/UserFlatCatsMessageParser'; + +export class UserFlatCatsEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, UserFlatCatsMessageParser); + } + + public getParser(): UserFlatCatsMessageParser + { + return this.parser as UserFlatCatsMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/navigator/index.ts b/src/nitro/communication/messages/incoming/navigator/index.ts index a1f27087..4fc4d377 100644 --- a/src/nitro/communication/messages/incoming/navigator/index.ts +++ b/src/nitro/communication/messages/incoming/navigator/index.ts @@ -1,7 +1,16 @@ +export * from './CanCreateRoomEvent'; export * from './CanCreateRoomEventEvent'; -export * from './NavigatorCategoriesEvent'; +export * from './CategoriesWithVisitorCountEvent'; +export * from './CompetitionRoomsDataMessageEvent'; +export * from './ConvertedRoomIdEvent'; +export * from './DoorbellMessageEvent'; +export * from './FavouriteChangedEvent'; +export * from './FavouritesEvent'; +export * from './FlatAccessDeniedMessageEvent'; +export * from './FlatCreatedEvent'; +export * from './GetGuestRoomResultEvent'; +export * from './GuestRoomSearchResultEvent'; export * from './NavigatorCollapsedEvent'; -export * from './NavigatorEventCategoriesEvent'; export * from './NavigatorHomeRoomEvent'; export * from './NavigatorLiftedEvent'; export * from './NavigatorMetadataEvent'; @@ -9,3 +18,9 @@ export * from './NavigatorOpenRoomCreatorEvent'; export * from './NavigatorSearchesEvent'; export * from './NavigatorSearchEvent'; export * from './NavigatorSettingsEvent'; +export * from './RoomEventCancelEvent'; +export * from './RoomEventEvent'; +export * from './RoomSettingsUpdatedEvent'; +export * from './RoomThumbnailUpdateResultEvent'; +export * from './UserEventCatsEvent'; +export * from './UserFlatCatsEvent'; diff --git a/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellEvent.ts b/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellEvent.ts deleted file mode 100644 index 70e698fb..00000000 --- a/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellEvent.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; -import { RoomDoorbellParser } from '../../../../parser/room/access/doorbell/RoomDoorbellParser'; - -export class RoomDoorbellEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, RoomDoorbellParser); - } - - public getParser(): RoomDoorbellParser - { - return this.parser as RoomDoorbellParser; - } - - public get userName(): string - { - return this.getParser().userName; - } -} diff --git a/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellRejectedEvent.ts b/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellRejectedEvent.ts deleted file mode 100644 index 9dbda44d..00000000 --- a/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellRejectedEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; -import { RoomDoorbellRejectedParser } from '../../../../parser/room/access/doorbell/RoomDoorbellRejectedParser'; - -export class RoomDoorbellRejectedEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, RoomDoorbellRejectedParser); - } - - public getParser(): RoomDoorbellRejectedParser - { - return this.parser as RoomDoorbellRejectedParser; - } -} diff --git a/src/nitro/communication/messages/incoming/room/access/doorbell/index.ts b/src/nitro/communication/messages/incoming/room/access/doorbell/index.ts index 4517f2b5..ce67beea 100644 --- a/src/nitro/communication/messages/incoming/room/access/doorbell/index.ts +++ b/src/nitro/communication/messages/incoming/room/access/doorbell/index.ts @@ -1,3 +1 @@ export * from './RoomDoorbellAcceptedEvent'; -export * from './RoomDoorbellEvent'; -export * from './RoomDoorbellRejectedEvent'; diff --git a/src/nitro/communication/messages/incoming/room/data/GetGuestRoomResultEvent.ts b/src/nitro/communication/messages/incoming/room/data/GetGuestRoomResultEvent.ts deleted file mode 100644 index 98eb78fb..00000000 --- a/src/nitro/communication/messages/incoming/room/data/GetGuestRoomResultEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { RoomInfoParser } from '../../../parser/room/data/RoomInfoParser'; - -export class GetGuestRoomResultEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, RoomInfoParser); - } - - public getParser(): RoomInfoParser - { - return this.parser as RoomInfoParser; - } -} diff --git a/src/nitro/communication/messages/incoming/room/data/RoomSettingsEvent.ts b/src/nitro/communication/messages/incoming/room/data/RoomSettingsEvent.ts deleted file mode 100644 index d3aa520d..00000000 --- a/src/nitro/communication/messages/incoming/room/data/RoomSettingsEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { RoomSettingsParser } from '../../../parser/room/data/RoomSettingsParser'; - -export class RoomSettingsEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, RoomSettingsParser); - } - - public getParser(): RoomSettingsParser - { - return this.parser as RoomSettingsParser; - } -} diff --git a/src/nitro/communication/messages/incoming/room/data/index.ts b/src/nitro/communication/messages/incoming/room/data/index.ts index 10db64b0..e0187f08 100644 --- a/src/nitro/communication/messages/incoming/room/data/index.ts +++ b/src/nitro/communication/messages/incoming/room/data/index.ts @@ -1,8 +1,3 @@ -export * from './GetGuestRoomResultEvent'; export * from './RoomChatSettingsEvent'; export * from './RoomEntryInfoMessageEvent'; export * from './RoomScoreEvent'; -export * from './RoomSettingsErrorEvent'; -export * from './RoomSettingsEvent'; -export * from './RoomSettingsSavedEvent'; -export * from './RoomSettingsUpdatedEvent'; diff --git a/src/nitro/communication/messages/incoming/room/engine/RoomCreatedEvent.ts b/src/nitro/communication/messages/incoming/room/engine/RoomCreatedEvent.ts deleted file mode 100644 index b4f043e4..00000000 --- a/src/nitro/communication/messages/incoming/room/engine/RoomCreatedEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { RoomCreatedParser } from '../../../parser/room/engine/RoomCreatedParser'; - -export class RoomCreatedEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, RoomCreatedParser); - } - - public getParser(): RoomCreatedParser - { - return this.parser as RoomCreatedParser; - } -} diff --git a/src/nitro/communication/messages/incoming/room/engine/index.ts b/src/nitro/communication/messages/incoming/room/engine/index.ts index efc44418..fd42db32 100644 --- a/src/nitro/communication/messages/incoming/room/engine/index.ts +++ b/src/nitro/communication/messages/incoming/room/engine/index.ts @@ -1,4 +1,3 @@ export * from './ObjectData'; export * from './ObjectsDataUpdateEvent'; export * from './ObjectsRollingEvent'; -export * from './RoomCreatedEvent'; diff --git a/src/nitro/communication/messages/incoming/roomevents/RoomMutedEvent.ts b/src/nitro/communication/messages/incoming/roomevents/RoomMutedEvent.ts deleted file mode 100644 index a9050297..00000000 --- a/src/nitro/communication/messages/incoming/roomevents/RoomMutedEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; -import { RoomMutedParser } from '../../parser/roomevents/RoomMutedParser'; - -export class RoomMutedEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, RoomMutedParser); - } - - public getParser(): RoomMutedParser - { - return this.parser as RoomMutedParser; - } -} diff --git a/src/nitro/communication/messages/incoming/roomevents/index.ts b/src/nitro/communication/messages/incoming/roomevents/index.ts index d3180bd8..fc0b3ca2 100644 --- a/src/nitro/communication/messages/incoming/roomevents/index.ts +++ b/src/nitro/communication/messages/incoming/roomevents/index.ts @@ -1,5 +1,4 @@ export * from './ConditionDefinition'; -export * from './RoomMutedEvent'; export * from './Triggerable'; export * from './TriggerDefinition'; export * from './WiredActionDefinition'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/MuteAllInRoomEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/MuteAllInRoomEvent.ts new file mode 100644 index 00000000..fe4b1b95 --- /dev/null +++ b/src/nitro/communication/messages/incoming/roomsettings/MuteAllInRoomEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { MuteAllInRoomParser } from '../../parser/roomsettings/MuteAllInRoomParser'; + +export class MuteAllInRoomEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, MuteAllInRoomParser); + } + + public getParser(): MuteAllInRoomParser + { + return this.parser as MuteAllInRoomParser; + } +} diff --git a/src/nitro/communication/messages/incoming/roomsettings/NoSuchFlatEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/NoSuchFlatEvent.ts new file mode 100644 index 00000000..7200dc9f --- /dev/null +++ b/src/nitro/communication/messages/incoming/roomsettings/NoSuchFlatEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { NoSuchFlatParser } from '../../parser/roomsettings/NoSuchFlatParser'; + +export class NoSuchFlatEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, NoSuchFlatParser); + } + + public getParser(): NoSuchFlatParser + { + return this.parser as NoSuchFlatParser; + } +} diff --git a/src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomChatSettings.ts similarity index 77% rename from src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts rename to src/nitro/communication/messages/incoming/roomsettings/RoomChatSettings.ts index 4661aabd..7954621b 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomChatSettings.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../core'; export class RoomChatSettings { @@ -24,32 +24,11 @@ export class RoomChatSettings { if(!wrapper) throw new Error('invalid_wrapper'); - this.flush(); - this.parse(wrapper); - } - - public flush(): boolean - { - this._mode = 0; - this._weight = 0; - this._speed = 0; - this._distance = 0; - this._protection = 0; - - return true; - } - - public parse(wrapper: IMessageDataWrapper): boolean - { - if(!wrapper) return false; - this._mode = wrapper.readInt(); this._weight = wrapper.readInt(); this._speed = wrapper.readInt(); this._distance = wrapper.readInt(); this._protection = wrapper.readInt(); - - return true; } public get mode(): number diff --git a/src/nitro/communication/messages/parser/room/data/RoomModerationSettings.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomModerationSettings.ts similarity index 70% rename from src/nitro/communication/messages/parser/room/data/RoomModerationSettings.ts rename to src/nitro/communication/messages/incoming/roomsettings/RoomModerationSettings.ts index f8473f28..e2cde802 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomModerationSettings.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomModerationSettings.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../core'; export class RoomModerationSettings { @@ -11,19 +11,6 @@ export class RoomModerationSettings private _allowBan: number; constructor(wrapper: IMessageDataWrapper) - { - this.reset(); - this.parse(wrapper); - } - - private reset(): void - { - this._allowMute = 0; - this._allowKick = 0; - this._allowBan = 0; - } - - public parse(wrapper: IMessageDataWrapper): void { this._allowMute = wrapper.readInt(); this._allowKick = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsData.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsData.ts new file mode 100644 index 00000000..aa7a65c9 --- /dev/null +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsData.ts @@ -0,0 +1,332 @@ +import { BannedUserData } from './BannedUserData'; +import { FlatControllerData } from './FlatControllerData'; +import { RoomChatSettings } from './RoomChatSettings'; +import { RoomModerationSettings } from './RoomModerationSettings'; + +export class RoomSettingsData +{ + public static DOORMODE_OPEN: number = 0; + public static DOORMODE_CLOSED: number = 1; + public static DOORMODE_PASSWORD: number = 2; + public static DOORMODE_INVISIBLE: number = 3; + public static DOORMODE_NOOBS_ONLY: number = 4; + public static TRADEMODE_NOT_ALLOWED: number = 0; + public static TRADEMODE_WITH_CONTROLLER: number = 1; + public static TRADEMODE_ALLOWED: number = 2; + + private _roomId: number = -1; + private _name: string = null; + private _description: string = null; + private _doorMode: number = RoomSettingsData.DOORMODE_OPEN; + private _categoryId: number = -1; + private _maximumVisitors: number = 0; + private _maximumVisitorsLimit: number = 0; + private _tags: string[] = []; + private _tradeMode: number = RoomSettingsData.TRADEMODE_NOT_ALLOWED; + private _allowPets: boolean = false; + private _allowFoodConsume: boolean = false; + private _allowWalkThrough: boolean = false; + private _hideWalls: boolean = false; + private _wallThickness: number = 0; + private _floorThickness: number = 0; + private _controllersById: Map = new Map(); + private _controllerList: FlatControllerData[] = null; + private _highlightedUserId: number = -1; + private _bannedUsersById: Map = new Map(); + private _bannedUsersList: BannedUserData[] = null; + private _roomModerationSettings: RoomModerationSettings = null; + private _chatSettings: RoomChatSettings = null; + private _allowNavigatorDynamicCats: boolean = false; + + public static from(settings: RoomSettingsData) + { + const instance = new RoomSettingsData(); + + instance._roomId = settings._roomId; + instance._name = settings._name; + instance._description = settings._description; + instance._doorMode = settings._doorMode; + instance._categoryId = settings._categoryId; + instance._maximumVisitors = settings._maximumVisitors; + instance._maximumVisitorsLimit = settings._maximumVisitorsLimit; + instance._tags = settings._tags; + instance._tradeMode = settings._tradeMode; + instance._allowPets = settings._allowPets; + instance._allowFoodConsume = settings._allowFoodConsume; + instance._allowWalkThrough = settings._allowWalkThrough; + instance._hideWalls = settings._hideWalls; + instance._wallThickness = settings._wallThickness; + instance._floorThickness = settings._floorThickness; + instance._controllersById = settings._controllersById; + instance._controllerList = settings._controllerList; + instance._highlightedUserId = settings._highlightedUserId; + instance._bannedUsersById = settings._bannedUsersById; + instance._bannedUsersList = settings._bannedUsersList; + instance._roomModerationSettings = settings._roomModerationSettings; + instance._chatSettings = settings._chatSettings; + instance._allowNavigatorDynamicCats = settings._allowNavigatorDynamicCats; + + return instance; + } + + // public static _Str_26097(k: number): string + // { + // switch (k) + // { + // case RoomSettingsData.DOORMODE_OPEN: + // return "${navigator.door.mode.open}"; + // case RoomSettingsData.DOORMODE_CLOSED: + // return "${navigator.door.mode.closed}"; + // case RoomSettingsData.DOORMODE_PASSWORD: + // return "${navigator.door.mode.password}"; + // case RoomSettingsData.DOORMODE_INVISIBLE: + // return "${navigator.door.mode.invisible}"; + // case RoomSettingsData.DOORMODE_NOOBS_ONLY: + // return "${navigator.door.mode.noobs_only}"; + // } + // return ""; + // } + + public get tradeMode(): number + { + return this._tradeMode; + } + + public set tradeMode(mode: number) + { + this._tradeMode = mode; + } + + public get allowPets(): boolean + { + return this._allowPets; + } + + public set allowPets(flag: boolean) + { + this._allowPets = flag; + } + + public get allowFoodConsume(): boolean + { + return this._allowFoodConsume; + } + + public set allowFoodConsume(flag: boolean) + { + this._allowFoodConsume = flag; + } + + public get allowWalkThrough(): boolean + { + return this._allowWalkThrough; + } + + public set allowWalkThrough(flag: boolean) + { + this._allowWalkThrough = flag; + } + + public get hideWalls(): boolean + { + return this._hideWalls; + } + + public set hideWalls(flag: boolean) + { + this._hideWalls = flag; + } + + public get wallThickness(): number + { + return this._wallThickness; + } + + public set wallThickness(thickness: number) + { + this._wallThickness = thickness; + } + + public get floorThickness(): number + { + return this._floorThickness; + } + + public set floorThickness(thickness: number) + { + this._floorThickness = thickness; + } + + public get roomId(): number + { + return this._roomId; + } + + public set roomId(id: number) + { + this._roomId = id; + } + + public get name(): string + { + return this._name; + } + + public set name(name: string) + { + this._name = name; + } + + public get description(): string + { + return this._description; + } + + public set description(description: string) + { + this._description = description; + } + + public get doorMode(): number + { + return this._doorMode; + } + + public set doorMode(mode: number) + { + this._doorMode = mode; + } + + public get categoryId(): number + { + return this._categoryId; + } + + public set categoryId(id: number) + { + this._categoryId = id; + } + + public get maximumVisitors(): number + { + return this._maximumVisitors; + } + + public set maximumVisitors(max: number) + { + this._maximumVisitors = max; + } + + public get maximumVisitorsLimit(): number + { + return this._maximumVisitorsLimit; + } + + public set maximumVisitorsLimit(limit: number) + { + this._maximumVisitorsLimit = limit; + } + + public get tags(): string[] + { + return this._tags; + } + + public set tags(tags: string[]) + { + this._tags = tags; + } + + public _Str_17474(id: number, data: FlatControllerData): void + { + this._controllersById.set(id, data); + + this._controllerList = null; + this._highlightedUserId = id; + } + + public get roomModerationSettings(): RoomModerationSettings + { + return this._roomModerationSettings; + } + + public set roomModerationSettings(settings: RoomModerationSettings) + { + this._roomModerationSettings = settings; + } + + public get controllersById(): Map + { + return this._controllersById; + } + + public set controllersById(controllers: Map) + { + this._controllersById = controllers; + } + + public get controllerList(): FlatControllerData[] + { + if(!this._controllerList) + { + this._controllerList = []; + + for(const controllerData of this._controllersById.values()) this._controllerList.push(controllerData); + + this._controllerList.sort((a, b) => a.userName.localeCompare(b.userName)); + } + + return this._controllerList; + } + + public get highlightedUserId(): number + { + return this._highlightedUserId; + } + + public _Str_22019(id: number, data: BannedUserData): void + { + this._bannedUsersById.set(id, data); + + this._bannedUsersList = null; + } + + public get bannedUsersById(): Map + { + return this._bannedUsersById; + } + + public get bannedUsersList(): BannedUserData[] + { + if(!this._bannedUsersList) + { + this._bannedUsersList = []; + + for(const bannedUserData of this._bannedUsersById.values()) this._bannedUsersList.push(bannedUserData); + + this._bannedUsersList.sort((a, b) => a.userName.localeCompare(b.userName)); + } + + return this._bannedUsersList; + } + + public get chatSettings(): RoomChatSettings + { + return this._chatSettings; + } + + public set chatSettings(settings: RoomChatSettings) + { + this._chatSettings = settings; + } + + public get allowNavigatorDynamicCats(): boolean + { + return this._allowNavigatorDynamicCats; + } + + public set allowNavigatorDynamicCats(flag: boolean) + { + this._allowNavigatorDynamicCats = flag; + } +} diff --git a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsDataEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsDataEvent.ts new file mode 100644 index 00000000..50486457 --- /dev/null +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsDataEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { RoomSettingsDataParser } from '../../parser/roomsettings/RoomSettingsDataParser'; + +export class RoomSettingsDataEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, RoomSettingsDataParser); + } + + public getParser(): RoomSettingsDataParser + { + return this.parser as RoomSettingsDataParser; + } +} diff --git a/src/nitro/communication/messages/incoming/room/data/RoomSettingsErrorEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsErrorEvent.ts similarity index 52% rename from src/nitro/communication/messages/incoming/room/data/RoomSettingsErrorEvent.ts rename to src/nitro/communication/messages/incoming/roomsettings/RoomSettingsErrorEvent.ts index 8e75b0b9..b99ef07a 100644 --- a/src/nitro/communication/messages/incoming/room/data/RoomSettingsErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsErrorEvent.ts @@ -1,6 +1,6 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { RoomSettingsErrorParser } from '../../../parser/room/data/RoomSettingsErrorParser'; +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { RoomSettingsErrorParser } from '../../parser/roomsettings/RoomSettingsErrorParser'; export class RoomSettingsErrorEvent extends MessageEvent implements IMessageEvent { diff --git a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSaveErrorEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSaveErrorEvent.ts new file mode 100644 index 00000000..948eb238 --- /dev/null +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSaveErrorEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { RoomSettingsSaveErrorParser } from '../../parser/roomsettings/RoomSettingsSaveErrorParser'; + +export class RoomSettingsSaveErrorEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, RoomSettingsSaveErrorParser); + } + + public getParser(): RoomSettingsSaveErrorParser + { + return this.parser as RoomSettingsSaveErrorParser; + } +} diff --git a/src/nitro/communication/messages/incoming/room/data/RoomSettingsSavedEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSavedEvent.ts similarity index 52% rename from src/nitro/communication/messages/incoming/room/data/RoomSettingsSavedEvent.ts rename to src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSavedEvent.ts index cb9bdcfa..42eb4fd9 100644 --- a/src/nitro/communication/messages/incoming/room/data/RoomSettingsSavedEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSavedEvent.ts @@ -1,6 +1,6 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { RoomSettingsSavedParser } from '../../../parser/room/data/RoomSettingsSavedParser'; +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { RoomSettingsSavedParser } from '../../parser/roomsettings/RoomSettingsSavedParser'; export class RoomSettingsSavedEvent extends MessageEvent implements IMessageEvent { diff --git a/src/nitro/communication/messages/incoming/roomsettings/ShowEnforceRoomCategoryDialogEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/ShowEnforceRoomCategoryDialogEvent.ts new file mode 100644 index 00000000..a6cd16cf --- /dev/null +++ b/src/nitro/communication/messages/incoming/roomsettings/ShowEnforceRoomCategoryDialogEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { ShowEnforceRoomCategoryDialogParser } from '../../parser/roomsettings/ShowEnforceRoomCategoryDialogParser'; + +export class ShowEnforceRoomCategoryDialogEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ShowEnforceRoomCategoryDialogParser); + } + + public getParser(): ShowEnforceRoomCategoryDialogParser + { + return this.parser as ShowEnforceRoomCategoryDialogParser; + } +} diff --git a/src/nitro/communication/messages/incoming/roomsettings/UserUnbannedFromRoomEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/UserUnbannedFromRoomEvent.ts new file mode 100644 index 00000000..ec9a4c14 --- /dev/null +++ b/src/nitro/communication/messages/incoming/roomsettings/UserUnbannedFromRoomEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { UserUnbannedFromRoomParser } from '../../parser/roomsettings/UserUnbannedFromRoomParser'; + +export class UserUnbannedFromRoomEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, UserUnbannedFromRoomParser); + } + + public getParser(): UserUnbannedFromRoomParser + { + return this.parser as UserUnbannedFromRoomParser; + } +} diff --git a/src/nitro/communication/messages/incoming/roomsettings/index.ts b/src/nitro/communication/messages/incoming/roomsettings/index.ts index 23be8bde..a30ed0ec 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/index.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/index.ts @@ -5,3 +5,11 @@ export * from './FlatControllerData'; export * from './FlatControllerRemovedEvent'; export * from './FlatControllersEvent'; export * from './IFlatUser'; +export * from './MuteAllInRoomEvent'; +export * from './NoSuchFlatEvent'; +export * from './RoomChatSettings'; +export * from './RoomModerationSettings'; +export * from './RoomSettingsData'; +export * from './RoomSettingsDataEvent'; +export * from './RoomSettingsErrorEvent'; +export * from './RoomSettingsSaveErrorEvent'; diff --git a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts index 6467ab4a..e68c6d0d 100644 --- a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts +++ b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts @@ -101,13 +101,13 @@ export class OutgoingHeader public static HABBO_SEARCH = 1210; public static FRIEND_LIST_UPDATE = 1419; public static MOD_TOOL_USER_INFO = 3295; - public static NAVIGATOR_CATEGORIES = 3027; + public static GET_USER_FLAT_CATS = 3027; public static NAVIGATOR_INIT = 2110; public static NAVIGATOR_SEARCH = 249; public static NAVIGATOR_SEARCH_CLOSE = 1834; public static NAVIGATOR_SEARCH_OPEN = 637; public static NAVIGATOR_SEARCH_SAVE = 2226; - public static NAVIGATOR_SETTINGS = 1782; + public static GET_USER_EVENT_CATS = 1782; public static NAVIGATOR_SETTINGS_SAVE = 3159; public static NAVIGATOR_CATEGORY_LIST_MODE = 1202; public static PET_INFO = 2934; @@ -129,7 +129,34 @@ export class OutgoingHeader public static ROOM_ENTER = 2312; public static ROOM_FAVORITE = 3817; public static ROOM_FAVORITE_REMOVE = 309; - public static ROOM_INFO = 2230; + public static CAN_CREATE_ROOM = 2128; + public static CANCEL_ROOM_EVENT = 2725; + public static EDIT_ROOM_EVENT = 3991; + public static COMPETITION_ROOM_SEARCH = 433; + public static FORWARD_TO_RANDOM_PROMOTED_ROOM = 10; + public static FORWARD_TO_SOME_ROOM = 1703; + public static GET_CATEGORIES_WITH_USER_COUNT = 3782; + public static GET_GUEST_ROOM = 2230; + public static GET_OFFICIAL_ROOMS = 1229; + public static GET_POPULAR_ROOM_TAGS = 826; + public static GUILD_BASE_SEARCH = 2930; + public static MY_FAVOURITE_ROOMS_SEARCH = 2578; + public static MY_FREQUENT_ROOM_HISTORY_SEARCH = 1002; + public static MY_FRIENDS_ROOM_SEARCH = 2266; + public static MY_GUILD_BASES_SEARCH = 39; + public static MY_RECOMMENDED_ROOMS = 2537; + public static MY_ROOM_HISTORY_SEARCH = 2264; + public static MY_ROOM_RIGHTS_SEARCH = 272; + public static MY_ROOMS_SEARCH = 2277; + public static POPULAR_ROOMS_SEARCH = 2758; + public static ROOM_AD_EVENT_TAB_CLICKED = 2412; + public static ROOM_AD_EVENT_TAB_VIEWED = 2668; + public static ROOM_AD_SEARCH = 2809; + public static ROOM_TEXT_SEARCH = 3943; + public static ROOMS_WHERE_MY_FRIENDS_ARE = 1786; + public static ROOMS_WITH_HIGHEST_SCORE_SEARCH = 2939; + public static SET_ROOM_SESSION_TAGS = 3305; + public static UPDATE_ROOM_THUMBNAIL = 2468; public static ROOM_KICK = 1320; public static ROOM_LIKE = 3582; public static ROOM_MODEL = 2300; diff --git a/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts b/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts index 775075bc..41bdd43c 100644 --- a/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts @@ -9,7 +9,7 @@ export class ClientHelloMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(roomId: number) + { + this._data = [ roomId ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoriesComposer.ts b/src/nitro/communication/messages/outgoing/navigator/CanCreateRoomMessageComposer.ts similarity index 57% rename from src/nitro/communication/messages/outgoing/navigator/NavigatorCategoriesComposer.ts rename to src/nitro/communication/messages/outgoing/navigator/CanCreateRoomMessageComposer.ts index 0b343158..27c702c8 100644 --- a/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoriesComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/CanCreateRoomMessageComposer.ts @@ -1,8 +1,8 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class NavigatorCategoriesComposer implements IMessageComposer> +export class CanCreateRoomMessageComposer implements IMessageComposer> { - private _data: ConstructorParameters; + private _data: ConstructorParameters; constructor() { @@ -18,4 +18,4 @@ export class NavigatorCategoriesComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: number) + { + this._data = [ k ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/CompetitionRoomsSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/CompetitionRoomsSearchMessageComposer.ts new file mode 100644 index 00000000..fb51fde5 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/CompetitionRoomsSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class CompetitionRoomsSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k:number, _arg_2:number) + { + this._data = [k, _arg_2]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/room/RoomCreateComposer.ts b/src/nitro/communication/messages/outgoing/navigator/CreateFlatMessageComposer.ts similarity index 69% rename from src/nitro/communication/messages/outgoing/room/RoomCreateComposer.ts rename to src/nitro/communication/messages/outgoing/navigator/CreateFlatMessageComposer.ts index d7c72bc4..e0ca2d55 100644 --- a/src/nitro/communication/messages/outgoing/room/RoomCreateComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/CreateFlatMessageComposer.ts @@ -1,8 +1,8 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class RoomCreateComposer implements IMessageComposer> +export class CreateFlatMessageComposer implements IMessageComposer> { - private _data: ConstructorParameters; + private _data: ConstructorParameters; constructor(roomName: string, roomDesc: string, modelName: string, categoryId: number, maxVisitors: number, tradeType: number) { @@ -18,4 +18,4 @@ export class RoomCreateComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: number) + { + this._data = [ k ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/EditEventMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/EditEventMessageComposer.ts new file mode 100644 index 00000000..b533c335 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/EditEventMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class EditEventMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k:number, _arg_2:string, _arg_3:string) + { + this._data = [ k, _arg_2, _arg_3 ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts new file mode 100644 index 00000000..edbc7dd1 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class ForwardToARandomPromotedRoomMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k:string) + { + this._data = [ k ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts new file mode 100644 index 00000000..168d4264 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class ForwardToSomeRoomMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k:string) + { + this._data = [ k ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/GetCategoriesWithUserCountMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetCategoriesWithUserCountMessageComposer.ts new file mode 100644 index 00000000..cd7aa76f --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/GetCategoriesWithUserCountMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class GetCategoriesWithUserCountMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/room/data/RoomInfoComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetGuestRoomMessageComposer.ts similarity index 63% rename from src/nitro/communication/messages/outgoing/room/data/RoomInfoComposer.ts rename to src/nitro/communication/messages/outgoing/navigator/GetGuestRoomMessageComposer.ts index 8cc41a64..cd738f42 100644 --- a/src/nitro/communication/messages/outgoing/room/data/RoomInfoComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/GetGuestRoomMessageComposer.ts @@ -1,6 +1,6 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class RoomInfoComposer implements IMessageComposer<[ number, number, number ]> +export class GetGuestRoomMessageComposer implements IMessageComposer<[ number, number, number ]> { private _data: [ number, number, number ]; @@ -18,4 +18,4 @@ export class RoomInfoComposer implements IMessageComposer<[ number, number, numb { return; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts new file mode 100644 index 00000000..cb7e2dba --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class GetOfficialRoomsMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: number = 0) + { + this._data = [ k ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/GetPopularRoomTagsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetPopularRoomTagsMessageComposer.ts new file mode 100644 index 00000000..09e9bf40 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/GetPopularRoomTagsMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class GetPopularRoomTagsMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/GetUserEventCatsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetUserEventCatsMessageComposer.ts new file mode 100644 index 00000000..8b689388 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/GetUserEventCatsMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class GetUserEventCatsMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/GetUserFlatCatsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetUserFlatCatsMessageComposer.ts new file mode 100644 index 00000000..f9165523 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/GetUserFlatCatsMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class GetUserFlatCatsMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts new file mode 100644 index 00000000..fbf55d28 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class GuildBaseSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: number) + { + this._data = [ k ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/MyFavouriteRoomsSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyFavouriteRoomsSearchMessageComposer.ts new file mode 100644 index 00000000..e1739e46 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/MyFavouriteRoomsSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class MyFavouriteRoomsSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/MyFrequentRoomHistorySearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyFrequentRoomHistorySearchMessageComposer.ts new file mode 100644 index 00000000..68ab11b6 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/MyFrequentRoomHistorySearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class MyFrequentRoomHistorySearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/MyFriendsRoomsSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyFriendsRoomsSearchMessageComposer.ts new file mode 100644 index 00000000..dfcf9d27 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/MyFriendsRoomsSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class MyFriendsRoomsSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/MyGuildBasesSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyGuildBasesSearchMessageComposer.ts new file mode 100644 index 00000000..723cf7db --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/MyGuildBasesSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class MyGuildBasesSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/MyRecommendedRoomsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyRecommendedRoomsMessageComposer.ts new file mode 100644 index 00000000..6d571789 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/MyRecommendedRoomsMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class MyRecommendedRoomsMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/MyRoomHistorySearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyRoomHistorySearchMessageComposer.ts new file mode 100644 index 00000000..a01ef2c9 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/MyRoomHistorySearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class MyRoomHistorySearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/MyRoomRightsSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyRoomRightsSearchMessageComposer.ts new file mode 100644 index 00000000..fbb5b57c --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/MyRoomRightsSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class MyRoomRightsSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/NavigatorSettingsComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyRoomsSearchMessageComposer.ts similarity index 57% rename from src/nitro/communication/messages/outgoing/navigator/NavigatorSettingsComposer.ts rename to src/nitro/communication/messages/outgoing/navigator/MyRoomsSearchMessageComposer.ts index 48c6c238..62b2ea25 100644 --- a/src/nitro/communication/messages/outgoing/navigator/NavigatorSettingsComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/MyRoomsSearchMessageComposer.ts @@ -1,8 +1,8 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class NavigatorSettingsComposer implements IMessageComposer> +export class MyRoomsSearchMessageComposer implements IMessageComposer> { - private _data: ConstructorParameters; + private _data: ConstructorParameters; constructor() { @@ -18,4 +18,4 @@ export class NavigatorSettingsComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k:string, _arg_2:number) + { + this._data = [ k, _arg_2 ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts new file mode 100644 index 00000000..01e29c09 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class RateFlatMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: number) + { + this._data = [ k ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts new file mode 100644 index 00000000..eb95aef4 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class RoomAdEventTabAdClickedComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k:number, _arg_2:string, _arg_3:number) + { + this._data = [ k, _arg_2, _arg_3 ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabViewedComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabViewedComposer.ts new file mode 100644 index 00000000..beae56d4 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabViewedComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class RoomAdEventTabViewedComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts new file mode 100644 index 00000000..9b983107 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class RoomAdSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: number, _arg_2: number) + { + this._data = [ k, _arg_2 ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomTextSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomTextSearchMessageComposer.ts new file mode 100644 index 00000000..6d666ca9 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/RoomTextSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class RoomTextSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: string) + { + this._data = [ k ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomsWhereMyFriendsAreSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomsWhereMyFriendsAreSearchMessageComposer.ts new file mode 100644 index 00000000..33a8ee90 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/RoomsWhereMyFriendsAreSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class RoomsWhereMyFriendsAreSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts new file mode 100644 index 00000000..2ce8b9df --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class RoomsWithHighestScoreSearchMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: number) + { + this._data = [ k ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts new file mode 100644 index 00000000..81efad20 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class SetRoomSessionTagsMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: string, _arg_2: string) + { + this._data = [ k, _arg_2 ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/ToggleStaffPickMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/ToggleStaffPickMessageComposer.ts new file mode 100644 index 00000000..0ebf7bbb --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/ToggleStaffPickMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class ToggleStaffPickMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(roomId: number) + { + this._data = [ roomId ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/UpdateHomeRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/UpdateHomeRoomMessageComposer.ts new file mode 100644 index 00000000..f19cf7c6 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/UpdateHomeRoomMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class UpdateHomeRoomMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(roomId: number) + { + this._data = [ roomId ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/UpdateRoomThumbnailMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/UpdateRoomThumbnailMessageComposer.ts new file mode 100644 index 00000000..689cb219 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/navigator/UpdateRoomThumbnailMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class UpdateRoomThumbnailMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(flatId:number, bgImgId:number, frontImgId:number, objCount:number) + { + this._data = [ flatId, bgImgId, frontImgId, objCount ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/navigator/index.ts b/src/nitro/communication/messages/outgoing/navigator/index.ts index 7f55a50b..5a69dd9c 100644 --- a/src/nitro/communication/messages/outgoing/navigator/index.ts +++ b/src/nitro/communication/messages/outgoing/navigator/index.ts @@ -1,11 +1,45 @@ +export * from './AddFavouriteRoomMessageComposer'; +export * from './CancelEventMessageComposer'; +export * from './CanCreateRoomMessageComposer'; +export * from './CompetitionRoomsSearchMessageComposer'; export * from './ConvertGlobalRoomIdComposer'; -export * from './NavigatorCategoriesComposer'; +export * from './CreateFlatMessageComposer'; +export * from './DeleteFavouriteRoomMessageComposer'; +export * from './EditEventMessageComposer'; +export * from './ForwardToARandomPromotedRoomMessageComposer'; +export * from './ForwardToSomeRoomMessageComposer'; +export * from './GetCategoriesWithUserCountMessageComposer'; +export * from './GetGuestRoomMessageComposer'; +export * from './GetOfficialRoomsMessageComposer'; +export * from './GetPopularRoomTagsMessageComposer'; +export * from './GetUserEventCatsMessageComposer'; +export * from './GetUserFlatCatsMessageComposer'; +export * from './GuildBaseSearchMessageComposer'; +export * from './MyFavouriteRoomsSearchMessageComposer'; +export * from './MyFrequentRoomHistorySearchMessageComposer'; +export * from './MyFriendsRoomsSearchMessageComposer'; +export * from './MyGuildBasesSearchMessageComposer'; +export * from './MyRecommendedRoomsMessageComposer'; +export * from './MyRoomHistorySearchMessageComposer'; +export * from './MyRoomRightsSearchMessageComposer'; +export * from './MyRoomsSearchMessageComposer'; export * from './NavigatorCategoryListModeComposer'; export * from './NavigatorInitComposer'; export * from './NavigatorSearchCloseComposer'; export * from './NavigatorSearchComposer'; export * from './NavigatorSearchOpenComposer'; export * from './NavigatorSearchSaveComposer'; -export * from './NavigatorSettingsComposer'; export * from './NavigatorSettingsSaveComposer'; +export * from './PopularRoomsSearchMessageComposer'; +export * from './RateFlatMessageComposer'; export * from './RemoveOwnRoomRightsRoomMessageComposer'; +export * from './RoomAdEventTabAdClickedComposer'; +export * from './RoomAdEventTabViewedComposer'; +export * from './RoomAdSearchMessageComposer'; +export * from './RoomsWhereMyFriendsAreSearchMessageComposer'; +export * from './RoomsWithHighestScoreSearchMessageComposer'; +export * from './RoomTextSearchMessageComposer'; +export * from './SetRoomSessionTagsMessageComposer'; +export * from './ToggleStaffPickMessageComposer'; +export * from './UpdateHomeRoomMessageComposer'; +export * from './UpdateRoomThumbnailMessageComposer'; diff --git a/src/nitro/communication/messages/outgoing/room/action/RoomLikeRoomComposer.ts b/src/nitro/communication/messages/outgoing/room/action/RoomLikeRoomComposer.ts deleted file mode 100644 index 19824d31..00000000 --- a/src/nitro/communication/messages/outgoing/room/action/RoomLikeRoomComposer.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; - -export class RoomLikeRoomComposer implements IMessageComposer> -{ - private _data: ConstructorParameters; - - constructor(k: number) - { - this._data = [ k ]; - } - - public getMessageArray() - { - return this._data; - } - - public dispose(): void - { - return; - } -} diff --git a/src/nitro/communication/messages/outgoing/room/action/RoomStaffPickComposer.ts b/src/nitro/communication/messages/outgoing/room/action/RoomStaffPickComposer.ts deleted file mode 100644 index d0ca63eb..00000000 --- a/src/nitro/communication/messages/outgoing/room/action/RoomStaffPickComposer.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; - -export class RoomStaffPickComposer implements IMessageComposer> -{ - private _data: ConstructorParameters; - - constructor(roomId: number) - { - this._data = [ roomId ]; - } - - public getMessageArray() - { - return this._data; - } - - public dispose(): void - { - return; - } -} \ No newline at end of file diff --git a/src/nitro/communication/messages/outgoing/room/action/index.ts b/src/nitro/communication/messages/outgoing/room/action/index.ts index 5f1636ab..3846b4a1 100644 --- a/src/nitro/communication/messages/outgoing/room/action/index.ts +++ b/src/nitro/communication/messages/outgoing/room/action/index.ts @@ -4,8 +4,6 @@ export * from './RoomBanUserComposer'; export * from './RoomDeleteComposer'; export * from './RoomGiveRightsComposer'; export * from './RoomKickUserComposer'; -export * from './RoomLikeRoomComposer'; export * from './RoomMuteUserComposer'; -export * from './RoomStaffPickComposer'; export * from './RoomTakeRightsComposer'; export * from './RoomUnbanUserComposer'; diff --git a/src/nitro/communication/messages/outgoing/room/data/index.ts b/src/nitro/communication/messages/outgoing/room/data/index.ts index d1c3bf4e..27df6c7b 100644 --- a/src/nitro/communication/messages/outgoing/room/data/index.ts +++ b/src/nitro/communication/messages/outgoing/room/data/index.ts @@ -1,5 +1,4 @@ export * from './RoomBannedUsersComposer'; -export * from './RoomInfoComposer'; export * from './RoomSettingsComposer'; export * from './RoomUsersWithRightsComposer'; export * from './SaveRoomSettingsComposer'; diff --git a/src/nitro/communication/messages/outgoing/room/index.ts b/src/nitro/communication/messages/outgoing/room/index.ts index 047a28e1..7bc75523 100644 --- a/src/nitro/communication/messages/outgoing/room/index.ts +++ b/src/nitro/communication/messages/outgoing/room/index.ts @@ -6,6 +6,5 @@ export * from './engine'; export * from './furniture'; export * from './layout'; export * from './RedeemItemClothingComposer'; -export * from './RoomCreateComposer'; export * from './session'; export * from './unit'; diff --git a/src/nitro/communication/messages/outgoing/roomsettings/SaveableRoomSettingsData.ts b/src/nitro/communication/messages/outgoing/roomsettings/SaveableRoomSettingsData.ts new file mode 100644 index 00000000..521045e0 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/roomsettings/SaveableRoomSettingsData.ts @@ -0,0 +1,267 @@ +export class SaveableRoomSettingsData +{ + private _roomId: number; + private _name: string; + private _description: string; + private _doorMode: number; + private _password: string; + private _categoryId: number; + private _maximumVisitors: number; + private _tags: string[]; + private _tradeMode: number; + private _allowPets: boolean; + private _allowFoodConsume: boolean; + private _allowWalkThrough: boolean; + private _allowNavigatorDynCats: boolean; + private _hideWalls: boolean; + private _wallThickness: number; + private _floorThickness: number; + private _whoCanMute: number; + private _whoCanKick: number; + private _whoCanBan: number; + private _chatMode: number; + private _chatBubbleSize: number; + private _chatScrollUpFrequency: number; + private _chatFullHearRange: number; + private _chatFloodSensitivity: number; + + public get tradeMode(): number + { + return this._tradeMode; + } + + public set tradeMode(mode: number) + { + this._tradeMode = mode; + } + + public get allowPets(): boolean + { + return this._allowPets; + } + + public set allowPets(flag: boolean) + { + this._allowPets = flag; + } + + public get allowFoodConsume(): boolean + { + return this._allowFoodConsume; + } + + public set allowFoodConsume(flag: boolean) + { + this._allowFoodConsume = flag; + } + + public get allowWalkThrough(): boolean + { + return this._allowWalkThrough; + } + + public set allowWalkThrough(flag: boolean) + { + this._allowWalkThrough = flag; + } + + public get hideWalls(): boolean + { + return this._hideWalls; + } + + public set hideWalls(flag: boolean) + { + this._hideWalls = flag; + } + + public get wallThickness(): number + { + return this._wallThickness; + } + + public set wallThickness(thickness: number) + { + this._wallThickness = thickness; + } + + public get floorThickness(): number + { + return this._floorThickness; + } + + public set floorThickness(thickness: number) + { + this._floorThickness = thickness; + } + + public get roomId(): number + { + return this._roomId; + } + + public set roomId(id: number) + { + this._roomId = id; + } + + public get name(): string + { + return this._name; + } + + public set name(name: string) + { + this._name = name; + } + + public get description(): string + { + return this._description; + } + + public set description(description: string) + { + this._description = description; + } + + public get doorMode(): number + { + return this._doorMode; + } + + public set doorMode(mode: number) + { + this._doorMode = mode; + } + + public get password(): string + { + return this._password; + } + + public set password(password: string) + { + this._password = password; + } + + public get categoryId(): number + { + return this._categoryId; + } + + public set categoryId(id: number) + { + this._categoryId = id; + } + + public get maximumVisitors(): number + { + return this._maximumVisitors; + } + + public set maximumVisitors(max: number) + { + this._maximumVisitors = max; + } + + public get tags(): string[] + { + return this._tags; + } + + public set tags(tags: string[]) + { + this._tags = tags; + } + + public get whoCanMute(): number + { + return this._whoCanMute; + } + + public set whoCanMute(mute: number) + { + this._whoCanMute = mute; + } + + public get whoCanKick(): number + { + return this._whoCanKick; + } + + public set whoCanKick(kick: number) + { + this._whoCanKick = kick; + } + + public get whoCanBan(): number + { + return this._whoCanBan; + } + + public set whoCanBan(ban: number) + { + this._whoCanBan = ban; + } + + public get chatMode(): number + { + return this._chatMode; + } + + public set chatMode(mode: number) + { + this._chatMode = mode; + } + + public get chatBubbleSize(): number + { + return this._chatBubbleSize; + } + + public set chatBubbleSize(size: number) + { + this._chatBubbleSize = size; + } + + public get chatScrollUpFrequency(): number + { + return this._chatScrollUpFrequency; + } + + public set chatScrollUpFrequency(frequency: number) + { + this._chatScrollUpFrequency = frequency; + } + + public get chatFullHearRange(): number + { + return this._chatFullHearRange; + } + + public set chatFullHearRange(range: number) + { + this._chatFullHearRange = range; + } + + public get chatFloodSensitivity(): number + { + return this._chatFloodSensitivity; + } + + public set chatFloodSensitivity(sensitivity: number) + { + this._chatFloodSensitivity = sensitivity; + } + + public get allowNavigatorDynCats(): boolean + { + return this._allowNavigatorDynCats; + } + + public set allowNavigatorDynCats(flag: boolean) + { + this._allowNavigatorDynCats = flag; + } +} diff --git a/src/nitro/communication/messages/outgoing/roomsettings/index.ts b/src/nitro/communication/messages/outgoing/roomsettings/index.ts new file mode 100644 index 00000000..36ffb020 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/roomsettings/index.ts @@ -0,0 +1 @@ +export * from './SaveableRoomSettingsData'; diff --git a/src/nitro/communication/messages/outgoing/user/data/UserHomeRoomComposer.ts b/src/nitro/communication/messages/outgoing/user/data/UserHomeRoomComposer.ts deleted file mode 100644 index d94427e8..00000000 --- a/src/nitro/communication/messages/outgoing/user/data/UserHomeRoomComposer.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; - -export class UserHomeRoomComposer implements IMessageComposer> -{ - private _data: ConstructorParameters; - - constructor(roomId: number) - { - this._data = [ roomId ]; - } - - public getMessageArray() - { - return this._data; - } - - public dispose(): void - { - return; - } -} \ No newline at end of file diff --git a/src/nitro/communication/messages/outgoing/user/data/index.ts b/src/nitro/communication/messages/outgoing/user/data/index.ts index a71a6a48..f9164aff 100644 --- a/src/nitro/communication/messages/outgoing/user/data/index.ts +++ b/src/nitro/communication/messages/outgoing/user/data/index.ts @@ -5,7 +5,6 @@ export * from './IgnoreUserIdComposer'; export * from './UnignoreUserComposer'; export * from './UserCurrentBadgesComposer'; export * from './UserFigureComposer'; -export * from './UserHomeRoomComposer'; export * from './UserMottoComposer'; export * from './UserProfileComposer'; export * from './UserRelationshipsComposer'; diff --git a/src/nitro/communication/messages/parser/navigator/CanCreateRoomMessageParser.ts b/src/nitro/communication/messages/parser/navigator/CanCreateRoomMessageParser.ts new file mode 100644 index 00000000..a1d84591 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/CanCreateRoomMessageParser.ts @@ -0,0 +1,36 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class CanCreateRoomMessageParser implements IMessageParser +{ + public static readonly CREATION_ALLOWED = 0; + public static readonly ROOM_LIMIT_REACHED = 1; + + private _resultCode: number; + private _roomLimit: number; + + public flush(): boolean + { + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._resultCode = wrapper.readInt(); + this._roomLimit = wrapper.readInt(); + + return true; + } + + public get resultCode(): number + { + return this._resultCode; + } + + public get roomLimit(): number + { + return this._roomLimit; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/CategoriesWithVisitorCountParser.ts b/src/nitro/communication/messages/parser/navigator/CategoriesWithVisitorCountParser.ts new file mode 100644 index 00000000..2d4b27b2 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/CategoriesWithVisitorCountParser.ts @@ -0,0 +1,27 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { CategoriesWithVisitorCountData } from './utils/CategoriesWithVisitorCountData'; + +export class CategoriesWithVisitorCountParser implements IMessageParser +{ + private _data:CategoriesWithVisitorCountData; + + public flush(): boolean + { + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._data = new CategoriesWithVisitorCountData(wrapper); + + return true; + } + + public get data():CategoriesWithVisitorCountData + { + return this._data; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/CompetitionRoomsDataMessageParser.ts b/src/nitro/communication/messages/parser/navigator/CompetitionRoomsDataMessageParser.ts new file mode 100644 index 00000000..c56fe2a5 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/CompetitionRoomsDataMessageParser.ts @@ -0,0 +1,27 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { CompetitionRoomsData } from './utils/CompetitionRoomsData'; + +export class CompetitionRoomsDataMessageParser implements IMessageParser +{ + private _data: CompetitionRoomsData; + + public flush(): boolean + { + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._data = new CompetitionRoomsData(wrapper); + + return true; + } + + public get data():CompetitionRoomsData + { + return this._data; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/ConvertedRoomIdMessageParser.ts b/src/nitro/communication/messages/parser/navigator/ConvertedRoomIdMessageParser.ts new file mode 100644 index 00000000..427f375f --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/ConvertedRoomIdMessageParser.ts @@ -0,0 +1,33 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class ConvertedRoomIdMessageParser implements IMessageParser +{ + private _globalId:string; + private _convertedId:number; + + public flush(): boolean + { + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._globalId = wrapper.readString(); + this._convertedId = wrapper.readInt(); + + return true; + } + + public get globalId(): string + { + return this._globalId; + } + + public get convertedId(): number + { + return this._convertedId; + } +} diff --git a/src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellRejectedParser.ts b/src/nitro/communication/messages/parser/navigator/DoorbellMessageParser.ts similarity index 59% rename from src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellRejectedParser.ts rename to src/nitro/communication/messages/parser/navigator/DoorbellMessageParser.ts index e8cb0259..cf9d3e98 100644 --- a/src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellRejectedParser.ts +++ b/src/nitro/communication/messages/parser/navigator/DoorbellMessageParser.ts @@ -1,6 +1,7 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; -export class RoomDoorbellRejectedParser implements IMessageParser +export class DoorbellMessageParser implements IMessageParser { private _userName: string; diff --git a/src/nitro/communication/messages/parser/navigator/FavouriteChangedMessageParser.ts b/src/nitro/communication/messages/parser/navigator/FavouriteChangedMessageParser.ts new file mode 100644 index 00000000..b2374ab0 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/FavouriteChangedMessageParser.ts @@ -0,0 +1,33 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class FavouriteChangedMessageParser implements IMessageParser +{ + private _flatId:number; + private _added:boolean; + + public flush(): boolean + { + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._flatId = wrapper.readInt(); + this._added = wrapper.readBoolean(); + + return true; + } + + public get flatId():number + { + return this._flatId; + } + + public get added():boolean + { + return this._added; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/FavouritesMessageParser.ts b/src/nitro/communication/messages/parser/navigator/FavouritesMessageParser.ts new file mode 100644 index 00000000..a98e44e9 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/FavouritesMessageParser.ts @@ -0,0 +1,40 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class FavouritesMessageParser implements IMessageParser +{ + private _limit:number; + private _favouriteRoomIds:number[]; + + public flush(): boolean + { + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._favouriteRoomIds = []; + this._limit = wrapper.readInt(); + + const count = wrapper.readInt(); + + for(let i = 0; i < count; i++) + { + this._favouriteRoomIds.push(wrapper.readInt()); + } + + return true; + } + + public get limit(): number + { + return this._limit; + } + + public get favoriteRoomIds(): number[] + { + return this._favouriteRoomIds; + } +} diff --git a/src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellParser.ts b/src/nitro/communication/messages/parser/navigator/FlatAccessDeniedMessageParser.ts similarity index 84% rename from src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellParser.ts rename to src/nitro/communication/messages/parser/navigator/FlatAccessDeniedMessageParser.ts index 98e8fa22..1f7e810e 100644 --- a/src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellParser.ts +++ b/src/nitro/communication/messages/parser/navigator/FlatAccessDeniedMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; -export class RoomDoorbellParser implements IMessageParser +export class FlatAccessDeniedMessageParser implements IMessageParser { private _userName: string; diff --git a/src/nitro/communication/messages/parser/room/engine/RoomCreatedParser.ts b/src/nitro/communication/messages/parser/navigator/FlatCreatedMessageParser.ts similarity index 89% rename from src/nitro/communication/messages/parser/room/engine/RoomCreatedParser.ts rename to src/nitro/communication/messages/parser/navigator/FlatCreatedMessageParser.ts index 7311a5ba..23d0f28d 100644 --- a/src/nitro/communication/messages/parser/room/engine/RoomCreatedParser.ts +++ b/src/nitro/communication/messages/parser/navigator/FlatCreatedMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; -export class RoomCreatedParser implements IMessageParser +export class FlatCreatedMessageParser implements IMessageParser { private _roomId: number; private _roomName: string; diff --git a/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts b/src/nitro/communication/messages/parser/navigator/GetGuestRoomResultMessageParser.ts similarity index 77% rename from src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts rename to src/nitro/communication/messages/parser/navigator/GetGuestRoomResultMessageParser.ts index bbd25e13..766879a1 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts +++ b/src/nitro/communication/messages/parser/navigator/GetGuestRoomResultMessageParser.ts @@ -1,10 +1,10 @@ -import { IMessageParser } from '../../../../../../././core/communication/messages/IMessageParser'; -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; -import { RoomChatSettings } from './RoomChatSettings'; -import { RoomDataParser } from './RoomDataParser'; -import { RoomModerationSettings } from './RoomModerationSettings'; +import { IMessageParser } from '../../../../../././core/communication/messages/IMessageParser'; +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { RoomChatSettings } from '../../incoming/roomsettings/RoomChatSettings'; +import { RoomModerationSettings } from '../../incoming/roomsettings/RoomModerationSettings'; +import { RoomDataParser } from '../room/data/RoomDataParser'; -export class RoomInfoParser implements IMessageParser +export class GetGuestRoomResultMessageParser implements IMessageParser { private _roomEnter: boolean; private _roomForward: boolean; diff --git a/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts b/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts new file mode 100644 index 00000000..44941d0b --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts @@ -0,0 +1,28 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { GuestRoomSearchResultData } from './utils/GuestRoomSearchResultData'; + +export class GuestRoomSearchResultMessageParser implements IMessageParser +{ + _data:GuestRoomSearchResultData; + + public flush(): boolean + { + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._data = new GuestRoomSearchResultData(wrapper); + + return true; + } + + public get data():GuestRoomSearchResultData + { + return this._data; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts b/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts new file mode 100644 index 00000000..8e12c477 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts @@ -0,0 +1,16 @@ +import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class RoomEventCancelMessageParser implements IMessageParser +{ + flush(): boolean + { + return true; + } + + parse(wrapper: IMessageDataWrapper): boolean + { + return true; + } + +} diff --git a/src/nitro/communication/messages/parser/navigator/RoomEventMessageParser.ts b/src/nitro/communication/messages/parser/navigator/RoomEventMessageParser.ts new file mode 100644 index 00000000..d2bfc0e4 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/RoomEventMessageParser.ts @@ -0,0 +1,24 @@ +import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { RoomEventData } from './utils/RoomEventData'; + +export class RoomEventMessageParser implements IMessageParser +{ + private _data: RoomEventData; + + flush(): boolean + { + return true; + } + + parse(wrapper: IMessageDataWrapper): boolean + { + this._data = new RoomEventData(wrapper); + return true; + } + + public get data(): RoomEventData + { + return this._data; + } +} diff --git a/src/nitro/communication/messages/parser/room/data/RoomSettingsUpdatedParser.ts b/src/nitro/communication/messages/parser/navigator/RoomSettingsUpdatedParser.ts similarity index 97% rename from src/nitro/communication/messages/parser/room/data/RoomSettingsUpdatedParser.ts rename to src/nitro/communication/messages/parser/navigator/RoomSettingsUpdatedParser.ts index ec491ea5..592fe611 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomSettingsUpdatedParser.ts +++ b/src/nitro/communication/messages/parser/navigator/RoomSettingsUpdatedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; export class RoomSettingsUpdatedParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts b/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts new file mode 100644 index 00000000..801a3215 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts @@ -0,0 +1,31 @@ +import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class RoomThumbnailUpdateResultMessageParser implements IMessageParser +{ + private _flatId:number; + private _resultCode:number; + + flush(): boolean + { + return true; + } + + parse(wrapper: IMessageDataWrapper): boolean + { + this._flatId = wrapper.readInt(); + this._resultCode = wrapper.readInt(); + return true; + } + + public get flatId():number + { + return this._flatId; + } + + public get resultCode():number + { + return this._resultCode; + } + +} diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoriesParser.ts b/src/nitro/communication/messages/parser/navigator/UserEventCatsMessageParser.ts similarity index 91% rename from src/nitro/communication/messages/parser/navigator/NavigatorEventCategoriesParser.ts rename to src/nitro/communication/messages/parser/navigator/UserEventCatsMessageParser.ts index c07c6e68..20496dd4 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoriesParser.ts +++ b/src/nitro/communication/messages/parser/navigator/UserEventCatsMessageParser.ts @@ -1,7 +1,7 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; import { NavigatorEventCategoryDataParser } from './NavigatorEventCategoryDataParser'; -export class NavigatorEventCategoriesParser implements IMessageParser +export class UserEventCatsMessageParser implements IMessageParser { private _categories: NavigatorEventCategoryDataParser[]; diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorCategoriesParser.ts b/src/nitro/communication/messages/parser/navigator/UserFlatCatsMessageParser.ts similarity index 92% rename from src/nitro/communication/messages/parser/navigator/NavigatorCategoriesParser.ts rename to src/nitro/communication/messages/parser/navigator/UserFlatCatsMessageParser.ts index 6c9af04b..26a33c69 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorCategoriesParser.ts +++ b/src/nitro/communication/messages/parser/navigator/UserFlatCatsMessageParser.ts @@ -1,7 +1,7 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; import { NavigatorCategoryDataParser } from './NavigatorCategoryDataParser'; -export class NavigatorCategoriesParser implements IMessageParser +export class UserFlatCatsMessageParser implements IMessageParser { private _categories: NavigatorCategoryDataParser[]; diff --git a/src/nitro/communication/messages/parser/navigator/index.ts b/src/nitro/communication/messages/parser/navigator/index.ts index 006abc82..195a3db6 100644 --- a/src/nitro/communication/messages/parser/navigator/index.ts +++ b/src/nitro/communication/messages/parser/navigator/index.ts @@ -1,8 +1,17 @@ export * from './CanCreateRoomEventParser'; -export * from './NavigatorCategoriesParser'; +export * from './CanCreateRoomMessageParser'; +export * from './CategoriesWithVisitorCountParser'; +export * from './CompetitionRoomsDataMessageParser'; +export * from './ConvertedRoomIdMessageParser'; +export * from './DoorbellMessageParser'; +export * from './FavouriteChangedMessageParser'; +export * from './FavouritesMessageParser'; +export * from './FlatAccessDeniedMessageParser'; +export * from './FlatCreatedMessageParser'; +export * from './GetGuestRoomResultMessageParser'; +export * from './GuestRoomSearchResultMessageParser'; export * from './NavigatorCategoryDataParser'; export * from './NavigatorCollapsedParser'; -export * from './NavigatorEventCategoriesParser'; export * from './NavigatorEventCategoryDataParser'; export * from './NavigatorHomeRoomParser'; export * from './NavigatorLiftedDataParser'; @@ -12,4 +21,10 @@ export * from './NavigatorOpenRoomCreatorParser'; export * from './NavigatorSearchesParser'; export * from './NavigatorSearchParser'; export * from './NavigatorSettingsParser'; +export * from './RoomEventCancelMessageParser'; +export * from './RoomEventMessageParser'; +export * from './RoomSettingsUpdatedParser'; +export * from './RoomThumbnailUpdateResultMessageParser'; +export * from './UserEventCatsMessageParser'; +export * from './UserFlatCatsMessageParser'; export * from './utils'; diff --git a/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts b/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts new file mode 100644 index 00000000..2c33303d --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts @@ -0,0 +1,34 @@ +import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; + +export class CategoriesWithVisitorCountData +{ + private _categoryToCurrentUserCountMap:Map; + private _categoryToMaxUserCountMap:Map; + + constructor(k: IMessageDataWrapper) + { + this._categoryToCurrentUserCountMap = new Map(); + this._categoryToMaxUserCountMap = new Map(); + + const count = k.readInt(); + + for(let i = 0; i < count; i++) + { + const _local_4 = k.readInt(); + const _local_5 = k.readInt(); + const _local_6 = k.readInt(); + this._categoryToCurrentUserCountMap.set(_local_4, _local_5); + this._categoryToMaxUserCountMap.set(_local_4, _local_6); + } + } + + public get categoryToCurrentUserCountMap():Map + { + return this._categoryToCurrentUserCountMap; + } + + public get categoryToMaxUserCountMap():Map + { + return this._categoryToMaxUserCountMap; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts b/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts new file mode 100644 index 00000000..6a1a11c6 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts @@ -0,0 +1,36 @@ +import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; + +export class CompetitionRoomsData +{ + private _goalId: number; + private _pageIndex: number; + private _pageCount: number; + + constructor(k: IMessageDataWrapper, _arg_2:number=0, _arg_3:number=0) + { + this._goalId = _arg_2; + this._pageIndex = _arg_3; + + if(k) + { + this._goalId = k.readInt(); + this._pageIndex = k.readInt(); + this._pageCount = k.readInt(); + } + } + + public get goalId(): number + { + return this._goalId; + } + + public get pageIndex(): number + { + return this._pageIndex; + } + + public get pageCount(): number + { + return this._pageCount; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts b/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts new file mode 100644 index 00000000..0ca44b8e --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts @@ -0,0 +1,76 @@ +import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; +import { RoomDataParser } from '../../room/data/RoomDataParser'; +import { OfficialRoomEntryData } from './OfficialRoomEntryData'; + +export class GuestRoomSearchResultData +{ + private _searchType:number; + private _searchParam:string; + private _rooms:RoomDataParser[]; + private _ad:OfficialRoomEntryData; + private _disposed:boolean; + + constructor(k: IMessageDataWrapper) + { + this._rooms = []; + this._searchType = k.readInt(); + this._searchParam = k.readString(); + const count = k.readInt(); + for(let i = 0; i < count; i++) + { + this._rooms.push(new RoomDataParser(k)); + } + const hasAdditional = k.readBoolean(); + if(hasAdditional) + { + this._ad = new OfficialRoomEntryData(k); + } + } + + public dispose():void + { + if(this._disposed) + { + return; + } + this._disposed = true; + if(this._rooms != null) + { + for(const k of this._rooms) + { + k.flush(); + } + } + if(this._ad != null) + { + this._ad.dispose(); + this._ad = null; + } + this._rooms = null; + } + + public get disposed():boolean + { + return this._disposed; + } + + public get searchType():number + { + return this._searchType; + } + + public get _Str_25185():string + { + return this._searchParam; + } + + public get rooms():RoomDataParser[] + { + return this._rooms; + } + + public get ad():OfficialRoomEntryData + { + return this._ad; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts b/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts new file mode 100644 index 00000000..43025445 --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts @@ -0,0 +1,148 @@ +import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; +import { RoomDataParser } from '../../room'; + +export class OfficialRoomEntryData +{ + public static readonly _Str_14955 = 1; + public static readonly _Str_12025 = 2; + public static readonly _Str_16098 = 4; + + private _index: number; + private _Str_20260: string; + private _Str_21337: string; + private _Str_21113: boolean; + private _picText: string; + private _Str_6192: string; + private _Str_22099: number; + private _userCount: number; + private _type: number; + private _tag: string; + private _Str_2567: RoomDataParser; + private _open: boolean; + private _disposed: boolean; + + constructor(k: IMessageDataWrapper) + { + this._index = k.readInt(); + this._Str_20260 = k.readString(); + this._Str_21337 = k.readString(); + this._Str_21113 = k.readInt() == 1; + this._picText = k.readString(); + this._Str_6192 = k.readString(); + this._Str_22099 = k.readInt(); + this._userCount = k.readInt(); + this._type = k.readInt(); + if(this._type == OfficialRoomEntryData._Str_14955) + { + this._tag = k.readString(); + } + else + { + if(this._type == OfficialRoomEntryData._Str_12025) + { + this._Str_2567 = new RoomDataParser(k); + } + else + { + this._open = k.readBoolean(); + } + } + } + + public dispose(): void + { + if(this._disposed) + { + return; + } + this._disposed = true; + if(this._Str_2567 != null) + { + this._Str_2567.flush(); + this._Str_2567 = null; + } + } + + public get disposed(): boolean + { + return this._disposed; + } + + public get type(): number + { + return this._type; + } + + public get index(): number + { + return this._index; + } + + public get _Str_9428(): string + { + return this._Str_20260; + } + + public get _Str_22426(): string + { + return this._Str_21337; + } + + public get _Str_5386(): boolean + { + return this._Str_21113; + } + + public get picText(): string + { + return this._picText; + } + + public get _Str_10304(): string + { + return this._Str_6192; + } + + public get _Str_22186(): number + { + return this._Str_22099; + } + + public get tag(): string + { + return this._tag; + } + + public get userCount(): number + { + return this._userCount; + } + + public get _Str_5019(): RoomDataParser + { + return this._Str_2567; + } + + public get open(): boolean + { + return this._open; + } + + public _Str_16147(): void + { + this._open = !this._open; + } + + public get _Str_23003(): number + { + if(this.type == OfficialRoomEntryData._Str_14955) + { + return 0; + } + if(this.type == OfficialRoomEntryData._Str_12025) + { + return this._Str_2567.maxUserCount; + } + return 0; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts b/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts new file mode 100644 index 00000000..568de19d --- /dev/null +++ b/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts @@ -0,0 +1,104 @@ +import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; + +export class RoomEventData +{ + private _adId:number; + private _ownerAvatarId:number; + private _ownerAvatarName:string; + private _flatId:number; + private _categoryId:number; + private _eventType:number; + private _eventName:string; + private _eventDescription:string; + private _creationTime:string; + private _expirationDate:Date; + private _disposed:boolean; + + constructor(k:IMessageDataWrapper) + { + this._adId = k.readInt(); + this._ownerAvatarId = k.readInt(); + this._ownerAvatarName = k.readString(); + this._flatId = k.readInt(); + this._eventType = k.readInt(); + this._eventName = k.readString(); + this._eventDescription = k.readString(); + const _local_2 = k.readInt(); + const _local_3 = k.readInt(); + const _local_4:Date = new Date(); + let _local_5 = _local_4.getTime(); + const _local_6 = ((_local_2 * 60) * 1000); + _local_5 = (_local_5 - _local_6); + const _local_7:Date = new Date(_local_5); + this._creationTime = ((((((((_local_7.getDate() + '-') + _local_7.getMonth()) + '-') + _local_7.getFullYear()) + ' ') + _local_7.getHours()) + ':') + _local_7.getMinutes()); + let _local_8 = _local_4.getTime(); + const _local_9 = ((_local_3 * 60) * 1000); + _local_8 = (_local_8 + _local_9); + this._expirationDate = new Date(_local_8); + this._categoryId = k.readInt(); + } + + public dispose():void + { + if(this._disposed) + { + return; + } + this._disposed = true; + } + + public get disposed():boolean + { + return this._disposed; + } + + public get adId():number + { + return this._adId; + } + + public get ownerAvatarId():number + { + return this._ownerAvatarId; + } + + public get ownerAvatarName():string + { + return this._ownerAvatarName; + } + + public get flatId():number + { + return this._flatId; + } + + public get categoryId():number + { + return this._categoryId; + } + + public get eventType():number + { + return this._eventType; + } + + public get eventName():string + { + return this._eventName; + } + + public get eventDescription():string + { + return this._eventDescription; + } + + public get creationTime():string + { + return this._creationTime; + } + + public get expirationDate():Date + { + return this._expirationDate; + } +} diff --git a/src/nitro/communication/messages/parser/navigator/utils/index.ts b/src/nitro/communication/messages/parser/navigator/utils/index.ts index 65e28f60..3cbb6205 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/index.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/index.ts @@ -1,4 +1,8 @@ +export * from './CategoriesWithVisitorCountData'; +export * from './CompetitionRoomsData'; export * from './NavigatorSavedSearch'; export * from './NavigatorSearchResultList'; export * from './NavigatorSearchResultSet'; export * from './NavigatorTopLevelContext'; +export * from './OfficialRoomEntryData'; +export * from './RoomEventData'; diff --git a/src/nitro/communication/messages/parser/room/access/doorbell/index.ts b/src/nitro/communication/messages/parser/room/access/doorbell/index.ts index ddec271f..bc56d178 100644 --- a/src/nitro/communication/messages/parser/room/access/doorbell/index.ts +++ b/src/nitro/communication/messages/parser/room/access/doorbell/index.ts @@ -1,3 +1 @@ export * from './RoomDoorbellAcceptedParser'; -export * from './RoomDoorbellParser'; -export * from './RoomDoorbellRejectedParser'; diff --git a/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts b/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts index 7fc5270e..f7149942 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts @@ -1,5 +1,5 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; -import { RoomChatSettings } from './RoomChatSettings'; +import { RoomChatSettings } from '../../../incoming/roomsettings/RoomChatSettings'; export class RoomChatSettingsParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts b/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts deleted file mode 100644 index e45b2511..00000000 --- a/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts +++ /dev/null @@ -1,162 +0,0 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; -import { RoomChatSettings } from './RoomChatSettings'; -import { RoomModerationSettings } from './RoomModerationSettings'; - -export class RoomSettingsParser implements IMessageParser -{ - private _roomId: number; - private _name: string; - private _description: string; - private _state: number; - private _categoryId: number; - private _userCount: number; - private _maxUserCount: number; - private _tags: string[]; - private _tradeMode: number; - private _allowPets: number; - private _allowPetsEat: number; - private _allowWalkthrough: number; - private _hideWalls: number; - private _thicknessWall: number; - private _thicknessFloor: number; - private _chat: RoomChatSettings; - private _moderation: RoomModerationSettings; - - public flush(): boolean - { - this._roomId = 0; - - return true; - } - - public parse(wrapper: IMessageDataWrapper): boolean - { - if(!wrapper) return false; - - this._roomId = wrapper.readInt(); - this._name = wrapper.readString(); - this._description = wrapper.readString(); - this._state = wrapper.readInt(); - this._categoryId = wrapper.readInt(); - this._userCount = wrapper.readInt(); - this._maxUserCount = wrapper.readInt(); - - this.parseTags(wrapper); - - this._tradeMode = wrapper.readInt(); - this._allowPets = wrapper.readInt(); - this._allowPetsEat = wrapper.readInt(); - this._allowWalkthrough = wrapper.readInt(); - this._hideWalls = wrapper.readInt(); - this._thicknessWall = wrapper.readInt(); - this._thicknessFloor = wrapper.readInt(); - this._chat = new RoomChatSettings(wrapper); - wrapper.readBoolean(); - this._moderation = new RoomModerationSettings(wrapper); - - return true; - } - - private parseTags(wrapper: IMessageDataWrapper): boolean - { - if(!wrapper) return false; - - this._tags = []; - - let totalTags = wrapper.readInt(); - - while(totalTags > 0) - { - this._tags.push(wrapper.readString()); - - totalTags--; - } - - return true; - } - - public get roomId(): number - { - return this._roomId; - } - - public get name(): string - { - return this._name; - } - - public get description(): string - { - return this._description; - } - - public get state(): number - { - return this._state; - } - - public get categoryId(): number - { - return this._categoryId; - } - - public get userCount(): number - { - return this._userCount; - } - - public get maxUserCount(): number - { - return this._maxUserCount; - } - - public get tags(): string[] - { - return this._tags; - } - - public get tradeMode(): number - { - return this._tradeMode; - } - - public get allowPets(): boolean - { - return this._allowPets === 1; - } - - public get allowPetsEat(): boolean - { - return this._allowPetsEat === 1; - } - - public get allowWalkthrough(): boolean - { - return this._allowWalkthrough === 1; - } - - public get hideWalls(): boolean - { - return this._hideWalls === 1; - } - - public get thicknessWall(): number - { - return this._thicknessWall; - } - - public get thicknessFloor(): number - { - return this._thicknessFloor; - } - - public get chatSettings(): RoomChatSettings - { - return this._chat; - } - - public get moderationSettings(): RoomModerationSettings - { - return this._moderation; - } -} diff --git a/src/nitro/communication/messages/parser/room/data/index.ts b/src/nitro/communication/messages/parser/room/data/index.ts index d003c377..7e040d1b 100644 --- a/src/nitro/communication/messages/parser/room/data/index.ts +++ b/src/nitro/communication/messages/parser/room/data/index.ts @@ -1,11 +1,4 @@ -export * from './RoomChatSettings'; export * from './RoomChatSettingsParser'; export * from './RoomDataParser'; export * from './RoomEntryInfoMessageParser'; -export * from './RoomInfoParser'; -export * from './RoomModerationSettings'; export * from './RoomScoreParser'; -export * from './RoomSettingsErrorParser'; -export * from './RoomSettingsParser'; -export * from './RoomSettingsSavedParser'; -export * from './RoomSettingsUpdatedParser'; diff --git a/src/nitro/communication/messages/parser/room/engine/index.ts b/src/nitro/communication/messages/parser/room/engine/index.ts index 4b5285e7..c7fadf66 100644 --- a/src/nitro/communication/messages/parser/room/engine/index.ts +++ b/src/nitro/communication/messages/parser/room/engine/index.ts @@ -1,4 +1,3 @@ export * from './FavoriteMembershipUpdateMessageParser'; export * from './ObjectsDataUpdateParser'; export * from './ObjectsRollingParser'; -export * from './RoomCreatedParser'; diff --git a/src/nitro/communication/messages/parser/roomevents/index.ts b/src/nitro/communication/messages/parser/roomevents/index.ts index f4dbfc98..a0b2373d 100644 --- a/src/nitro/communication/messages/parser/roomevents/index.ts +++ b/src/nitro/communication/messages/parser/roomevents/index.ts @@ -1,4 +1,3 @@ -export * from './RoomMutedParser'; export * from './WiredFurniActionParser'; export * from './WiredFurniConditionParser'; export * from './WiredFurniTriggerParser'; diff --git a/src/nitro/communication/messages/parser/roomevents/RoomMutedParser.ts b/src/nitro/communication/messages/parser/roomsettings/MuteAllInRoomParser.ts similarity index 57% rename from src/nitro/communication/messages/parser/roomevents/RoomMutedParser.ts rename to src/nitro/communication/messages/parser/roomsettings/MuteAllInRoomParser.ts index 4136485a..99fe26f1 100644 --- a/src/nitro/communication/messages/parser/roomevents/RoomMutedParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/MuteAllInRoomParser.ts @@ -1,6 +1,7 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; -export class RoomMutedParser implements IMessageParser +export class MuteAllInRoomParser implements IMessageParser { private _isMuted: boolean; diff --git a/src/nitro/communication/messages/parser/roomsettings/NoSuchFlatParser.ts b/src/nitro/communication/messages/parser/roomsettings/NoSuchFlatParser.ts new file mode 100644 index 00000000..bf65ac6c --- /dev/null +++ b/src/nitro/communication/messages/parser/roomsettings/NoSuchFlatParser.ts @@ -0,0 +1,28 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class NoSuchFlatParser implements IMessageParser +{ + private _roomId: number; + + public flush(): boolean + { + this._roomId = 0; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._roomId = wrapper.readInt(); + + return true; + } + + public get roomId(): number + { + return this._roomId; + } +} diff --git a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsDataParser.ts b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsDataParser.ts new file mode 100644 index 00000000..204e56be --- /dev/null +++ b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsDataParser.ts @@ -0,0 +1,60 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { RoomChatSettings } from '../../incoming/roomsettings/RoomChatSettings'; +import { RoomModerationSettings } from '../../incoming/roomsettings/RoomModerationSettings'; +import { RoomSettingsData } from '../../incoming/roomsettings/RoomSettingsData'; + +export class RoomSettingsDataParser implements IMessageParser +{ + private _roomSettingsData: RoomSettingsData; + + public flush(): boolean + { + this._roomSettingsData = null; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._roomSettingsData = new RoomSettingsData(); + + this._roomSettingsData.roomId = wrapper.readInt(); + this._roomSettingsData.name = wrapper.readString(); + this._roomSettingsData.description = wrapper.readString(); + this._roomSettingsData.doorMode = wrapper.readInt(); + this._roomSettingsData.categoryId = wrapper.readInt(); + this._roomSettingsData.maximumVisitors = wrapper.readInt(); + this._roomSettingsData.maximumVisitorsLimit = wrapper.readInt(); + this._roomSettingsData.tags = []; + + let totalTags = wrapper.readInt(); + + while(totalTags > 0) + { + this._roomSettingsData.tags.push(wrapper.readString()); + + totalTags--; + } + + this._roomSettingsData.tradeMode = wrapper.readInt(); + this._roomSettingsData.allowPets = (wrapper.readInt() === 1); + this._roomSettingsData.allowFoodConsume = (wrapper.readInt() === 1); + this._roomSettingsData.allowWalkThrough = (wrapper.readInt() === 1); + this._roomSettingsData.hideWalls = (wrapper.readInt() === 1); + this._roomSettingsData.wallThickness = wrapper.readInt(); + this._roomSettingsData.floorThickness = wrapper.readInt(); + this._roomSettingsData.chatSettings = new RoomChatSettings(wrapper); + this._roomSettingsData.allowNavigatorDynamicCats = wrapper.readBoolean(); + this._roomSettingsData.roomModerationSettings = new RoomModerationSettings(wrapper); + + return true; + } + + public get data(): RoomSettingsData + { + return this._roomSettingsData; + } +} diff --git a/src/nitro/communication/messages/parser/room/data/RoomSettingsErrorParser.ts b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsErrorParser.ts similarity index 69% rename from src/nitro/communication/messages/parser/room/data/RoomSettingsErrorParser.ts rename to src/nitro/communication/messages/parser/roomsettings/RoomSettingsErrorParser.ts index 6fdcbad0..a03f7d2b 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomSettingsErrorParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsErrorParser.ts @@ -1,16 +1,15 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; export class RoomSettingsErrorParser implements IMessageParser { private _roomId: number; private _code: number; - private _message: string; public flush(): boolean { this._roomId = 0; this._code = 0; - this._message = null; return true; } @@ -21,7 +20,6 @@ export class RoomSettingsErrorParser implements IMessageParser this._roomId = wrapper.readInt(); this._code = wrapper.readInt(); - this._message = wrapper.readString(); return true; } @@ -35,9 +33,4 @@ export class RoomSettingsErrorParser implements IMessageParser { return this._code; } - - public get message(): string - { - return this._message; - } } diff --git a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSaveErrorParser.ts b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSaveErrorParser.ts new file mode 100644 index 00000000..1e79ee49 --- /dev/null +++ b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSaveErrorParser.ts @@ -0,0 +1,58 @@ +import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class RoomSettingsSaveErrorParser implements IMessageParser +{ + public static ERROR_ROOM_NOT_FOUND: number = 1; + public static ERROR_NOT_OWNER: number = 2; + public static ERROR_INVALID_DOOR_MODE: number = 3; + public static ERROR_INVALID_USER_LIMIT: number = 4; + public static ERROR_INVALID_PASSWORD: number = 5; + public static ERROR_INVALID_CATEGORY: number = 6; + public static ERROR_INVALID_NAME: number = 7; + public static ERROR_UNACCEPTABLE_NAME: number = 8; + public static ERROR_INVALID_DESCRIPTION: number = 9; + public static ERROR_UNACCEPTABLE_DESCRIPTION: number = 10; + public static ERROR_INVALID_TAG: number = 11; + public static ERROR_NON_USER_CHOOSABLE_TAG: number = 12; + public static ERROR_TOO_MANY_CHARACTERS_IN_TAG: number = 13; + + private _roomId: number; + private _code: number; + private _message: string; + + public flush(): boolean + { + this._roomId = 0; + this._code = 0; + this._message = null; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._roomId = wrapper.readInt(); + this._code = wrapper.readInt(); + this._message = wrapper.readString(); + + return true; + } + + public get roomId(): number + { + return this._roomId; + } + + public get code(): number + { + return this._code; + } + + public get message(): string + { + return this._message; + } +} diff --git a/src/nitro/communication/messages/parser/room/data/RoomSettingsSavedParser.ts b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSavedParser.ts similarity index 97% rename from src/nitro/communication/messages/parser/room/data/RoomSettingsSavedParser.ts rename to src/nitro/communication/messages/parser/roomsettings/RoomSettingsSavedParser.ts index 8b360eec..02613c34 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomSettingsSavedParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSavedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; export class RoomSettingsSavedParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/roomsettings/ShowEnforceRoomCategoryDialogParser.ts b/src/nitro/communication/messages/parser/roomsettings/ShowEnforceRoomCategoryDialogParser.ts new file mode 100644 index 00000000..c8201149 --- /dev/null +++ b/src/nitro/communication/messages/parser/roomsettings/ShowEnforceRoomCategoryDialogParser.ts @@ -0,0 +1,27 @@ +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; + +export class ShowEnforceRoomCategoryDialogParser implements IMessageParser +{ + private _selectionType: number; + + public flush(): boolean + { + this._selectionType = 0; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._selectionType = wrapper.readInt(); + + return true; + } + + public get selectionType(): number + { + return this._selectionType; + } +} diff --git a/src/nitro/communication/messages/parser/roomsettings/UserUnbannedFromRoomParser.ts b/src/nitro/communication/messages/parser/roomsettings/UserUnbannedFromRoomParser.ts new file mode 100644 index 00000000..0ce1892e --- /dev/null +++ b/src/nitro/communication/messages/parser/roomsettings/UserUnbannedFromRoomParser.ts @@ -0,0 +1,35 @@ +import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; + +export class UserUnbannedFromRoomParser implements IMessageParser +{ + private _roomId: number; + private _userId: number; + + public flush(): boolean + { + this._roomId = 0; + this._userId = 0; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._roomId = wrapper.readInt(); + this._userId = wrapper.readInt(); + + return true; + } + + public get roomId(): number + { + return this._roomId; + } + + public get userId(): number + { + return this._userId; + } +} diff --git a/src/nitro/communication/messages/parser/roomsettings/index.ts b/src/nitro/communication/messages/parser/roomsettings/index.ts index b38e5f28..f16ece47 100644 --- a/src/nitro/communication/messages/parser/roomsettings/index.ts +++ b/src/nitro/communication/messages/parser/roomsettings/index.ts @@ -2,3 +2,9 @@ export * from './BannedUsersFromRoomParser'; export * from './FlatControllerAddedParser'; export * from './FlatControllerRemovedParser'; export * from './FlatControllersParser'; +export * from './MuteAllInRoomParser'; +export * from './NoSuchFlatParser'; +export * from './RoomSettingsDataParser'; +export * from './RoomSettingsErrorParser'; +export * from './RoomSettingsSavedParser'; +export * from './RoomSettingsSaveErrorParser'; diff --git a/src/nitro/room/RoomEngine.ts b/src/nitro/room/RoomEngine.ts index 38c6f35d..b40a6a9f 100644 --- a/src/nitro/room/RoomEngine.ts +++ b/src/nitro/room/RoomEngine.ts @@ -802,17 +802,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato return true; } - public updateObjectRoomColor(k: number, _arg_2: number, _arg_3: number, _arg_4: boolean): boolean + public updateObjectRoomColor(roomId: number, color: number, light: number, backgroundOnly: boolean): boolean { - const roomObject = this.getRoomOwnObject(k); + const roomObject = this.getRoomOwnObject(roomId); if(!roomObject || !roomObject.logic) return false; - const event = new ObjectRoomColorUpdateMessage(ObjectRoomColorUpdateMessage.BACKGROUND_COLOR, _arg_2, _arg_3, _arg_4); + const event = new ObjectRoomColorUpdateMessage(ObjectRoomColorUpdateMessage.BACKGROUND_COLOR, color, light, backgroundOnly); roomObject.logic.processUpdateMessage(event); - this.events.dispatchEvent(new RoomBackgroundColorEvent(k, _arg_2, _arg_3, _arg_4)); + this.events.dispatchEvent(new RoomBackgroundColorEvent(roomId, color, light, backgroundOnly)); return true; } diff --git a/src/nitro/room/RoomObjectEventHandler.ts b/src/nitro/room/RoomObjectEventHandler.ts index 1ce23390..23a80b14 100644 --- a/src/nitro/room/RoomObjectEventHandler.ts +++ b/src/nitro/room/RoomObjectEventHandler.ts @@ -259,6 +259,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou case RoomObjectWidgetRequestEvent.CLOSE_FURNI_CONTEXT_MENU: case RoomObjectWidgetRequestEvent.PLACEHOLDER: case RoomObjectWidgetRequestEvent.CREDITFURNI: + case RoomObjectWidgetRequestEvent.STACK_HEIGHT: + case RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE: case RoomObjectWidgetRequestEvent.STICKIE: case RoomObjectWidgetRequestEvent.PRESENT: case RoomObjectWidgetRequestEvent.TROPHY: @@ -287,6 +289,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou case RoomObjectWidgetRequestEvent.HIDE_HIGH_SCORE_DISPLAY: case RoomObjectWidgetRequestEvent.INERNAL_LINK: case RoomObjectWidgetRequestEvent.ROOM_LINK: + case RoomObjectWidgetRequestEvent.YOUTUBE: this.onRoomObjectWidgetRequestEvent((event as RoomObjectWidgetRequestEvent), roomId); return; case RoomObjectFurnitureActionEvent.DICE_ACTIVATE: @@ -781,6 +784,12 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou case RoomObjectWidgetRequestEvent.CREDITFURNI: eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_CREDITFURNI, roomId, objectId, objectCategory)); return; + case RoomObjectWidgetRequestEvent.STACK_HEIGHT: + eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_STACK_HEIGHT, roomId, objectId, objectCategory)); + return; + case RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE: + eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_EXTERNAL_IMAGE, roomId, objectId, objectCategory)); + return; case RoomObjectWidgetRequestEvent.STICKIE: eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_STICKIE, roomId, objectId, objectCategory)); return; @@ -865,6 +874,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou case RoomObjectWidgetRequestEvent.ROOM_LINK: eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_ROOM_LINK, roomId, objectId, objectCategory)); return; + case RoomObjectWidgetRequestEvent.YOUTUBE: + eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_YOUTUBE, roomId, objectId, objectCategory)); + return; } } diff --git a/src/nitro/room/events/RoomEngineTriggerWidgetEvent.ts b/src/nitro/room/events/RoomEngineTriggerWidgetEvent.ts index 2c22fddb..ba1c8cbd 100644 --- a/src/nitro/room/events/RoomEngineTriggerWidgetEvent.ts +++ b/src/nitro/room/events/RoomEngineTriggerWidgetEvent.ts @@ -8,6 +8,8 @@ export class RoomEngineTriggerWidgetEvent extends RoomEngineObjectEvent public static CLOSE_FURNI_CONTEXT_MENU: string = 'RETWE_CLOSE_FURNI_CONTEXT_MENU'; public static REQUEST_PLACEHOLDER: string = 'RETWE_REQUEST_PLACEHOLDER'; public static REQUEST_CREDITFURNI: string = 'RETWE_REQUEST_CREDITFURNI'; + public static REQUEST_STACK_HEIGHT: string = 'RETWE_REQUEST_STACK_HEIGHT'; + public static REQUEST_EXTERNAL_IMAGE: string = 'RETWE_REQUEST_EXTERNAL_IMAGE'; public static REQUEST_STICKIE: string = 'RETWE_REQUEST_STICKIE'; public static REQUEST_PRESENT: string = 'RETWE_REQUEST_PRESENT'; public static REQUEST_TROPHY: string = 'RETWE_REQUEST_TROPHY'; @@ -33,6 +35,7 @@ export class RoomEngineTriggerWidgetEvent extends RoomEngineObjectEvent public static REQUEST_HIDE_HIGH_SCORE_DISPLAY: string = 'RETWE_REQUEST_HIDE_HIGH_SCORE_DISPLAY'; public static REQUEST_INTERNAL_LINK: string = 'RETWE_REQUEST_INTERNAL_LINK'; public static REQUEST_ROOM_LINK: string = 'RETWE_REQUEST_ROOM_LINK'; + public static REQUEST_YOUTUBE: string = 'RETWE_REQUEST_YOUTUBE'; private _widget: string; diff --git a/src/nitro/room/events/RoomObjectWidgetRequestEvent.ts b/src/nitro/room/events/RoomObjectWidgetRequestEvent.ts index 46a02cfd..e1e13db9 100644 --- a/src/nitro/room/events/RoomObjectWidgetRequestEvent.ts +++ b/src/nitro/room/events/RoomObjectWidgetRequestEvent.ts @@ -9,6 +9,8 @@ export class RoomObjectWidgetRequestEvent extends RoomObjectEvent public static CLOSE_FURNI_CONTEXT_MENU: string = 'ROWRE_CLOSE_FURNI_CONTEXT_MENU'; public static PLACEHOLDER: string = 'ROWRE_PLACEHOLDER'; public static CREDITFURNI: string = 'ROWRE_CREDITFURNI'; + public static STACK_HEIGHT: string = 'ROWRE_STACK_HEIGHT'; + public static EXTERNAL_IMAGE: string = 'ROWRE_EXTERNAL_IMAGE'; public static STICKIE: string = 'ROWRE_STICKIE'; public static PRESENT: string = 'ROWRE_PRESENT'; public static TROPHY: string = 'ROWRE_TROPHY'; @@ -37,6 +39,7 @@ export class RoomObjectWidgetRequestEvent extends RoomObjectEvent public static HIDE_HIGH_SCORE_DISPLAY: string = 'ROWRE_HIDE_HIGH_SCORE_DISPLAY'; public static INERNAL_LINK: string = 'ROWRE_INTERNAL_LINK'; public static ROOM_LINK: string = 'ROWRE_ROOM_LINK'; + public static YOUTUBE: string = 'ROWRE_YOUTUBE'; constructor(type: string, roomObject: IRoomObject) { diff --git a/src/nitro/room/object/logic/furniture/FurnitureCustomStackHeightLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureCustomStackHeightLogic.ts index ea236a73..4bf87ad9 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureCustomStackHeightLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureCustomStackHeightLogic.ts @@ -1,10 +1,19 @@ import { IAssetData } from '../../../../../core/asset/interfaces'; -import { RoomWidgetEnum } from '../../../../ui'; +import { RoomObjectWidgetRequestEvent } from '../../../events/RoomObjectWidgetRequestEvent'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic'; export class FurnitureCustomStackHeightLogic extends FurnitureMultiStateLogic { + public getEventTypes(): string[] + { + const types = [ + RoomObjectWidgetRequestEvent.STACK_HEIGHT + ]; + + return this.mergeTypes(super.getEventTypes(), types); + } + public initialize(asset: IAssetData): void { super.initialize(asset); @@ -12,8 +21,12 @@ export class FurnitureCustomStackHeightLogic extends FurnitureMultiStateLogic if(this.object && this.object.model) this.object.model.setValue(RoomObjectVariable.FURNITURE_ALWAYS_STACKABLE, 1); } - public get widget(): string + public useObject(): void { - return RoomWidgetEnum.CUSTOM_STACK_HEIGHT; + if(!this.object || !this.eventDispatcher) return; + + this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.STACK_HEIGHT, this.object)); + + super.useObject(); } } diff --git a/src/nitro/room/object/logic/furniture/FurnitureExternalImageLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureExternalImageLogic.ts index 91ceb15b..09d2436b 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureExternalImageLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureExternalImageLogic.ts @@ -1,10 +1,19 @@ import { IAssetData } from '../../../../../core/asset/interfaces'; -import { RoomWidgetEnum } from '../../../../ui/widget/enums/RoomWidgetEnum'; +import { RoomObjectWidgetRequestEvent } from '../../../events'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic'; export class FurnitureExternalImageLogic extends FurnitureMultiStateLogic { + public getEventTypes(): string[] + { + const types = [ + RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE + ]; + + return this.mergeTypes(super.getEventTypes(), types); + } + public initialize(asset: IAssetData): void { super.initialize(asset); @@ -25,8 +34,12 @@ export class FurnitureExternalImageLogic extends FurnitureMultiStateLogic } } - public get widget(): string + public useObject(): void { - return RoomWidgetEnum.EXTERNAL_IMAGE; + if(!this.object || !this.eventDispatcher) return; + + this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE, this.object)); + + super.useObject(); } } diff --git a/src/nitro/room/object/logic/furniture/FurnitureYoutubeLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureYoutubeLogic.ts index ef007738..35bf225a 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureYoutubeLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureYoutubeLogic.ts @@ -1,4 +1,4 @@ -import { RoomWidgetEnum } from '../../../../ui/widget/enums/RoomWidgetEnum'; +import { RoomObjectWidgetRequestEvent } from '../../../events'; import { RoomObjectDataRequestEvent } from '../../../events/RoomObjectDataRequestEvent'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { FurnitureLogic } from './FurnitureLogic'; @@ -8,6 +8,7 @@ export class FurnitureYoutubeLogic extends FurnitureLogic public getEventTypes(): string[] { const types = [ + RoomObjectWidgetRequestEvent.YOUTUBE, RoomObjectDataRequestEvent.RODRE_URL_PREFIX ]; @@ -24,8 +25,12 @@ export class FurnitureYoutubeLogic extends FurnitureLogic } } - public get widget(): string + public useObject(): void { - return RoomWidgetEnum.YOUTUBE; + if(!this.object || !this.eventDispatcher) return; + + console.log(this.object); + + this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.YOUTUBE, this.object)); } } diff --git a/src/nitro/room/object/visualization/pet/PetVisualization.ts b/src/nitro/room/object/visualization/pet/PetVisualization.ts index 0d23c12f..78b98b60 100644 --- a/src/nitro/room/object/visualization/pet/PetVisualization.ts +++ b/src/nitro/room/object/visualization/pet/PetVisualization.ts @@ -262,6 +262,8 @@ export class PetVisualization extends FurnitureAnimatedVisualization protected setPostureAndGesture(posture: string, gesture: string): void { + if(!this._data) return; + if(posture !== this._posture) { this._posture = posture; diff --git a/src/nitro/session/IRoomSession.ts b/src/nitro/session/IRoomSession.ts index bfb60cea..bd92b142 100644 --- a/src/nitro/session/IRoomSession.ts +++ b/src/nitro/session/IRoomSession.ts @@ -1,6 +1,6 @@ import { IDisposable } from '../../core/common/disposable/IDisposable'; import { IConnection } from '../../core/communication/connections/IConnection'; -import { RoomModerationSettings } from '../communication/messages/parser/room/data/RoomModerationSettings'; +import { RoomModerationSettings } from '../communication/messages/incoming/roomsettings/RoomModerationSettings'; import { UserDataManager } from './UserDataManager'; export interface IRoomSession extends IDisposable diff --git a/src/nitro/session/RoomSession.ts b/src/nitro/session/RoomSession.ts index 5ce340b8..6fec6f48 100644 --- a/src/nitro/session/RoomSession.ts +++ b/src/nitro/session/RoomSession.ts @@ -1,6 +1,7 @@ import { Disposable } from '../../core/common/disposable/Disposable'; import { IConnection } from '../../core/communication/connections/IConnection'; import { CompostPlantMessageComposer, FurnitureMultiStateComposer, HarvestPetMessageComposer, PetMountComposer, PollAnswerComposer, PollRejectComposer, PollStartComposer, RemovePetSaddleComposer, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer } from '../communication'; +import { RoomModerationSettings } from '../communication/messages/incoming/roomsettings/RoomModerationSettings'; import { RoomDoorbellAccessComposer } from '../communication/messages/outgoing/room/access/RoomDoorbellAccessComposer'; import { RoomEnterComposer } from '../communication/messages/outgoing/room/access/RoomEnterComposer'; import { RoomAmbassadorAlertComposer } from '../communication/messages/outgoing/room/action/RoomAmbassadorAlertComposer'; @@ -25,7 +26,6 @@ import { RoomUnitDanceComposer } from '../communication/messages/outgoing/room/u import { RoomUnitPostureComposer } from '../communication/messages/outgoing/room/unit/RoomUnitPostureComposer'; import { RoomUnitSignComposer } from '../communication/messages/outgoing/room/unit/RoomUnitSignComposer'; import { UserMottoComposer } from '../communication/messages/outgoing/user/data/UserMottoComposer'; -import { RoomModerationSettings } from '../communication/messages/parser/room/data/RoomModerationSettings'; import { RoomControllerLevel } from './enum/RoomControllerLevel'; import { RoomTradingLevelEnum } from './enum/RoomTradingLevelEnum'; import { RoomSessionEvent } from './events/RoomSessionEvent'; diff --git a/src/nitro/session/handler/RoomDataHandler.ts b/src/nitro/session/handler/RoomDataHandler.ts index 5c0c3920..23941da1 100644 --- a/src/nitro/session/handler/RoomDataHandler.ts +++ b/src/nitro/session/handler/RoomDataHandler.ts @@ -1,5 +1,5 @@ import { IConnection } from '../../../core/communication/connections/IConnection'; -import { GetGuestRoomResultEvent } from '../../communication/messages/incoming/room/data/GetGuestRoomResultEvent'; +import { GetGuestRoomResultEvent } from '../../communication/messages/incoming/navigator/GetGuestRoomResultEvent'; import { RoomSessionEvent } from '../events/RoomSessionEvent'; import { RoomSessionPropertyUpdateEvent } from '../events/RoomSessionPropertyUpdateEvent'; import { IRoomHandlerListener } from '../IRoomHandlerListener'; diff --git a/src/nitro/session/handler/RoomSessionHandler.ts b/src/nitro/session/handler/RoomSessionHandler.ts index 24db26df..91e747fc 100644 --- a/src/nitro/session/handler/RoomSessionHandler.ts +++ b/src/nitro/session/handler/RoomSessionHandler.ts @@ -1,7 +1,7 @@ import { IConnection } from '../../../core/communication/connections/IConnection'; import { DesktopViewEvent } from '../../communication/messages/incoming/desktop/DesktopViewEvent'; +import { FlatAccessDeniedMessageEvent } from '../../communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent'; import { RoomDoorbellAcceptedEvent } from '../../communication/messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent'; -import { RoomDoorbellRejectedEvent } from '../../communication/messages/incoming/room/access/doorbell/RoomDoorbellRejectedEvent'; import { RoomEnterEvent } from '../../communication/messages/incoming/room/access/RoomEnterEvent'; import { RoomReadyMessageEvent } from '../../communication/messages/incoming/room/mapping/RoomReadyMessageEvent'; import { YouAreSpectatorMessageEvent } from '../../communication/messages/incoming/room/session/YouAreSpectatorMessageEvent'; @@ -25,7 +25,7 @@ export class RoomSessionHandler extends BaseHandler connection.addMessageEvent(new RoomReadyMessageEvent(this.onRoomReadyMessageEvent.bind(this))); connection.addMessageEvent(new DesktopViewEvent(this.onDesktopViewEvent.bind(this))); connection.addMessageEvent(new RoomDoorbellAcceptedEvent(this.onRoomDoorbellAcceptedEvent.bind(this))); - connection.addMessageEvent(new RoomDoorbellRejectedEvent(this.onRoomDoorbellRejectedEvent.bind(this))); + connection.addMessageEvent(new FlatAccessDeniedMessageEvent(this.onRoomDoorbellRejectedEvent.bind(this))); connection.addMessageEvent(new YouAreSpectatorMessageEvent(this.onYouAreSpectatorMessageEvent.bind(this))); } @@ -84,9 +84,9 @@ export class RoomSessionHandler extends BaseHandler } } - private onRoomDoorbellRejectedEvent(event: RoomDoorbellRejectedEvent): void + private onRoomDoorbellRejectedEvent(event: FlatAccessDeniedMessageEvent): void { - if(!(event instanceof RoomDoorbellRejectedEvent) || !this.listener) return; + if(!(event instanceof FlatAccessDeniedMessageEvent) || !this.listener) return; const parser = event.getParser(); diff --git a/src/nitro/session/handler/RoomUsersHandler.ts b/src/nitro/session/handler/RoomUsersHandler.ts index c09226c9..db1a6647 100644 --- a/src/nitro/session/handler/RoomUsersHandler.ts +++ b/src/nitro/session/handler/RoomUsersHandler.ts @@ -1,9 +1,9 @@ import { IConnection } from '../../../core/communication/connections/IConnection'; import { PetFigureUpdateEvent } from '../../communication'; import { NewFriendRequestEvent } from '../../communication/messages/incoming/friendlist/NewFriendRequestEvent'; +import { DoorbellMessageEvent } from '../../communication/messages/incoming/navigator/DoorbellMessageEvent'; import { BotErrorEvent } from '../../communication/messages/incoming/notifications/BotErrorEvent'; import { PetPlacingErrorEvent } from '../../communication/messages/incoming/notifications/PetPlacingErrorEvent'; -import { RoomDoorbellEvent } from '../../communication/messages/incoming/room/access/doorbell/RoomDoorbellEvent'; import { FavoriteMembershipUpdateMessageEvent } from '../../communication/messages/incoming/room/engine/FavoriteMembershipUpdateMessageEvent'; import { PetInfoEvent } from '../../communication/messages/incoming/room/pet/PetInfoEvent'; import { PetStatusUpdateEvent } from '../../communication/messages/incoming/room/pet/PetStatusUpdateEvent'; @@ -38,7 +38,7 @@ export class RoomUsersHandler extends BaseHandler connection.addMessageEvent(new RoomUnitRemoveEvent(this.onRoomUnitRemoveEvent.bind(this))); connection.addMessageEvent(new RoomUnitDanceEvent(this.onRoomUnitDanceEvent.bind(this))); connection.addMessageEvent(new UserCurrentBadgesEvent(this.onUserCurrentBadgesEvent.bind(this))); - connection.addMessageEvent(new RoomDoorbellEvent(this.onRoomDoorbellEvent.bind(this))); + connection.addMessageEvent(new DoorbellMessageEvent(this.onRoomDoorbellEvent.bind(this))); connection.addMessageEvent(new UserNameChangeMessageEvent(this.onUserNameChangeMessageEvent.bind(this))); connection.addMessageEvent(new NewFriendRequestEvent(this.onNewFriendRequestEvent.bind(this))); connection.addMessageEvent(new PetInfoEvent(this.onPetInfoEvent.bind(this))); @@ -164,7 +164,7 @@ export class RoomUsersHandler extends BaseHandler this.listener.events.dispatchEvent(new RoomSessionUserBadgesEvent(session, parser.userId, parser.badges)); } - private onRoomDoorbellEvent(event: RoomDoorbellEvent): void + private onRoomDoorbellEvent(event: DoorbellMessageEvent): void { if(!this.listener) return;