mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
RoomWidgetCamera packets
This commit is contained in:
parent
191cb16a8d
commit
815a1d8730
@ -1,5 +1,5 @@
|
||||
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
||||
import { ApproveNameMessageComposer, CatalogApproveNameResultEvent, RoomUnitGiveHandItemPetComposer, SellablePetPalettesEvent } from './messages';
|
||||
import { ApproveNameMessageComposer, CatalogApproveNameResultEvent, RoomUnitGiveHandItemPetComposer, RoomWidgetCameraPublishedEvent, RoomWidgetCameraPurchaseComposer, SellablePetPalettesEvent } from './messages';
|
||||
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
|
||||
import { CatalogClubEvent } from './messages/incoming/catalog/CatalogClubEvent';
|
||||
import { CatalogClubGiftsEvent } from './messages/incoming/catalog/CatalogClubGiftsEvent';
|
||||
@ -120,6 +120,8 @@ 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 { RoomWidgetCameraConfigurationEvent } from './messages/incoming/room/camera/RoomWidgetCameraConfigurationEvent';
|
||||
import { RoomWidgetCameraPurchaseSuccessfulEvent } from './messages/incoming/room/camera/RoomWidgetCameraPurchaseSuccessfulEvent';
|
||||
import { RoomBannedUsersEvent } from './messages/incoming/room/data/RoomBannedUsersEvent';
|
||||
import { RoomChatSettingsEvent } from './messages/incoming/room/data/RoomChatSettingsEvent';
|
||||
import { RoomInfoEvent } from './messages/incoming/room/data/RoomInfoEvent';
|
||||
@ -319,6 +321,10 @@ import { RoomStaffPickComposer } from './messages/outgoing/room/action/RoomStaff
|
||||
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 { RoomWidgetCameraConfigurationComposer } from './messages/outgoing/room/camera/RoomWidgetCameraConfigurationComposer';
|
||||
import { RoomWidgetCameraPublishComposer } from './messages/outgoing/room/camera/RoomWidgetCameraPublishComposer';
|
||||
import { RoomWidgetCameraRoomPictureComposer } from './messages/outgoing/room/camera/RoomWidgetCameraRoomPictureComposer';
|
||||
import { RoomWidgetCameraRoomThumbnailComposer } from './messages/outgoing/room/camera/RoomWidgetCameraRoomThumbnailComposer';
|
||||
import { RoomBannedUsersComposer } from './messages/outgoing/room/data/RoomBannedUsersComposer';
|
||||
import { RoomInfoComposer } from './messages/outgoing/room/data/RoomInfoComposer';
|
||||
import { RoomSettingsComposer } from './messages/outgoing/room/data/RoomSettingsComposer';
|
||||
@ -446,6 +452,11 @@ export class NitroMessages implements IMessageConfiguration
|
||||
this._events.set(IncomingHeader.CATALOG_RECEIVE_PET_BREEDS, SellablePetPalettesEvent);
|
||||
this._events.set(IncomingHeader.CATALOG_APPROVE_NAME_RESULT, CatalogApproveNameResultEvent);
|
||||
|
||||
// CAMERA
|
||||
this._events.set(IncomingHeader.CAMERA_PRICE, RoomWidgetCameraConfigurationEvent);
|
||||
this._events.set(IncomingHeader.CAMERA_PUBLISHED, RoomWidgetCameraPublishedEvent);
|
||||
this._events.set(IncomingHeader.CAMERA_PURCHASE_SUCCESSFUL, RoomWidgetCameraPurchaseSuccessfulEvent);
|
||||
|
||||
// CLIENT
|
||||
this._events.set(IncomingHeader.CLIENT_PING, ClientPingEvent);
|
||||
|
||||
@ -744,6 +755,13 @@ export class NitroMessages implements IMessageConfiguration
|
||||
this._composers.set(OutgoingHeader.CATALOG_SELECT_VIP_GIFT, CatalogSelectClubGiftComposer);
|
||||
this._composers.set(OutgoingHeader.CATALOG_REQUESET_PET_BREEDS, CatalogRequestPetBreedsComposer);
|
||||
|
||||
// CAMERA
|
||||
this._composers.set(OutgoingHeader.CAMERA_PRICE, RoomWidgetCameraConfigurationComposer);
|
||||
this._composers.set(OutgoingHeader.CAMERA_PUBLISH, RoomWidgetCameraPublishComposer);
|
||||
this._composers.set(OutgoingHeader.CAMERA_PURCHASE, RoomWidgetCameraPurchaseComposer);
|
||||
this._composers.set(OutgoingHeader.CAMERA_SAVE, RoomWidgetCameraRoomPictureComposer);
|
||||
this._composers.set(OutgoingHeader.CAMERA_THUMBNAIL, RoomWidgetCameraRoomThumbnailComposer);
|
||||
|
||||
// CLIENT
|
||||
this._composers.set(OutgoingHeader.CLIENT_PONG, ClientPongComposer);
|
||||
this._composers.set(OutgoingHeader.RELEASE_VERSION, ClientReleaseVersionComposer);
|
||||
|
@ -5,6 +5,8 @@ export class IncomingHeader
|
||||
public static AVAILABILITY_STATUS = 2033;
|
||||
public static BUILDERS_CLUB_EXPIRED = 1452;
|
||||
public static CAMERA_PRICE = 3878;
|
||||
public static CAMERA_PUBLISHED = 2057;
|
||||
public static CAMERA_PURCHASE_SUCCESSFUL = 2783;
|
||||
public static CAMERA_THUMBNAIL_SAVED = 3595;
|
||||
public static CAMERA_URL = 3696;
|
||||
public static CATALOG_CLUB = 2405;
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { RoomWidgetCameraConfigurationParser } from '../../../parser/room/camera/RoomWidgetCameraConfigurationParser';
|
||||
|
||||
export class RoomWidgetCameraConfigurationEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, RoomWidgetCameraConfigurationParser);
|
||||
}
|
||||
|
||||
public getParser(): RoomWidgetCameraConfigurationParser
|
||||
{
|
||||
return this.parser as RoomWidgetCameraConfigurationParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { RoomWidgetCameraPublishedParser } from '../../../parser/room/camera/RoomWidgetCameraPublishedParser';
|
||||
|
||||
export class RoomWidgetCameraPublishedEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, RoomWidgetCameraPublishedParser);
|
||||
}
|
||||
|
||||
public getParser(): RoomWidgetCameraPublishedParser
|
||||
{
|
||||
return this.parser as RoomWidgetCameraPublishedParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { RoomWidgetCameraPurchaseSuccessfulParser } from '../../../parser/room/camera/RoomWidgetCameraPurchaseSuccessfulParser';
|
||||
|
||||
export class RoomWidgetCameraPurchaseSuccessfulEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, RoomWidgetCameraPurchaseSuccessfulParser);
|
||||
}
|
||||
|
||||
public getParser(): RoomWidgetCameraPurchaseSuccessfulParser
|
||||
{
|
||||
return this.parser as RoomWidgetCameraPurchaseSuccessfulParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
export * from './RoomWidgetCameraConfigurationEvent';
|
||||
export * from './RoomWidgetCameraPublishedEvent';
|
||||
export * from './RoomWidgetCameraPurchaseSuccessfulEvent';
|
@ -1,5 +1,6 @@
|
||||
export * from './access';
|
||||
export * from './bots';
|
||||
export * from './camera';
|
||||
export * from './data';
|
||||
export * from './engine';
|
||||
export * from './furniture';
|
||||
|
@ -6,6 +6,8 @@ export class OutgoingHeader
|
||||
public static BOT_PLACE = 1592;
|
||||
public static BOT_SKILL_SAVE = 2624;
|
||||
public static CAMERA_PRICE = 796;
|
||||
public static CAMERA_PUBLISH = 2068;
|
||||
public static CAMERA_PURCHASE = 2408;
|
||||
public static CAMERA_SAVE = 3226;
|
||||
public static CAMERA_THUMBNAIL = 1982;
|
||||
public static CATALOG_CLUB = 3285;
|
||||
|
@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||
|
||||
export class RoomWidgetCameraConfigurationComposer implements IMessageComposer<ConstructorParameters<typeof RoomWidgetCameraConfigurationComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof RoomWidgetCameraConfigurationComposer>;
|
||||
|
||||
constructor()
|
||||
{
|
||||
this._data = [];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||
|
||||
export class RoomWidgetCameraPublishComposer implements IMessageComposer<ConstructorParameters<typeof RoomWidgetCameraPublishComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof RoomWidgetCameraPublishComposer>;
|
||||
|
||||
constructor()
|
||||
{
|
||||
this._data = [];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||
|
||||
export class RoomWidgetCameraPurchaseComposer implements IMessageComposer<ConstructorParameters<typeof RoomWidgetCameraPurchaseComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof RoomWidgetCameraPurchaseComposer>;
|
||||
|
||||
constructor()
|
||||
{
|
||||
this._data = [];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||
|
||||
export class RoomWidgetCameraRoomPictureComposer implements IMessageComposer<ConstructorParameters<typeof RoomWidgetCameraRoomPictureComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof RoomWidgetCameraRoomPictureComposer>;
|
||||
|
||||
constructor(unknownFloat: number, image: number[])
|
||||
{
|
||||
this._data = [ unknownFloat, image ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||
|
||||
export class RoomWidgetCameraRoomThumbnailComposer implements IMessageComposer<ConstructorParameters<typeof RoomWidgetCameraRoomThumbnailComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof RoomWidgetCameraRoomThumbnailComposer>;
|
||||
|
||||
constructor(unknownFloat: number, image: number[])
|
||||
{
|
||||
this._data = [ unknownFloat, image ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
export * from './RoomWidgetCameraConfigurationComposer';
|
||||
export * from './RoomWidgetCameraPublishComposer';
|
||||
export * from './RoomWidgetCameraPurchaseComposer';
|
||||
export * from './RoomWidgetCameraRoomPictureComposer';
|
||||
export * from './RoomWidgetCameraRoomThumbnailComposer';
|
@ -1,6 +1,7 @@
|
||||
export * from './access';
|
||||
export * from './action';
|
||||
export * from './bots';
|
||||
export * from './camera';
|
||||
export * from './data';
|
||||
export * from './engine';
|
||||
export * from './furniture';
|
||||
|
@ -0,0 +1,44 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class RoomWidgetCameraConfigurationParser implements IMessageParser
|
||||
{
|
||||
private _credits: number;
|
||||
private _points: number;
|
||||
private _pointsType: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._credits = 0;
|
||||
this._points = 0;
|
||||
this._pointsType = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._credits = wrapper.readInt();
|
||||
this._points = wrapper.readInt();
|
||||
this._pointsType = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get credits(): number
|
||||
{
|
||||
return this._credits;
|
||||
}
|
||||
|
||||
public get points(): number
|
||||
{
|
||||
return this._points;
|
||||
}
|
||||
|
||||
public get pointsType(): number
|
||||
{
|
||||
return this._pointsType;
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class RoomWidgetCameraPublishedParser implements IMessageParser
|
||||
{
|
||||
private _wasSuccessful: boolean;
|
||||
private _cooldownSeconds: number;
|
||||
private _extraDataId: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._wasSuccessful = false;
|
||||
this._cooldownSeconds = 0;
|
||||
this._extraDataId = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._wasSuccessful = wrapper.readBoolean();
|
||||
this._cooldownSeconds = wrapper.readInt();
|
||||
this._extraDataId = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get wasSuccessful(): boolean
|
||||
{
|
||||
return this._wasSuccessful;
|
||||
}
|
||||
|
||||
public get cooldownSeconds(): number
|
||||
{
|
||||
return this._cooldownSeconds;
|
||||
}
|
||||
|
||||
public get extraDataId(): number
|
||||
{
|
||||
return this._extraDataId;
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class RoomWidgetCameraPurchaseSuccessfulParser implements IMessageParser
|
||||
{
|
||||
public flush(): boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
export * from './RoomWidgetCameraConfigurationParser';
|
||||
export * from './RoomWidgetCameraPublishedParser';
|
||||
export * from './RoomWidgetCameraPurchaseSuccessfulParser';
|
@ -1,5 +1,6 @@
|
||||
export * from './access';
|
||||
export * from './bots';
|
||||
export * from './camera';
|
||||
export * from './data';
|
||||
export * from './engine';
|
||||
export * from './furniture';
|
||||
|
Loading…
Reference in New Issue
Block a user