From e66cdc585e5bdd63f98e1ba59888471ee54823fc Mon Sep 17 00:00:00 2001 From: dank074 Date: Sun, 22 Aug 2021 21:14:09 -0500 Subject: [PATCH] added advertisment and avatar packets --- src/nitro/communication/NitroMessages.ts | 20 +++++++++++------- .../messages/outgoing/OutgoingHeader.ts | 10 +++++---- .../GetInterstitialMessageComposer.ts | 21 +++++++++++++++++++ .../InterstitialShownMessageComposer.ts | 21 +++++++++++++++++++ .../messages/outgoing/advertisement/index.ts | 2 ++ .../avatar/ChangeUserNameMessageComposer.ts | 21 +++++++++++++++++++ .../avatar/CheckUserNameMessageComposer.ts | 21 +++++++++++++++++++ .../avatar/GetWardrobeMessageComposer.ts | 21 +++++++++++++++++++ .../SaveWardrobeOutfitMessageComposer.ts | 21 +++++++++++++++++++ .../messages/outgoing/avatar/index.ts | 4 ++++ .../communication/messages/outgoing/index.ts | 2 ++ .../user/wardrobe/UserWardrobePageComposer.ts | 21 ------------------- .../user/wardrobe/UserWardrobeSaveComposer.ts | 21 ------------------- .../messages/outgoing/user/wardrobe/index.ts | 2 -- 14 files changed, 153 insertions(+), 55 deletions(-) create mode 100644 src/nitro/communication/messages/outgoing/advertisement/GetInterstitialMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/advertisement/InterstitialShownMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/advertisement/index.ts create mode 100644 src/nitro/communication/messages/outgoing/avatar/ChangeUserNameMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/avatar/CheckUserNameMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/avatar/GetWardrobeMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/avatar/SaveWardrobeOutfitMessageComposer.ts create mode 100644 src/nitro/communication/messages/outgoing/avatar/index.ts delete mode 100644 src/nitro/communication/messages/outgoing/user/wardrobe/UserWardrobePageComposer.ts delete mode 100644 src/nitro/communication/messages/outgoing/user/wardrobe/UserWardrobeSaveComposer.ts delete mode 100644 src/nitro/communication/messages/outgoing/user/wardrobe/index.ts diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index eaa719c7..1282ed59 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, AvailabilityTimeMessageEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, CatalogApproveNameResultEvent, ChangeUserNameResultMessageEvent, CheckUserNameResultMessageEvent, ClubGiftNotificationEvent, FigureUpdateEvent, FurnitureGuildInfoComposer, GetBonusRareInfoMessageComposer, GetJukeboxPlayListMessageComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetUserSongDisksMessageComposer, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, MaintenanceStatusMessageEvent, MysteryBoxKeysEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, RoomAdErrorEvent, RoomUnitGiveHandItemPetComposer, SellablePetPalettesEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, UnseenResetCategoryComposer, UnseenResetItemsComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, WardrobeMessageEvent } from './messages'; +import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, AvailabilityTimeMessageEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, CatalogApproveNameResultEvent, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, ClubGiftNotificationEvent, FigureUpdateEvent, FurnitureGuildInfoComposer, GetBonusRareInfoMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetUserSongDisksMessageComposer, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, MaintenanceStatusMessageEvent, MysteryBoxKeysEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, RoomAdErrorEvent, RoomUnitGiveHandItemPetComposer, SellablePetPalettesEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, UnseenResetCategoryComposer, UnseenResetItemsComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, WardrobeMessageEvent } from './messages'; import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent'; import { CfhSanctionMessageEvent, CfhTopicsInitEvent, SanctionStatusEvent } from './messages/incoming/callforhelp'; import { CameraPublishStatusMessageEvent } from './messages/incoming/camera/CameraPublishStatusMessageEvent'; @@ -228,6 +228,8 @@ import { UserSubscriptionEvent } from './messages/incoming/user/inventory/subscr import { RespectReceivedEvent } from './messages/incoming/user/RespectReceivedEvent'; import { UserWardrobePageEvent } from './messages/incoming/user/wardrobe/UserWardrobePageEvent'; import { RequestAchievementsMessageComposer } from './messages/outgoing/achievements/RequestAchievementsMessageComposer'; +import { GetWardrobeMessageComposer } from './messages/outgoing/avatar/GetWardrobeMessageComposer'; +import { SaveWardrobeOutfitMessageComposer } from './messages/outgoing/avatar/SaveWardrobeOutfitMessageComposer'; import { PhotoCompetitionMessageComposer } from './messages/outgoing/camera/PhotoCompetitionMessageComposer'; import { PublishPhotoMessageComposer } from './messages/outgoing/camera/PublishPhotoMessageComposer'; import { PurchasePhotoMessageComposer } from './messages/outgoing/camera/PurchasePhotoMessageComposer'; @@ -453,8 +455,6 @@ import { UserSettingsOldChatComposer } from './messages/outgoing/user/settings/U import { UserSettingsRoomInvitesComposer } from './messages/outgoing/user/settings/UserSettingsRoomInvitesComposer'; import { UserSettingsSoundComposer } from './messages/outgoing/user/settings/UserSettingsSoundComposer'; import { UserRespectComposer } from './messages/outgoing/user/UserRespectComposer'; -import { UserWardrobePageComposer } from './messages/outgoing/user/wardrobe/UserWardrobePageComposer'; -import { UserWardrobeSaveComposer } from './messages/outgoing/user/wardrobe/UserWardrobeSaveComposer'; import { MiniMailUnreadCountParser } from './messages/parser/friendlist/MiniMailUnreadCountParser'; export class NitroMessages implements IMessageConfiguration @@ -848,6 +848,16 @@ export class NitroMessages implements IMessageConfiguration private registerComposers(): void { + // ADVERTISEMENT + this._composers.set(OutgoingHeader.INTERSTITIAL_SHOWN, InterstitialShownMessageComposer); + this._composers.set(OutgoingHeader.GET_INTERSTITIAL, GetInterstitialMessageComposer); + + // AVATAR + this._composers.set(OutgoingHeader.GET_WARDROBE, GetWardrobeMessageComposer); + this._composers.set(OutgoingHeader.SAVE_WARDROBE_OUTFIT, SaveWardrobeOutfitMessageComposer); + this._composers.set(OutgoingHeader.CHANGE_USERNAME, ChangeUserNameMessageComposer); + this._composers.set(OutgoingHeader.CHECK_USERNAME, CheckUserNameMessageComposer); + // AUTHENTICATION this._composers.set(OutgoingHeader.AUTHENTICATION, AuthenticationMessageComposer); @@ -1146,10 +1156,6 @@ export class NitroMessages implements IMessageConfiguration this._composers.set(OutgoingHeader.MODTOOL_REQUEST_USER_ROOMS, ModtoolRequestUserRoomsComposer); this._composers.set(OutgoingHeader.MODTOOL_ROOM_ALERT, ModtoolRoomAlertComposer); - // WARDROBE - this._composers.set(OutgoingHeader.USER_WARDROBE_PAGE, UserWardrobePageComposer); - this._composers.set(OutgoingHeader.USER_WARDROBE_SAVE, UserWardrobeSaveComposer); - // SETTINGS this._composers.set(OutgoingHeader.USER_SETTINGS_CAMERA, UserSettingsCameraFollowComposer); this._composers.set(OutgoingHeader.USER_SETTINGS_OLD_CHAT, UserSettingsOldChatComposer); diff --git a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts index a3ef8162..fa6ca251 100644 --- a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts +++ b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts @@ -172,8 +172,6 @@ export class OutgoingHeader public static USER_INFO = 357; public static USER_MOTTO = 2228; public static USER_IGNORED = 3878; - public static USER_OUTFIT_SAVE = 800; - public static USER_OUTFITS = 2742; public static USER_PETS = 3095; public static USER_PROFILE = 3265; public static USER_RESPECT = 2694; @@ -184,8 +182,8 @@ export class OutgoingHeader public static USER_SETTINGS_OLD_CHAT = 1262; public static USER_SETTINGS_VOLUME = 1367; public static USER_SUBSCRIPTION = 3166; - public static USER_WARDROBE_PAGE = 2742; - public static USER_WARDROBE_SAVE = 800; + public static GET_WARDROBE = 2742; + public static SAVE_WARDROBE_OUTFIT = 800; public static USER_TAGS = 17; public static USER_VISIT = 2970; public static WIRED_ACTION_SAVE = 2281; @@ -279,4 +277,8 @@ export class OutgoingHeader public static GET_SOUND_MACHINE_PLAYLIST = 3498; public static GET_USER_SONG_DISKS = 2304; public static REMOVE_JUKEBOX_DISK = 3050; + public static INTERSTITIAL_SHOWN = 1109; + public static GET_INTERSTITIAL = 2519; + public static CHANGE_USERNAME = 2977; + public static CHECK_USERNAME = 3950; } diff --git a/src/nitro/communication/messages/outgoing/advertisement/GetInterstitialMessageComposer.ts b/src/nitro/communication/messages/outgoing/advertisement/GetInterstitialMessageComposer.ts new file mode 100644 index 00000000..4c96e1c2 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/advertisement/GetInterstitialMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core'; + +export class GetInterstitialMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + dispose(): void + { + return; + } + + public getMessageArray() + { + return this._data; + } +} diff --git a/src/nitro/communication/messages/outgoing/advertisement/InterstitialShownMessageComposer.ts b/src/nitro/communication/messages/outgoing/advertisement/InterstitialShownMessageComposer.ts new file mode 100644 index 00000000..307e1e71 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/advertisement/InterstitialShownMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core'; + +export class InterstitialShownMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor() + { + this._data = []; + } + + dispose(): void + { + return; + } + + public getMessageArray() + { + return this._data; + } +} diff --git a/src/nitro/communication/messages/outgoing/advertisement/index.ts b/src/nitro/communication/messages/outgoing/advertisement/index.ts new file mode 100644 index 00000000..57ebfaa0 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/advertisement/index.ts @@ -0,0 +1,2 @@ +export * from './GetInterstitialMessageComposer'; +export * from './InterstitialShownMessageComposer'; diff --git a/src/nitro/communication/messages/outgoing/avatar/ChangeUserNameMessageComposer.ts b/src/nitro/communication/messages/outgoing/avatar/ChangeUserNameMessageComposer.ts new file mode 100644 index 00000000..97055ddd --- /dev/null +++ b/src/nitro/communication/messages/outgoing/avatar/ChangeUserNameMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core'; + +export class ChangeUserNameMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(name: string) + { + this._data = [ name ]; + } + + dispose(): void + { + this._data = null; + } + + public getMessageArray() + { + return this._data; + } +} diff --git a/src/nitro/communication/messages/outgoing/avatar/CheckUserNameMessageComposer.ts b/src/nitro/communication/messages/outgoing/avatar/CheckUserNameMessageComposer.ts new file mode 100644 index 00000000..12fbd746 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/avatar/CheckUserNameMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core'; + +export class CheckUserNameMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(name: string) + { + this._data = [ name ]; + } + + dispose(): void + { + this._data = null; + } + + public getMessageArray() + { + return this._data; + } +} diff --git a/src/nitro/communication/messages/outgoing/avatar/GetWardrobeMessageComposer.ts b/src/nitro/communication/messages/outgoing/avatar/GetWardrobeMessageComposer.ts new file mode 100644 index 00000000..64045171 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/avatar/GetWardrobeMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class GetWardrobeMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(pageId: number = 0) + { + this._data = [ pageId ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/avatar/SaveWardrobeOutfitMessageComposer.ts b/src/nitro/communication/messages/outgoing/avatar/SaveWardrobeOutfitMessageComposer.ts new file mode 100644 index 00000000..c3c44111 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/avatar/SaveWardrobeOutfitMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class SaveWardrobeOutfitMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(slotId: number, look: string, gender: string) + { + this._data = [ slotId, look, gender ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/avatar/index.ts b/src/nitro/communication/messages/outgoing/avatar/index.ts new file mode 100644 index 00000000..fc2f2101 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/avatar/index.ts @@ -0,0 +1,4 @@ +export * from './ChangeUserNameMessageComposer'; +export * from './CheckUserNameMessageComposer'; +export * from './GetWardrobeMessageComposer'; +export * from './SaveWardrobeOutfitMessageComposer'; diff --git a/src/nitro/communication/messages/outgoing/index.ts b/src/nitro/communication/messages/outgoing/index.ts index da6a0e6a..67e34055 100644 --- a/src/nitro/communication/messages/outgoing/index.ts +++ b/src/nitro/communication/messages/outgoing/index.ts @@ -1,4 +1,6 @@ export * from './achievements'; +export * from './advertisement'; +export * from './avatar'; export * from './camera'; export * from './catalog'; export * from './client'; diff --git a/src/nitro/communication/messages/outgoing/user/wardrobe/UserWardrobePageComposer.ts b/src/nitro/communication/messages/outgoing/user/wardrobe/UserWardrobePageComposer.ts deleted file mode 100644 index c1ffcf15..00000000 --- a/src/nitro/communication/messages/outgoing/user/wardrobe/UserWardrobePageComposer.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; - -export class UserWardrobePageComposer implements IMessageComposer> -{ - private _data: ConstructorParameters; - - constructor(pageId: number = 0) - { - this._data = [ pageId ]; - } - - public getMessageArray() - { - return this._data; - } - - public dispose(): void - { - return; - } -} diff --git a/src/nitro/communication/messages/outgoing/user/wardrobe/UserWardrobeSaveComposer.ts b/src/nitro/communication/messages/outgoing/user/wardrobe/UserWardrobeSaveComposer.ts deleted file mode 100644 index 3a5ac70e..00000000 --- a/src/nitro/communication/messages/outgoing/user/wardrobe/UserWardrobeSaveComposer.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; - -export class UserWardrobeSaveComposer implements IMessageComposer> -{ - private _data: ConstructorParameters; - - constructor(slotId: number, look: string, gender: string) - { - this._data = [ slotId, look, gender ]; - } - - public getMessageArray() - { - return this._data; - } - - public dispose(): void - { - return; - } -} diff --git a/src/nitro/communication/messages/outgoing/user/wardrobe/index.ts b/src/nitro/communication/messages/outgoing/user/wardrobe/index.ts deleted file mode 100644 index 544d1174..00000000 --- a/src/nitro/communication/messages/outgoing/user/wardrobe/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './UserWardrobePageComposer'; -export * from './UserWardrobeSaveComposer';