Merge branch 'rentable-space-status' of https://github.com/oobjectt/nitro-renderer into oobjectt-rentable-space-status

This commit is contained in:
dank074 2023-01-03 02:28:40 -06:00
commit 3597df53c3
6 changed files with 102 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -440,4 +440,5 @@ export class IncomingHeader
public static HANDSHAKE_INIT_DIFFIE = 1347;
public static HANDSHAKE_COMPLETE_DIFFIE = 3885;
public static RENTABLE_SPACE_RENT_OK = 2046;
public static RENTABLE_SPACE_STATUS = 3559;
}

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../../api';
import { MessageEvent } from '../../../../../../events';
import { RentableSpaceStatusMessageParser } from '../../../parser';
export class RentableSpaceStatusMessageEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, RentableSpaceStatusMessageParser);
}
public getParser(): RentableSpaceStatusMessageParser
{
return this.parser as RentableSpaceStatusMessageParser;
}
}

View File

@ -11,6 +11,7 @@ export * from './LoveLockFurniFriendConfirmedEvent';
export * from './LoveLockFurniStartEvent';
export * from './OneWayDoorStatusMessageEvent';
export * from './RentableSpaceRentOkMessageEvent';
export * from './RentableSpaceStatusMessageEvent';
export * from './RequestSpamWallPostItMessageEvent';
export * from './RoomDimmerPresetsMessageEvent';
export * from './RoomMessageNotificationMessageEvent';

View File

@ -0,0 +1,81 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
export class RentableSpaceStatusMessageParser implements IMessageParser
{
private _Str_16670: boolean;
private _renterId: number;
private _Str_18360: string;
private _Str_20575: boolean;
private _Str_16491: number;
private _Str_22009: number;
private _price: number;
public flush(): boolean
{
this._Str_16670 = false;
this._renterId = -1;
this._Str_18360 = null;
this._Str_20575 = false;
this._Str_16491 = -1;
this._Str_22009 = -1;
this._price = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._Str_16670 = wrapper.readBoolean();
this._Str_16491 = wrapper.readInt();
this._Str_20575 = (this._Str_16491 === 0);
this._renterId = wrapper.readInt();
this._Str_18360 = wrapper.readString();
this._Str_22009 = wrapper.readInt();
this._price = wrapper.readInt();
if(!this._Str_16670)
{
this._renterId = -1;
this._Str_18360 = '';
}
return true;
}
public get _Str_22736(): boolean
{
return this._Str_16670;
}
public get renterId(): number
{
return this._renterId;
}
public get _Str_23275(): string
{
return this._Str_18360;
}
public get _Str_23603(): boolean
{
return this._Str_20575;
}
public get price(): number
{
return this._price;
}
public get _Str_24083(): number
{
return this._Str_22009;
}
public get _Str_25070(): number
{
return this._Str_16491;
}
}

View File

@ -11,6 +11,7 @@ export * from './LoveLockFurniFriendConfirmedParser';
export * from './LoveLockFurniStartParser';
export * from './OneWayDoorStatusMessageParser';
export * from './RentableSpaceRentOkMessageParser';
export * from './RentableSpaceStatusMessageParser';
export * from './RequestSpamWallPostItMessageParser';
export * from './RoomDimmerPresetsMessageData';
export * from './RoomDimmerPresetsMessageParser';