You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 15:36:18 +00:00
🆙 Small Fixes
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -66,6 +66,7 @@ export * from './messages/incoming/room/furniture';
|
||||
export * from './messages/incoming/room/furniture/floor';
|
||||
export * from './messages/incoming/room/furniture/wall';
|
||||
export * from './messages/incoming/room/furniture/youtube';
|
||||
export * from './messages/incoming/room/youtube';
|
||||
export * from './messages/incoming/room/mapping';
|
||||
export * from './messages/incoming/room/pet';
|
||||
export * from './messages/incoming/room/session';
|
||||
@@ -142,6 +143,7 @@ export * from './messages/outgoing/room/furniture/presents';
|
||||
export * from './messages/outgoing/room/furniture/toner';
|
||||
export * from './messages/outgoing/room/furniture/wall';
|
||||
export * from './messages/outgoing/room/furniture/youtube';
|
||||
export * from './messages/outgoing/room/youtube';
|
||||
export * from './messages/outgoing/room/layout';
|
||||
export * from './messages/outgoing/room/pets';
|
||||
export * from './messages/outgoing/room/session';
|
||||
@@ -223,6 +225,7 @@ export * from './messages/parser/room/furniture';
|
||||
export * from './messages/parser/room/furniture/floor';
|
||||
export * from './messages/parser/room/furniture/wall';
|
||||
export * from './messages/parser/room/furniture/youtube';
|
||||
export * from './messages/parser/room/youtube';
|
||||
export * from './messages/parser/room/mapping';
|
||||
export * from './messages/parser/room/pet';
|
||||
export * from './messages/parser/room/session';
|
||||
|
||||
@@ -269,6 +269,11 @@ export class IncomingHeader
|
||||
public static WIRED_ACTION = 1434;
|
||||
public static WIRED_CONDITION = 1108;
|
||||
public static WIRED_ERROR = 156;
|
||||
public static WIRED_MONITOR_DATA = 5101;
|
||||
public static WIRED_ROOM_SETTINGS_DATA = 5102;
|
||||
public static WIRED_USER_VARIABLES_DATA = 5103;
|
||||
public static CONF_INVIS_STATE = 5104;
|
||||
public static HANDITEM_BLOCK_STATE = 5105;
|
||||
public static WIRED_OPEN = 1830;
|
||||
public static WIRED_REWARD = 178;
|
||||
public static WIRED_SAVE = 1155;
|
||||
@@ -490,8 +495,8 @@ export class IncomingHeader
|
||||
public static USER_PREFIXES = 7001;
|
||||
public static PREFIX_RECEIVED = 7002;
|
||||
public static ACTIVE_PREFIX_UPDATED = 7003;
|
||||
|
||||
// YouTube Room Broadcast
|
||||
|
||||
// YouTube Room Broadcast
|
||||
public static YOUTUBE_ROOM_BROADCAST = 8001;
|
||||
public static YOUTUBE_ROOM_WATCHERS = 8002;
|
||||
public static YOUTUBE_ROOM_SETTINGS = 8003;
|
||||
|
||||
@@ -58,6 +58,7 @@ export * from './room/furniture';
|
||||
export * from './room/furniture/floor';
|
||||
export * from './room/furniture/wall';
|
||||
export * from './room/furniture/youtube';
|
||||
export * from './room/youtube';
|
||||
export * from './room/mapping';
|
||||
export * from './room/pet';
|
||||
export * from './room/session';
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { ConfInvisStateMessageParser } from '../../../parser';
|
||||
|
||||
export class ConfInvisStateMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ConfInvisStateMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): ConfInvisStateMessageParser
|
||||
{
|
||||
return this.parser as ConfInvisStateMessageParser;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { HanditemBlockStateMessageParser } from '../../../parser';
|
||||
|
||||
export class HanditemBlockStateMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, HanditemBlockStateMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): HanditemBlockStateMessageParser
|
||||
{
|
||||
return this.parser as HanditemBlockStateMessageParser;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from './AreaHideMessageEvent';
|
||||
export * from './ConfInvisStateMessageEvent';
|
||||
export * from './CustomUserNotificationMessageEvent';
|
||||
export * from './DiceValueMessageEvent';
|
||||
export * from './FurniRentOrBuyoutOfferMessageEvent';
|
||||
@@ -6,6 +7,7 @@ export * from './FurnitureAliasesEvent';
|
||||
export * from './FurnitureDataEvent';
|
||||
export * from './FurnitureStackHeightEvent';
|
||||
export * from './GroupFurniContextMenuInfoMessageEvent';
|
||||
export * from './HanditemBlockStateMessageEvent';
|
||||
export * from './ItemDataUpdateMessageEvent';
|
||||
export * from './LoveLockFurniFinishedEvent';
|
||||
export * from './LoveLockFurniFriendConfirmedEvent';
|
||||
|
||||
@@ -13,4 +13,3 @@ export * from './pet';
|
||||
export * from './session';
|
||||
export * from './unit';
|
||||
export * from './unit/chat';
|
||||
export * from './youtube';
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { WiredMonitorDataParser } from '../../parser';
|
||||
|
||||
export class WiredMonitorDataEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, WiredMonitorDataParser);
|
||||
}
|
||||
|
||||
public getParser(): WiredMonitorDataParser
|
||||
{
|
||||
return this.parser as WiredMonitorDataParser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { WiredRoomSettingsDataParser } from '../../parser';
|
||||
|
||||
export class WiredRoomSettingsDataEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, WiredRoomSettingsDataParser);
|
||||
}
|
||||
|
||||
public getParser(): WiredRoomSettingsDataParser
|
||||
{
|
||||
return this.parser as WiredRoomSettingsDataParser;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { WiredUserVariablesDataParser } from '../../parser';
|
||||
|
||||
export class WiredUserVariablesDataEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, WiredUserVariablesDataParser);
|
||||
}
|
||||
|
||||
public getParser(): WiredUserVariablesDataParser
|
||||
{
|
||||
return this.parser as WiredUserVariablesDataParser;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
export * from './WiredFurniActionEvent';
|
||||
export * from './WiredFurniConditionEvent';
|
||||
export * from './WiredFurniTriggerEvent';
|
||||
export * from './WiredMonitorDataEvent';
|
||||
export * from './WiredOpenEvent';
|
||||
export * from './WiredRoomSettingsDataEvent';
|
||||
export * from './WiredRewardResultMessageEvent';
|
||||
export * from './WiredSaveSuccessEvent';
|
||||
export * from './WiredUserVariablesDataEvent';
|
||||
export * from './WiredValidationErrorEvent';
|
||||
|
||||
@@ -271,6 +271,13 @@ export class OutgoingHeader
|
||||
public static WIRED_ACTION_SAVE = 2281;
|
||||
public static WIRED_APPLY_SNAPSHOT = 3373;
|
||||
public static WIRED_CONDITION_SAVE = 3203;
|
||||
public static WIRED_MONITOR_REQUEST = 10021;
|
||||
public static WIRED_ROOM_SETTINGS_REQUEST = 10022;
|
||||
public static WIRED_ROOM_SETTINGS_SAVE = 10023;
|
||||
public static WIRED_USER_VARIABLES_REQUEST = 10024;
|
||||
public static WIRED_USER_VARIABLE_UPDATE = 10025;
|
||||
public static WIRED_USER_VARIABLE_MANAGE = 10026;
|
||||
public static WIRED_USER_INSPECT_MOVE = 10027;
|
||||
public static WIRED_OPEN = 768;
|
||||
public static WIRED_TRIGGER_SAVE = 1520;
|
||||
public static GET_ITEM_DATA = 3964;
|
||||
@@ -503,9 +510,4 @@ export class OutgoingHeader
|
||||
public static SET_ACTIVE_PREFIX = 7012;
|
||||
public static DELETE_PREFIX = 7013;
|
||||
public static PURCHASE_PREFIX = 7014;
|
||||
|
||||
// YouTube Room Broadcast
|
||||
public static YOUTUBE_ROOM_PLAY = 8001;
|
||||
public static YOUTUBE_ROOM_WATCHING = 8002;
|
||||
public static YOUTUBE_ROOM_SETTINGS = 8003;
|
||||
}
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ export class CatalogAdminCreateOfferComposer implements IMessageComposer<Constru
|
||||
{
|
||||
private _data: ConstructorParameters<typeof CatalogAdminCreateOfferComposer>;
|
||||
|
||||
constructor(pageId: number, itemId: number, catalogName: string, costCredits: number, costPoints: number, pointsType: number, amount: number, clubOnly: number, extradata: string, haveOffer: boolean, offerIdGroup: number, limitedStack: number, orderNumber: number)
|
||||
constructor(pageId: number, itemId: number, catalogName: string, costCredits: number, costPoints: number, pointsType: number, amount: number, clubOnly: number, extradata: string, haveOffer: boolean, offerIdGroup: number, limitedStack: number, orderNumber: number, catalogMode: string = 'NORMAL')
|
||||
{
|
||||
this._data = [ pageId, itemId, catalogName, costCredits, costPoints, pointsType, amount, clubOnly, extradata, haveOffer, offerIdGroup, limitedStack, orderNumber ];
|
||||
this._data = [ pageId, itemId, catalogName, costCredits, costPoints, pointsType, amount, clubOnly, extradata, haveOffer, offerIdGroup, limitedStack, orderNumber, catalogMode ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ export class CatalogAdminCreatePageComposer implements IMessageComposer<Construc
|
||||
{
|
||||
private _data: ConstructorParameters<typeof CatalogAdminCreatePageComposer>;
|
||||
|
||||
constructor(caption: string, caption2: string, layout: string, iconType: number, minRank: number, visible: boolean, enabled: boolean, orderNum: number, parentId: number)
|
||||
constructor(caption: string, caption2: string, layout: string, iconType: number, minRank: number, visible: boolean, enabled: boolean, orderNum: number, parentId: number, targetCatalogType: string, catalogMode: string = 'NORMAL')
|
||||
{
|
||||
this._data = [ caption, caption2, layout, iconType, minRank, visible, enabled, orderNum, parentId ];
|
||||
this._data = [ caption, caption2, layout, iconType, minRank, visible, enabled, orderNum, parentId, targetCatalogType, catalogMode ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ export class CatalogAdminDeleteOfferComposer implements IMessageComposer<Constru
|
||||
{
|
||||
private _data: ConstructorParameters<typeof CatalogAdminDeleteOfferComposer>;
|
||||
|
||||
constructor(offerId: number)
|
||||
constructor(offerId: number, catalogMode: string = 'NORMAL')
|
||||
{
|
||||
this._data = [ offerId ];
|
||||
this._data = [ offerId, catalogMode ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ export class CatalogAdminDeletePageComposer implements IMessageComposer<Construc
|
||||
{
|
||||
private _data: ConstructorParameters<typeof CatalogAdminDeletePageComposer>;
|
||||
|
||||
constructor(pageId: number)
|
||||
constructor(pageId: number, catalogMode: string = 'NORMAL')
|
||||
{
|
||||
this._data = [ pageId ];
|
||||
this._data = [ pageId, catalogMode ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ export class CatalogAdminMoveOfferComposer implements IMessageComposer<Construct
|
||||
{
|
||||
private _data: ConstructorParameters<typeof CatalogAdminMoveOfferComposer>;
|
||||
|
||||
constructor(offerId: number, orderNumber: number)
|
||||
constructor(offerId: number, orderNumber: number, catalogMode: string = 'NORMAL')
|
||||
{
|
||||
this._data = [ offerId, orderNumber ];
|
||||
this._data = [ offerId, orderNumber, catalogMode ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ export class CatalogAdminMovePageComposer implements IMessageComposer<Constructo
|
||||
{
|
||||
private _data: ConstructorParameters<typeof CatalogAdminMovePageComposer>;
|
||||
|
||||
constructor(pageId: number, newParentId: number, newIndex: number)
|
||||
constructor(pageId: number, newParentId: number, newIndex: number, catalogMode: string = 'NORMAL')
|
||||
{
|
||||
this._data = [ pageId, newParentId, newIndex ];
|
||||
this._data = [ pageId, newParentId, newIndex, catalogMode ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ export class CatalogAdminSaveOfferComposer implements IMessageComposer<Construct
|
||||
{
|
||||
private _data: ConstructorParameters<typeof CatalogAdminSaveOfferComposer>;
|
||||
|
||||
constructor(offerId: number, pageId: number, itemId: number, catalogName: string, costCredits: number, costPoints: number, pointsType: number, amount: number, clubOnly: number, extradata: string, haveOffer: boolean, offerIdGroup: number, limitedStack: number, orderNumber: number)
|
||||
constructor(offerId: number, pageId: number, itemId: number, catalogName: string, costCredits: number, costPoints: number, pointsType: number, amount: number, clubOnly: number, extradata: string, haveOffer: boolean, offerIdGroup: number, limitedStack: number, orderNumber: number, catalogMode: string = 'NORMAL')
|
||||
{
|
||||
this._data = [ offerId, pageId, itemId, catalogName, costCredits, costPoints, pointsType, amount, clubOnly, extradata, haveOffer, offerIdGroup, limitedStack, orderNumber ];
|
||||
this._data = [ offerId, pageId, itemId, catalogName, costCredits, costPoints, pointsType, amount, clubOnly, extradata, haveOffer, offerIdGroup, limitedStack, orderNumber, catalogMode ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ export class CatalogAdminSavePageComposer implements IMessageComposer<Constructo
|
||||
{
|
||||
private _data: ConstructorParameters<typeof CatalogAdminSavePageComposer>;
|
||||
|
||||
constructor(pageId: number, caption: string, caption2: string, layout: string, iconType: number, minRank: number, visible: boolean, enabled: boolean, orderNum: number, parentId: number, headline: string, teaser: string, textDetails: string)
|
||||
constructor(pageId: number, caption: string, caption2: string, layout: string, iconType: number, minRank: number, visible: boolean, enabled: boolean, orderNum: number, parentId: number, headline: string, teaser: string, textDetails: string, targetCatalogType: string, catalogMode: string = 'NORMAL')
|
||||
{
|
||||
this._data = [ pageId, caption, caption2, layout, iconType, minRank, visible, enabled, orderNum, parentId, headline, teaser, textDetails ];
|
||||
this._data = [ pageId, caption, caption2, layout, iconType, minRank, visible, enabled, orderNum, parentId, headline, teaser, textDetails, targetCatalogType, catalogMode ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
|
||||
@@ -55,6 +55,7 @@ export * from './room/furniture/presents';
|
||||
export * from './room/furniture/toner';
|
||||
export * from './room/furniture/wall';
|
||||
export * from './room/furniture/youtube';
|
||||
export * from './room/youtube';
|
||||
export * from './room/layout';
|
||||
export * from './room/pets';
|
||||
export * from './room/session';
|
||||
|
||||
@@ -17,4 +17,3 @@ export * from './RedeemItemClothingComposer';
|
||||
export * from './session';
|
||||
export * from './unit';
|
||||
export * from './unit/chat';
|
||||
export * from './youtube';
|
||||
|
||||
-2
@@ -6,8 +6,6 @@ export class YouTubeRoomWatchingComposer implements IMessageComposer<any[]>
|
||||
|
||||
constructor(watching: boolean)
|
||||
{
|
||||
// Send as int (0/1) instead of bare boolean to avoid
|
||||
// serialization ambiguity in the Nitro wire protocol.
|
||||
this._data = [watching ? 1 : 0];
|
||||
}
|
||||
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class WiredMonitorRequestComposer implements IMessageComposer<ConstructorParameters<typeof WiredMonitorRequestComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof WiredMonitorRequestComposer>;
|
||||
|
||||
constructor(action: number = 0)
|
||||
{
|
||||
this._data = [ action ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class WiredRoomSettingsRequestComposer implements IMessageComposer<ConstructorParameters<typeof WiredRoomSettingsRequestComposer>>
|
||||
{
|
||||
public getMessageArray()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class WiredRoomSettingsSaveComposer implements IMessageComposer<ConstructorParameters<typeof WiredRoomSettingsSaveComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof WiredRoomSettingsSaveComposer>;
|
||||
|
||||
constructor(inspectMask: number, modifyMask: number)
|
||||
{
|
||||
this._data = [ inspectMask, modifyMask ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class WiredUserInspectMoveComposer implements IMessageComposer<ConstructorParameters<typeof WiredUserInspectMoveComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof WiredUserInspectMoveComposer>;
|
||||
|
||||
constructor(roomUnitId: number, x: number, y: number, direction: number)
|
||||
{
|
||||
this._data = [ roomUnitId, x, y, direction ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class WiredUserVariableManageComposer implements IMessageComposer<ConstructorParameters<typeof WiredUserVariableManageComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof WiredUserVariableManageComposer>;
|
||||
|
||||
constructor(action: number, targetType: number, targetId: number, variableItemId: number, value: number)
|
||||
{
|
||||
this._data = [ action, targetType, targetId, variableItemId, value ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class WiredUserVariableUpdateComposer implements IMessageComposer<ConstructorParameters<typeof WiredUserVariableUpdateComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof WiredUserVariableUpdateComposer>;
|
||||
|
||||
constructor(targetType: number, targetId: number, variableItemId: number, value: number)
|
||||
{
|
||||
this._data = [ targetType, targetId, variableItemId, value ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class WiredUserVariablesRequestComposer implements IMessageComposer<ConstructorParameters<typeof WiredUserVariablesRequestComposer>>
|
||||
{
|
||||
public getMessageArray()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -4,3 +4,10 @@ export * from './RoomMuteComposer';
|
||||
export * from './UpdateActionMessageComposer';
|
||||
export * from './UpdateConditionMessageComposer';
|
||||
export * from './UpdateTriggerMessageComposer';
|
||||
export * from './WiredMonitorRequestComposer';
|
||||
export * from './WiredRoomSettingsRequestComposer';
|
||||
export * from './WiredRoomSettingsSaveComposer';
|
||||
export * from './WiredUserInspectMoveComposer';
|
||||
export * from './WiredUserVariableManageComposer';
|
||||
export * from './WiredUserVariablesRequestComposer';
|
||||
export * from './WiredUserVariableUpdateComposer';
|
||||
|
||||
+20
@@ -6,6 +6,8 @@ export class BuildersClubSubscriptionStatusMessageParser implements IMessagePars
|
||||
private _furniLimit: number;
|
||||
private _maxFurniLimit: number;
|
||||
private _secondsLeftWithGrace: number;
|
||||
private _placementBlockedByVisitors: boolean;
|
||||
private _placementAllowedInCurrentRoom: boolean;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -13,6 +15,8 @@ export class BuildersClubSubscriptionStatusMessageParser implements IMessagePars
|
||||
this._furniLimit = 0;
|
||||
this._maxFurniLimit = 0;
|
||||
this._secondsLeftWithGrace = 0;
|
||||
this._placementBlockedByVisitors = false;
|
||||
this._placementAllowedInCurrentRoom = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -28,6 +32,12 @@ export class BuildersClubSubscriptionStatusMessageParser implements IMessagePars
|
||||
if(wrapper.bytesAvailable) this._secondsLeftWithGrace = wrapper.readInt();
|
||||
else this._secondsLeftWithGrace = this._secondsLeft;
|
||||
|
||||
if(wrapper.bytesAvailable) this._placementBlockedByVisitors = wrapper.readBoolean();
|
||||
else this._placementBlockedByVisitors = false;
|
||||
|
||||
if(wrapper.bytesAvailable) this._placementAllowedInCurrentRoom = wrapper.readBoolean();
|
||||
else this._placementAllowedInCurrentRoom = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -50,4 +60,14 @@ export class BuildersClubSubscriptionStatusMessageParser implements IMessagePars
|
||||
{
|
||||
return this._secondsLeftWithGrace;
|
||||
}
|
||||
|
||||
public get placementBlockedByVisitors(): boolean
|
||||
{
|
||||
return this._placementBlockedByVisitors;
|
||||
}
|
||||
|
||||
public get placementAllowedInCurrentRoom(): boolean
|
||||
{
|
||||
return this._placementAllowedInCurrentRoom;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,12 @@ import { ClubOfferData } from './ClubOfferData';
|
||||
export class HabboClubOffersMessageParser implements IMessageParser
|
||||
{
|
||||
private _offers: ClubOfferData[];
|
||||
private _windowId = 1;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._offers = [];
|
||||
this._windowId = 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -25,6 +27,8 @@ export class HabboClubOffersMessageParser implements IMessageParser
|
||||
totalOffers--;
|
||||
}
|
||||
|
||||
if(wrapper.bytesAvailable) this._windowId = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -32,4 +36,9 @@ export class HabboClubOffersMessageParser implements IMessageParser
|
||||
{
|
||||
return this._offers;
|
||||
}
|
||||
|
||||
public get windowId(): number
|
||||
{
|
||||
return this._windowId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ export * from './room/furniture';
|
||||
export * from './room/furniture/floor';
|
||||
export * from './room/furniture/wall';
|
||||
export * from './room/furniture/youtube';
|
||||
export * from './room/youtube';
|
||||
export * from './room/mapping';
|
||||
export * from './room/pet';
|
||||
export * from './room/session';
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export class BadgeReceivedParser implements IMessageParser
|
||||
{
|
||||
private _badgeId: number;
|
||||
private _badgeCode: string;
|
||||
private _senderName: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._badgeId = 0;
|
||||
this._badgeCode = null;
|
||||
this._senderName = '';
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -21,10 +19,6 @@ export class BadgeReceivedParser implements IMessageParser
|
||||
|
||||
this._badgeId = wrapper.readInt();
|
||||
this._badgeCode = wrapper.readString();
|
||||
// Extra field appended by the Arcturus-Nitro fork: sender username for
|
||||
// badges awarded by a staff member via the `:badge` command. Read
|
||||
// defensively so older servers that don't send it still parse cleanly.
|
||||
this._senderName = wrapper.bytesAvailable ? wrapper.readString() : '';
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -38,9 +32,4 @@ export class BadgeReceivedParser implements IMessageParser
|
||||
{
|
||||
return this._badgeCode;
|
||||
}
|
||||
|
||||
public get senderName(): string
|
||||
{
|
||||
return this._senderName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ export class AreaHideMessageData
|
||||
private _width: number;
|
||||
private _length: number;
|
||||
private _invert: boolean;
|
||||
private _wallItems: boolean;
|
||||
private _invisibility: boolean;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
@@ -19,6 +21,8 @@ export class AreaHideMessageData
|
||||
this._width = wrapper.readInt();
|
||||
this._length = wrapper.readInt();
|
||||
this._invert = wrapper.readBoolean();
|
||||
this._wallItems = wrapper.readBoolean();
|
||||
this._invisibility = wrapper.readBoolean();
|
||||
}
|
||||
|
||||
public get furniId(): number
|
||||
@@ -55,4 +59,14 @@ export class AreaHideMessageData
|
||||
{
|
||||
return this._invert;
|
||||
}
|
||||
|
||||
public get wallItems(): boolean
|
||||
{
|
||||
return this._wallItems;
|
||||
}
|
||||
|
||||
public get invisibility(): boolean
|
||||
{
|
||||
return this._invisibility;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import { IMessageDataWrapper } from '@nitrots/api';
|
||||
|
||||
export class ConfInvisStateMessageData
|
||||
{
|
||||
private _roomId: number;
|
||||
private _active: boolean;
|
||||
private _hiddenItemIds: number[];
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._roomId = wrapper.readInt();
|
||||
this._active = wrapper.readBoolean();
|
||||
|
||||
const totalHiddenItems = wrapper.readInt();
|
||||
|
||||
this._hiddenItemIds = [];
|
||||
|
||||
for(let index = 0; index < totalHiddenItems; index++)
|
||||
{
|
||||
this._hiddenItemIds.push(wrapper.readInt());
|
||||
}
|
||||
}
|
||||
|
||||
public get roomId(): number
|
||||
{
|
||||
return this._roomId;
|
||||
}
|
||||
|
||||
public get hiddenItemIds(): number[]
|
||||
{
|
||||
return this._hiddenItemIds;
|
||||
}
|
||||
|
||||
public get active(): boolean
|
||||
{
|
||||
return this._active;
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
import { IMessageDataWrapper } from '@nitrots/api';
|
||||
|
||||
export class HanditemBlockStateMessageData
|
||||
{
|
||||
private _roomId: number;
|
||||
private _blocked: boolean;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._roomId = wrapper.readInt();
|
||||
this._blocked = wrapper.readBoolean();
|
||||
}
|
||||
|
||||
public get roomId(): number
|
||||
{
|
||||
return this._roomId;
|
||||
}
|
||||
|
||||
public get blocked(): boolean
|
||||
{
|
||||
return this._blocked;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
export * from './AreaHideMessageData';
|
||||
export * from './ConfInvisStateMessageData';
|
||||
export * from './HanditemBlockStateMessageData';
|
||||
export * from './FavoriteMembershipUpdateMessageParser';
|
||||
export * from './ObjectData';
|
||||
export * from './ObjectsDataUpdateParser';
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
import { ConfInvisStateMessageData } from '../engine';
|
||||
|
||||
export class ConfInvisStateMessageParser implements IMessageParser
|
||||
{
|
||||
private _stateData: ConfInvisStateMessageData;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._stateData = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._stateData = new ConfInvisStateMessageData(wrapper);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get stateData(): ConfInvisStateMessageData
|
||||
{
|
||||
return this._stateData;
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
import { HanditemBlockStateMessageData } from '../engine';
|
||||
|
||||
export class HanditemBlockStateMessageParser implements IMessageParser
|
||||
{
|
||||
private _stateData: HanditemBlockStateMessageData;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._stateData = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._stateData = new HanditemBlockStateMessageData(wrapper);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get stateData(): HanditemBlockStateMessageData
|
||||
{
|
||||
return this._stateData;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from './AreaHideMessageParser';
|
||||
export * from './ConfInvisStateMessageParser';
|
||||
export * from './CustomUserNotificationMessageParser';
|
||||
export * from './DiceValueMessageParser';
|
||||
export * from './FurniRentOrBuyoutOfferMessageParser';
|
||||
@@ -6,6 +7,7 @@ export * from './FurnitureAliasesParser';
|
||||
export * from './FurnitureDataParser';
|
||||
export * from './FurnitureStackHeightParser';
|
||||
export * from './GroupFurniContextMenuInfoMessageParser';
|
||||
export * from './HanditemBlockStateMessageParser';
|
||||
export * from './ItemDataUpdateMessageParser';
|
||||
export * from './LoveLockFurniFinishedParser';
|
||||
export * from './LoveLockFurniFriendConfirmedParser';
|
||||
|
||||
@@ -13,4 +13,3 @@ export * from './pet';
|
||||
export * from './session';
|
||||
export * from './unit';
|
||||
export * from './unit/chat';
|
||||
export * from './youtube';
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export interface IWiredMonitorLogData
|
||||
{
|
||||
amount: number;
|
||||
latestOccurrenceSeconds: number;
|
||||
latestReason: string;
|
||||
latestSourceId: number;
|
||||
latestSourceLabel: string;
|
||||
severity: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface IWiredMonitorHistoryData
|
||||
{
|
||||
occurredAtSeconds: number;
|
||||
reason: string;
|
||||
sourceId: number;
|
||||
sourceLabel: string;
|
||||
severity: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export class WiredMonitorDataParser implements IMessageParser
|
||||
{
|
||||
private _usageCurrentWindow: number;
|
||||
private _usageLimitPerWindow: number;
|
||||
private _isHeavy: boolean;
|
||||
private _delayedEventsPending: number;
|
||||
private _delayedEventsLimit: number;
|
||||
private _averageExecutionMs: number;
|
||||
private _peakExecutionMs: number;
|
||||
private _recursionDepthCurrent: number;
|
||||
private _recursionDepthLimit: number;
|
||||
private _killedRemainingSeconds: number;
|
||||
private _usageWindowMs: number;
|
||||
private _overloadAverageThresholdMs: number;
|
||||
private _overloadPeakThresholdMs: number;
|
||||
private _heavyUsageThresholdPercent: number;
|
||||
private _heavyConsecutiveWindowsThreshold: number;
|
||||
private _overloadConsecutiveWindowsThreshold: number;
|
||||
private _heavyDelayedThresholdPercent: number;
|
||||
private _logs: IWiredMonitorLogData[];
|
||||
private _history: IWiredMonitorHistoryData[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._usageCurrentWindow = 0;
|
||||
this._usageLimitPerWindow = 0;
|
||||
this._isHeavy = false;
|
||||
this._delayedEventsPending = 0;
|
||||
this._delayedEventsLimit = 0;
|
||||
this._averageExecutionMs = 0;
|
||||
this._peakExecutionMs = 0;
|
||||
this._recursionDepthCurrent = 0;
|
||||
this._recursionDepthLimit = 0;
|
||||
this._killedRemainingSeconds = 0;
|
||||
this._usageWindowMs = 0;
|
||||
this._overloadAverageThresholdMs = 0;
|
||||
this._overloadPeakThresholdMs = 0;
|
||||
this._heavyUsageThresholdPercent = 0;
|
||||
this._heavyConsecutiveWindowsThreshold = 0;
|
||||
this._overloadConsecutiveWindowsThreshold = 0;
|
||||
this._heavyDelayedThresholdPercent = 0;
|
||||
this._logs = [];
|
||||
this._history = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._usageCurrentWindow = wrapper.readInt();
|
||||
this._usageLimitPerWindow = wrapper.readInt();
|
||||
this._isHeavy = wrapper.readBoolean();
|
||||
this._delayedEventsPending = wrapper.readInt();
|
||||
this._delayedEventsLimit = wrapper.readInt();
|
||||
this._averageExecutionMs = wrapper.readInt();
|
||||
this._peakExecutionMs = wrapper.readInt();
|
||||
this._recursionDepthCurrent = wrapper.readInt();
|
||||
this._recursionDepthLimit = wrapper.readInt();
|
||||
this._killedRemainingSeconds = wrapper.readInt();
|
||||
this._usageWindowMs = wrapper.readInt();
|
||||
this._overloadAverageThresholdMs = wrapper.readInt();
|
||||
this._overloadPeakThresholdMs = wrapper.readInt();
|
||||
this._heavyUsageThresholdPercent = wrapper.readInt();
|
||||
this._heavyConsecutiveWindowsThreshold = wrapper.readInt();
|
||||
this._overloadConsecutiveWindowsThreshold = wrapper.readInt();
|
||||
this._heavyDelayedThresholdPercent = wrapper.readInt();
|
||||
|
||||
const totalLogs = wrapper.readInt();
|
||||
|
||||
this._logs = [];
|
||||
this._history = [];
|
||||
|
||||
for(let i = 0; i < totalLogs; i++)
|
||||
{
|
||||
this._logs.push({
|
||||
type: wrapper.readString(),
|
||||
severity: wrapper.readString(),
|
||||
amount: wrapper.readInt(),
|
||||
latestOccurrenceSeconds: wrapper.readInt(),
|
||||
latestReason: wrapper.readString(),
|
||||
latestSourceLabel: wrapper.readString(),
|
||||
latestSourceId: wrapper.readInt()
|
||||
});
|
||||
}
|
||||
|
||||
const totalHistory = wrapper.readInt();
|
||||
|
||||
for(let i = 0; i < totalHistory; i++)
|
||||
{
|
||||
this._history.push({
|
||||
type: wrapper.readString(),
|
||||
severity: wrapper.readString(),
|
||||
occurredAtSeconds: wrapper.readInt(),
|
||||
reason: wrapper.readString(),
|
||||
sourceLabel: wrapper.readString(),
|
||||
sourceId: wrapper.readInt()
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get usageCurrentWindow(): number
|
||||
{
|
||||
return this._usageCurrentWindow;
|
||||
}
|
||||
|
||||
public get usageLimitPerWindow(): number
|
||||
{
|
||||
return this._usageLimitPerWindow;
|
||||
}
|
||||
|
||||
public get isHeavy(): boolean
|
||||
{
|
||||
return this._isHeavy;
|
||||
}
|
||||
|
||||
public get delayedEventsPending(): number
|
||||
{
|
||||
return this._delayedEventsPending;
|
||||
}
|
||||
|
||||
public get delayedEventsLimit(): number
|
||||
{
|
||||
return this._delayedEventsLimit;
|
||||
}
|
||||
|
||||
public get averageExecutionMs(): number
|
||||
{
|
||||
return this._averageExecutionMs;
|
||||
}
|
||||
|
||||
public get peakExecutionMs(): number
|
||||
{
|
||||
return this._peakExecutionMs;
|
||||
}
|
||||
|
||||
public get recursionDepthCurrent(): number
|
||||
{
|
||||
return this._recursionDepthCurrent;
|
||||
}
|
||||
|
||||
public get recursionDepthLimit(): number
|
||||
{
|
||||
return this._recursionDepthLimit;
|
||||
}
|
||||
|
||||
public get killedRemainingSeconds(): number
|
||||
{
|
||||
return this._killedRemainingSeconds;
|
||||
}
|
||||
|
||||
public get usageWindowMs(): number
|
||||
{
|
||||
return this._usageWindowMs;
|
||||
}
|
||||
|
||||
public get overloadAverageThresholdMs(): number
|
||||
{
|
||||
return this._overloadAverageThresholdMs;
|
||||
}
|
||||
|
||||
public get overloadPeakThresholdMs(): number
|
||||
{
|
||||
return this._overloadPeakThresholdMs;
|
||||
}
|
||||
|
||||
public get heavyUsageThresholdPercent(): number
|
||||
{
|
||||
return this._heavyUsageThresholdPercent;
|
||||
}
|
||||
|
||||
public get heavyConsecutiveWindowsThreshold(): number
|
||||
{
|
||||
return this._heavyConsecutiveWindowsThreshold;
|
||||
}
|
||||
|
||||
public get overloadConsecutiveWindowsThreshold(): number
|
||||
{
|
||||
return this._overloadConsecutiveWindowsThreshold;
|
||||
}
|
||||
|
||||
public get heavyDelayedThresholdPercent(): number
|
||||
{
|
||||
return this._heavyDelayedThresholdPercent;
|
||||
}
|
||||
|
||||
public get logs(): IWiredMonitorLogData[]
|
||||
{
|
||||
return this._logs;
|
||||
}
|
||||
|
||||
public get history(): IWiredMonitorHistoryData[]
|
||||
{
|
||||
return this._history;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export class WiredRoomSettingsDataParser implements IMessageParser
|
||||
{
|
||||
private _roomId: number;
|
||||
private _inspectMask: number;
|
||||
private _modifyMask: number;
|
||||
private _canInspect: boolean;
|
||||
private _canModify: boolean;
|
||||
private _canManageSettings: boolean;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._roomId = 0;
|
||||
this._inspectMask = 0;
|
||||
this._modifyMask = 0;
|
||||
this._canInspect = false;
|
||||
this._canModify = false;
|
||||
this._canManageSettings = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._roomId = wrapper.readInt();
|
||||
this._inspectMask = wrapper.readInt();
|
||||
this._modifyMask = wrapper.readInt();
|
||||
this._canInspect = wrapper.readBoolean();
|
||||
this._canModify = wrapper.readBoolean();
|
||||
this._canManageSettings = wrapper.readBoolean();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get roomId(): number
|
||||
{
|
||||
return this._roomId;
|
||||
}
|
||||
|
||||
public get inspectMask(): number
|
||||
{
|
||||
return this._inspectMask;
|
||||
}
|
||||
|
||||
public get modifyMask(): number
|
||||
{
|
||||
return this._modifyMask;
|
||||
}
|
||||
|
||||
public get canInspect(): boolean
|
||||
{
|
||||
return this._canInspect;
|
||||
}
|
||||
|
||||
public get canModify(): boolean
|
||||
{
|
||||
return this._canModify;
|
||||
}
|
||||
|
||||
public get canManageSettings(): boolean
|
||||
{
|
||||
return this._canManageSettings;
|
||||
}
|
||||
}
|
||||
+301
@@ -0,0 +1,301 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export interface IWiredUserVariableDefinitionData
|
||||
{
|
||||
availability: number;
|
||||
hasValue: boolean;
|
||||
isReadOnly: boolean;
|
||||
isTextConnected: boolean;
|
||||
itemId: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IWiredUserVariableAssignmentData
|
||||
{
|
||||
createdAt: number;
|
||||
hasValue: boolean;
|
||||
updatedAt: number;
|
||||
value: number | null;
|
||||
variableItemId: number;
|
||||
}
|
||||
|
||||
export interface IWiredUserVariablesUserData
|
||||
{
|
||||
assignments: IWiredUserVariableAssignmentData[];
|
||||
userId: number;
|
||||
}
|
||||
|
||||
export interface IWiredFurniVariableDefinitionData
|
||||
{
|
||||
availability: number;
|
||||
hasValue: boolean;
|
||||
isReadOnly: boolean;
|
||||
isTextConnected: boolean;
|
||||
itemId: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IWiredUserVariablesFurniData
|
||||
{
|
||||
assignments: IWiredUserVariableAssignmentData[];
|
||||
furniId: number;
|
||||
}
|
||||
|
||||
export interface IWiredRoomVariableDefinitionData
|
||||
{
|
||||
availability: number;
|
||||
hasValue: boolean;
|
||||
isReadOnly: boolean;
|
||||
isTextConnected: boolean;
|
||||
itemId: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IWiredRoomVariableAssignmentData
|
||||
{
|
||||
createdAt: number;
|
||||
hasValue: boolean;
|
||||
updatedAt: number;
|
||||
value: number | null;
|
||||
variableItemId: number;
|
||||
}
|
||||
|
||||
export interface IWiredContextVariableDefinitionData
|
||||
{
|
||||
availability: number;
|
||||
hasValue: boolean;
|
||||
isReadOnly: boolean;
|
||||
isTextConnected: boolean;
|
||||
itemId: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export class WiredUserVariablesDataParser implements IMessageParser
|
||||
{
|
||||
private _roomId: number;
|
||||
private _definitions: IWiredUserVariableDefinitionData[];
|
||||
private _users: IWiredUserVariablesUserData[];
|
||||
private _furniDefinitions: IWiredFurniVariableDefinitionData[];
|
||||
private _furnis: IWiredUserVariablesFurniData[];
|
||||
private _roomDefinitions: IWiredRoomVariableDefinitionData[];
|
||||
private _roomAssignments: IWiredRoomVariableAssignmentData[];
|
||||
private _contextDefinitions: IWiredContextVariableDefinitionData[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._roomId = 0;
|
||||
this._definitions = [];
|
||||
this._users = [];
|
||||
this._furniDefinitions = [];
|
||||
this._furnis = [];
|
||||
this._roomDefinitions = [];
|
||||
this._roomAssignments = [];
|
||||
this._contextDefinitions = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._roomId = wrapper.readInt();
|
||||
|
||||
let totalDefinitions = wrapper.readInt();
|
||||
|
||||
this._definitions = [];
|
||||
this._users = [];
|
||||
this._furniDefinitions = [];
|
||||
this._furnis = [];
|
||||
this._roomDefinitions = [];
|
||||
this._roomAssignments = [];
|
||||
this._contextDefinitions = [];
|
||||
|
||||
while(totalDefinitions > 0)
|
||||
{
|
||||
this._definitions.push({
|
||||
itemId: wrapper.readInt(),
|
||||
name: wrapper.readString(),
|
||||
hasValue: wrapper.readBoolean(),
|
||||
availability: wrapper.readInt(),
|
||||
isTextConnected: wrapper.readBoolean(),
|
||||
isReadOnly: wrapper.readBoolean()
|
||||
});
|
||||
|
||||
totalDefinitions--;
|
||||
}
|
||||
|
||||
let totalUsers = wrapper.readInt();
|
||||
|
||||
while(totalUsers > 0)
|
||||
{
|
||||
const userId = wrapper.readInt();
|
||||
let totalAssignments = wrapper.readInt();
|
||||
const assignments: IWiredUserVariableAssignmentData[] = [];
|
||||
|
||||
while(totalAssignments > 0)
|
||||
{
|
||||
const variableItemId = wrapper.readInt();
|
||||
const hasValue = wrapper.readBoolean();
|
||||
const rawValue = wrapper.readInt();
|
||||
const createdAt = wrapper.readInt();
|
||||
const updatedAt = wrapper.readInt();
|
||||
|
||||
assignments.push({
|
||||
variableItemId,
|
||||
hasValue,
|
||||
value: (hasValue ? rawValue : null),
|
||||
createdAt,
|
||||
updatedAt
|
||||
});
|
||||
|
||||
totalAssignments--;
|
||||
}
|
||||
|
||||
this._users.push({ userId, assignments });
|
||||
totalUsers--;
|
||||
}
|
||||
|
||||
let totalFurniDefinitions = wrapper.readInt();
|
||||
|
||||
while(totalFurniDefinitions > 0)
|
||||
{
|
||||
this._furniDefinitions.push({
|
||||
itemId: wrapper.readInt(),
|
||||
name: wrapper.readString(),
|
||||
hasValue: wrapper.readBoolean(),
|
||||
availability: wrapper.readInt(),
|
||||
isTextConnected: wrapper.readBoolean(),
|
||||
isReadOnly: wrapper.readBoolean()
|
||||
});
|
||||
|
||||
totalFurniDefinitions--;
|
||||
}
|
||||
|
||||
let totalFurnis = wrapper.readInt();
|
||||
|
||||
while(totalFurnis > 0)
|
||||
{
|
||||
const furniId = wrapper.readInt();
|
||||
let totalAssignments = wrapper.readInt();
|
||||
const assignments: IWiredUserVariableAssignmentData[] = [];
|
||||
|
||||
while(totalAssignments > 0)
|
||||
{
|
||||
const variableItemId = wrapper.readInt();
|
||||
const hasValue = wrapper.readBoolean();
|
||||
const rawValue = wrapper.readInt();
|
||||
const createdAt = wrapper.readInt();
|
||||
const updatedAt = wrapper.readInt();
|
||||
|
||||
assignments.push({
|
||||
variableItemId,
|
||||
hasValue,
|
||||
value: (hasValue ? rawValue : null),
|
||||
createdAt,
|
||||
updatedAt
|
||||
});
|
||||
|
||||
totalAssignments--;
|
||||
}
|
||||
|
||||
this._furnis.push({ furniId, assignments });
|
||||
totalFurnis--;
|
||||
}
|
||||
|
||||
let totalRoomDefinitions = wrapper.readInt();
|
||||
|
||||
while(totalRoomDefinitions > 0)
|
||||
{
|
||||
this._roomDefinitions.push({
|
||||
itemId: wrapper.readInt(),
|
||||
name: wrapper.readString(),
|
||||
hasValue: wrapper.readBoolean(),
|
||||
availability: wrapper.readInt(),
|
||||
isTextConnected: wrapper.readBoolean(),
|
||||
isReadOnly: wrapper.readBoolean()
|
||||
});
|
||||
|
||||
totalRoomDefinitions--;
|
||||
}
|
||||
|
||||
let totalRoomAssignments = wrapper.readInt();
|
||||
|
||||
while(totalRoomAssignments > 0)
|
||||
{
|
||||
const variableItemId = wrapper.readInt();
|
||||
const hasValue = wrapper.readBoolean();
|
||||
const rawValue = wrapper.readInt();
|
||||
const createdAt = wrapper.readInt();
|
||||
const updatedAt = wrapper.readInt();
|
||||
|
||||
this._roomAssignments.push({
|
||||
variableItemId,
|
||||
hasValue,
|
||||
value: (hasValue ? rawValue : null),
|
||||
createdAt,
|
||||
updatedAt
|
||||
});
|
||||
|
||||
totalRoomAssignments--;
|
||||
}
|
||||
|
||||
let totalContextDefinitions = wrapper.readInt();
|
||||
|
||||
while(totalContextDefinitions > 0)
|
||||
{
|
||||
this._contextDefinitions.push({
|
||||
itemId: wrapper.readInt(),
|
||||
name: wrapper.readString(),
|
||||
hasValue: wrapper.readBoolean(),
|
||||
availability: wrapper.readInt(),
|
||||
isTextConnected: wrapper.readBoolean(),
|
||||
isReadOnly: wrapper.readBoolean()
|
||||
});
|
||||
|
||||
totalContextDefinitions--;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get roomId(): number
|
||||
{
|
||||
return this._roomId;
|
||||
}
|
||||
|
||||
public get definitions(): IWiredUserVariableDefinitionData[]
|
||||
{
|
||||
return this._definitions;
|
||||
}
|
||||
|
||||
public get users(): IWiredUserVariablesUserData[]
|
||||
{
|
||||
return this._users;
|
||||
}
|
||||
|
||||
public get furniDefinitions(): IWiredFurniVariableDefinitionData[]
|
||||
{
|
||||
return this._furniDefinitions;
|
||||
}
|
||||
|
||||
public get furnis(): IWiredUserVariablesFurniData[]
|
||||
{
|
||||
return this._furnis;
|
||||
}
|
||||
|
||||
public get roomDefinitions(): IWiredRoomVariableDefinitionData[]
|
||||
{
|
||||
return this._roomDefinitions;
|
||||
}
|
||||
|
||||
public get roomAssignments(): IWiredRoomVariableAssignmentData[]
|
||||
{
|
||||
return this._roomAssignments;
|
||||
}
|
||||
|
||||
public get contextDefinitions(): IWiredContextVariableDefinitionData[]
|
||||
{
|
||||
return this._contextDefinitions;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,10 @@ export * from './WiredActionDefinition';
|
||||
export * from './WiredFurniActionParser';
|
||||
export * from './WiredFurniConditionParser';
|
||||
export * from './WiredFurniTriggerParser';
|
||||
export * from './WiredMonitorDataParser';
|
||||
export * from './WiredRoomSettingsDataParser';
|
||||
export * from './WiredOpenParser';
|
||||
export * from './WiredRewardResultMessageParser';
|
||||
export * from './WiredSaveSuccessParser';
|
||||
export * from './WiredUserVariablesDataParser';
|
||||
export * from './WiredValidationErrorParser';
|
||||
|
||||
Reference in New Issue
Block a user