This commit is contained in:
Bill 2021-08-23 01:04:46 -04:00
commit 418485f565
17 changed files with 204 additions and 55 deletions

View File

@ -1,5 +1,5 @@
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, ChangeUserNameResultMessageEvent, CheckUserNameResultMessageEvent, ClubGiftNotificationEvent, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, FurnitureGuildInfoComposer, GetBonusRareInfoMessageComposer, GetJukeboxPlayListMessageComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetUserSongDisksMessageComposer, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, IsOfferGiftableMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomUnitGiveHandItemPetComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, UnseenResetCategoryComposer, UnseenResetItemsComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, WardrobeMessageEvent } from './messages';
import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, ClubGiftNotificationEvent, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, FurnitureGuildInfoComposer, GetBonusRareInfoMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetUserSongDisksMessageComposer, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsOfferGiftableMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomUnitGiveHandItemPetComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, 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';
@ -215,6 +215,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';
@ -440,8 +442,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
@ -855,6 +855,20 @@ 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);
// CAMPAIGN
this._composers.set(OutgoingHeader.OPEN_CAMPAIGN_CALENDAR_DOOR, OpenCampaignCalendarDoorComposer);
this._composers.set(OutgoingHeader.OPEN_CAMPAIGN_CALENDAR_DOOR_STAFF, OpenCampaignCalendarDoorAsStaffComposer);
// AUTHENTICATION
this._composers.set(OutgoingHeader.AUTHENTICATION, AuthenticationMessageComposer);
@ -1153,10 +1167,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);

View File

@ -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,10 @@ 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;
public static OPEN_CAMPAIGN_CALENDAR_DOOR_STAFF= 3889;
public static OPEN_CAMPAIGN_CALENDAR_DOOR = 2257;
}

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../core';
export class GetInterstitialMessageComposer implements IMessageComposer<ConstructorParameters<typeof GetInterstitialMessageComposer>>
{
private _data: ConstructorParameters<typeof GetInterstitialMessageComposer>;
constructor()
{
this._data = [];
}
dispose(): void
{
return;
}
public getMessageArray()
{
return this._data;
}
}

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../core';
export class InterstitialShownMessageComposer implements IMessageComposer<ConstructorParameters<typeof InterstitialShownMessageComposer>>
{
private _data: ConstructorParameters<typeof InterstitialShownMessageComposer>;
constructor()
{
this._data = [];
}
dispose(): void
{
return;
}
public getMessageArray()
{
return this._data;
}
}

View File

@ -0,0 +1,2 @@
export * from './GetInterstitialMessageComposer';
export * from './InterstitialShownMessageComposer';

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../core';
export class ChangeUserNameMessageComposer implements IMessageComposer<ConstructorParameters<typeof ChangeUserNameMessageComposer>>
{
private _data: ConstructorParameters<typeof ChangeUserNameMessageComposer>;
constructor(name: string)
{
this._data = [ name ];
}
dispose(): void
{
this._data = null;
}
public getMessageArray()
{
return this._data;
}
}

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../core';
export class CheckUserNameMessageComposer implements IMessageComposer<ConstructorParameters<typeof CheckUserNameMessageComposer>>
{
private _data: ConstructorParameters<typeof CheckUserNameMessageComposer>;
constructor(name: string)
{
this._data = [ name ];
}
dispose(): void
{
this._data = null;
}
public getMessageArray()
{
return this._data;
}
}

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer';
export class GetWardrobeMessageComposer implements IMessageComposer<ConstructorParameters<typeof GetWardrobeMessageComposer>>
{
private _data: ConstructorParameters<typeof GetWardrobeMessageComposer>;
constructor(pageId: number = 0)
{
this._data = [ pageId ];
}
public getMessageArray()
{
return this._data;
}
public dispose(): void
{
return;
}
}

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer';
export class SaveWardrobeOutfitMessageComposer implements IMessageComposer<ConstructorParameters<typeof SaveWardrobeOutfitMessageComposer>>
{
private _data: ConstructorParameters<typeof SaveWardrobeOutfitMessageComposer>;
constructor(slotId: number, look: string, gender: string)
{
this._data = [ slotId, look, gender ];
}
public getMessageArray()
{
return this._data;
}
public dispose(): void
{
return;
}
}

View File

@ -0,0 +1,4 @@
export * from './ChangeUserNameMessageComposer';
export * from './CheckUserNameMessageComposer';
export * from './GetWardrobeMessageComposer';
export * from './SaveWardrobeOutfitMessageComposer';

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../core';
export class OpenCampaignCalendarDoorAsStaffComposer implements IMessageComposer<ConstructorParameters<typeof OpenCampaignCalendarDoorAsStaffComposer>>
{
private _data: ConstructorParameters<typeof OpenCampaignCalendarDoorAsStaffComposer>;
constructor(k: string, _arg_2: number)
{
this._data = [ k, _arg_2 ];
}
dispose(): void
{
this._data = null;
}
public getMessageArray()
{
return this._data;
}
}

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../core';
export class OpenCampaignCalendarDoorComposer implements IMessageComposer<ConstructorParameters<typeof OpenCampaignCalendarDoorComposer>>
{
private _data: ConstructorParameters<typeof OpenCampaignCalendarDoorComposer>;
constructor(k: string, _arg_2: number)
{
this._data = [ k, _arg_2 ];
}
dispose(): void
{
this._data = null;
}
public getMessageArray()
{
return this._data;
}
}

View File

@ -0,0 +1,2 @@
export * from './OpenCampaignCalendarDoorAsStaffComposer';
export * from './OpenCampaignCalendarDoorComposer';

View File

@ -1,5 +1,8 @@
export * from './achievements';
export * from './advertisement';
export * from './avatar';
export * from './camera';
export * from './campaign';
export * from './catalog';
export * from './client';
export * from './desktop';

View File

@ -1,21 +0,0 @@
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
export class UserWardrobePageComposer implements IMessageComposer<ConstructorParameters<typeof UserWardrobePageComposer>>
{
private _data: ConstructorParameters<typeof UserWardrobePageComposer>;
constructor(pageId: number = 0)
{
this._data = [ pageId ];
}
public getMessageArray()
{
return this._data;
}
public dispose(): void
{
return;
}
}

View File

@ -1,21 +0,0 @@
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
export class UserWardrobeSaveComposer implements IMessageComposer<ConstructorParameters<typeof UserWardrobeSaveComposer>>
{
private _data: ConstructorParameters<typeof UserWardrobeSaveComposer>;
constructor(slotId: number, look: string, gender: string)
{
this._data = [ slotId, look, gender ];
}
public getMessageArray()
{
return this._data;
}
public dispose(): void
{
return;
}
}

View File

@ -1,2 +0,0 @@
export * from './UserWardrobePageComposer';
export * from './UserWardrobeSaveComposer';