mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-19 06:46:28 +01:00
added incoming youtube messages
This commit is contained in:
parent
13aa1158fd
commit
5139c12b1b
@ -1,5 +1,5 @@
|
|||||||
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
||||||
import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, ClubGiftNotificationEvent, ControlYoutubeDisplayPlaybackMessageComposer, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GroupBadgesComposer, GroupBadgesEvent, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, MarketplaceBuyOfferComposer, MarketplaceRedeemCreditsComposer, MarketplaceRequesstItemStatsComposer, MarketplaceRequestComposer, MarketplaceRequestOffersComposer, MarketplaceRequestOwnItemsComposer, MarketplaceTakeItemBackComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PostMessageMessageComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, TryPhoneNumberMessageComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UpdateForumReadMarkerMessageComposer, UpdateForumSettingsMessageComposer, UpdateThreadMessageComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VerifyCodeMessageComposer, VoteForRoomMessageComposer, WardrobeMessageEvent } from './messages';
|
import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, ClubGiftNotificationEvent, ControlYoutubeDisplayPlaybackMessageComposer, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GroupBadgesComposer, GroupBadgesEvent, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, MarketplaceBuyOfferComposer, MarketplaceRedeemCreditsComposer, MarketplaceRequesstItemStatsComposer, MarketplaceRequestComposer, MarketplaceRequestOffersComposer, MarketplaceRequestOwnItemsComposer, MarketplaceTakeItemBackComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PostMessageMessageComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, TryPhoneNumberMessageComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UpdateForumReadMarkerMessageComposer, UpdateForumSettingsMessageComposer, UpdateThreadMessageComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VerifyCodeMessageComposer, VoteForRoomMessageComposer, WardrobeMessageEvent, YoutubeControlVideoMessageEvent, YoutubeDisplayPlaylistsEvent, YoutubeDisplayVideoMessageEvent } from './messages';
|
||||||
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
|
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
|
||||||
import { CfhSanctionMessageEvent, CfhTopicsInitEvent, SanctionStatusEvent } from './messages/incoming/callforhelp';
|
import { CfhSanctionMessageEvent, CfhTopicsInitEvent, SanctionStatusEvent } from './messages/incoming/callforhelp';
|
||||||
import { CameraPublishStatusMessageEvent } from './messages/incoming/camera/CameraPublishStatusMessageEvent';
|
import { CameraPublishStatusMessageEvent } from './messages/incoming/camera/CameraPublishStatusMessageEvent';
|
||||||
@ -615,6 +615,9 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.USER_FURNITURE_REFRESH, FurnitureListInvalidateEvent);
|
this._events.set(IncomingHeader.USER_FURNITURE_REFRESH, FurnitureListInvalidateEvent);
|
||||||
this._events.set(IncomingHeader.USER_FURNITURE_REMOVE, FurnitureListRemovedEvent);
|
this._events.set(IncomingHeader.USER_FURNITURE_REMOVE, FurnitureListRemovedEvent);
|
||||||
this._events.set(IncomingHeader.USER_FURNITURE_POSTIT_PLACED, FurniturePostItPlacedEvent);
|
this._events.set(IncomingHeader.USER_FURNITURE_POSTIT_PLACED, FurniturePostItPlacedEvent);
|
||||||
|
this._events.set(IncomingHeader.YOUTUBE_CONTROL_VIDEO, YoutubeControlVideoMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.YOUTUBE_DISPLAY_PLAYLISTS, YoutubeDisplayPlaylistsEvent);
|
||||||
|
this._events.set(IncomingHeader.YOUTUBE_DISPLAY_VIDEO, YoutubeDisplayVideoMessageEvent);
|
||||||
|
|
||||||
// TRADING
|
// TRADING
|
||||||
this._events.set(IncomingHeader.TRADE_ACCEPTED, TradingAcceptEvent);
|
this._events.set(IncomingHeader.TRADE_ACCEPTED, TradingAcceptEvent);
|
||||||
|
@ -318,4 +318,7 @@ export class IncomingHeader
|
|||||||
public static BADGE_POINT_LIMITS = 2501;
|
public static BADGE_POINT_LIMITS = 2501;
|
||||||
public static BADGE_REQUEST_FULFILLED = 2998;
|
public static BADGE_REQUEST_FULFILLED = 2998;
|
||||||
public static HELPER_TALENT_TRACK = 3406;
|
public static HELPER_TALENT_TRACK = 3406;
|
||||||
|
public static YOUTUBE_CONTROL_VIDEO = 1554;
|
||||||
|
public static YOUTUBE_DISPLAY_PLAYLISTS = 1112;
|
||||||
|
public static YOUTUBE_DISPLAY_VIDEO = 1411;
|
||||||
}
|
}
|
||||||
|
@ -12,3 +12,4 @@ export * from './LoveLockFurniStartEvent';
|
|||||||
export * from './RoomDimmerPresetsMessageData';
|
export * from './RoomDimmerPresetsMessageData';
|
||||||
export * from './RoomDimmerPresetsMessageEvent';
|
export * from './RoomDimmerPresetsMessageEvent';
|
||||||
export * from './wall';
|
export * from './wall';
|
||||||
|
export * from './youtube';
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { YoutubeControlVideoMessageParser } from '../../../../parser/room/furniture/youtube/YoutubeControlVideoMessageParser';
|
||||||
|
|
||||||
|
export class YoutubeControlVideoMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, YoutubeControlVideoMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): YoutubeControlVideoMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as YoutubeControlVideoMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { YoutubeDisplayPlaylistsMessageParser } from '../../../../parser/room/furniture/youtube/YoutubeDisplayPlaylistsMessageParser';
|
||||||
|
|
||||||
|
export class YoutubeDisplayPlaylistsEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, YoutubeDisplayPlaylistsMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): YoutubeDisplayPlaylistsMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as YoutubeDisplayPlaylistsMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { YoutubeDisplayVideoMessageParser } from '../../../../parser/room/furniture/youtube/YoutubeDisplayVideoMessageParser';
|
||||||
|
|
||||||
|
export class YoutubeDisplayVideoMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, YoutubeDisplayVideoMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): YoutubeDisplayVideoMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as YoutubeDisplayVideoMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
export * from './YoutubeControlVideoMessageEvent';
|
||||||
|
export * from './YoutubeDisplayPlaylistsEvent';
|
||||||
|
export * from './YoutubeDisplayVideoMessageEvent';
|
@ -11,3 +11,4 @@ export * from './LoveLockFurniFriendConfirmedParser';
|
|||||||
export * from './LoveLockFurniStartParser';
|
export * from './LoveLockFurniStartParser';
|
||||||
export * from './RoomDimmerPresetsMessageParser';
|
export * from './RoomDimmerPresetsMessageParser';
|
||||||
export * from './wall';
|
export * from './wall';
|
||||||
|
export * from './youtube';
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
|
||||||
|
export class YoutubeControlVideoMessageParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _furniId: number;
|
||||||
|
private _commandId: number;
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
this._furniId = wrapper.readInt();
|
||||||
|
this._commandId = wrapper.readInt();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._furniId = -1;
|
||||||
|
this._commandId = -1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get furniId(): number
|
||||||
|
{
|
||||||
|
return this._furniId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get commandId(): number
|
||||||
|
{
|
||||||
|
return this._commandId;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
export class YoutubeDisplayPlaylist
|
||||||
|
{
|
||||||
|
private _video: string;
|
||||||
|
private _title: string;
|
||||||
|
private _description: string;
|
||||||
|
|
||||||
|
constructor(k: string, _arg_2: string, _arg_3: string)
|
||||||
|
{
|
||||||
|
this._video = k;
|
||||||
|
this._title = _arg_2;
|
||||||
|
this._description = _arg_3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get video():string
|
||||||
|
{
|
||||||
|
return this._video;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get title():string
|
||||||
|
{
|
||||||
|
return this._title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get description():string
|
||||||
|
{
|
||||||
|
return this._description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../../core';
|
||||||
|
import { IMessageParser } from '../../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
import { YoutubeDisplayPlaylist } from './YoutubeDisplayPlaylist';
|
||||||
|
|
||||||
|
export class YoutubeDisplayPlaylistsMessageParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _furniId:number;
|
||||||
|
private _playlists:YoutubeDisplayPlaylist[];
|
||||||
|
private _selectedPlaylistId:string;
|
||||||
|
|
||||||
|
flush(): boolean
|
||||||
|
{
|
||||||
|
this._furniId = -1;
|
||||||
|
this._playlists = null;
|
||||||
|
this._selectedPlaylistId = null;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
this._furniId = wrapper.readInt();
|
||||||
|
const count = wrapper.readInt();
|
||||||
|
this._playlists = [];
|
||||||
|
for(let i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
this._playlists.push(new YoutubeDisplayPlaylist(wrapper.readString(), wrapper.readString(), wrapper.readString()));
|
||||||
|
}
|
||||||
|
this._selectedPlaylistId = wrapper.readString();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get furniId():number
|
||||||
|
{
|
||||||
|
return this._furniId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get playlists():YoutubeDisplayPlaylist[]
|
||||||
|
{
|
||||||
|
return this._playlists;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get selectedPlaylistId():string
|
||||||
|
{
|
||||||
|
return this._selectedPlaylistId;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
import { IMessageParser } from '../../../../../../..';
|
||||||
|
import { IMessageDataWrapper } from '../../../../../../../core';
|
||||||
|
|
||||||
|
export class YoutubeDisplayVideoMessageParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _furniId:number;
|
||||||
|
private _videoId:string;
|
||||||
|
private _startAtSeconds:number;
|
||||||
|
private _endAtSeconds:number;
|
||||||
|
private _state:number;
|
||||||
|
|
||||||
|
flush(): boolean
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
this._furniId = wrapper.readInt();
|
||||||
|
this._videoId = wrapper.readString();
|
||||||
|
this._startAtSeconds = wrapper.readInt();
|
||||||
|
this._endAtSeconds = wrapper.readInt();
|
||||||
|
this._state = wrapper.readInt();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get furniId():number
|
||||||
|
{
|
||||||
|
return this._furniId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get videoId():string
|
||||||
|
{
|
||||||
|
return this._videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get state():number
|
||||||
|
{
|
||||||
|
return this._state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get startAtSeconds(): number
|
||||||
|
{
|
||||||
|
return this._startAtSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get endAtSeconds(): number
|
||||||
|
{
|
||||||
|
return this._endAtSeconds;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
export * from './YoutubeControlVideoMessageParser';
|
||||||
|
export * from './YoutubeDisplayPlaylist';
|
||||||
|
export * from './YoutubeDisplayPlaylistsMessageParser';
|
||||||
|
export * from './YoutubeDisplayVideoMessageParser';
|
Loading…
Reference in New Issue
Block a user