Merge branch 'rentable-rent-or-buyout-offr' of https://github.com/oobjectt/nitro-renderer into oobjectt-rentable-rent-or-buyout-offr

This commit is contained in:
dank074 2023-01-12 01:33:21 -06:00
commit b9b58a9b89
6 changed files with 91 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -461,4 +461,5 @@ export class IncomingHeader
public static WEEKLY_COMPETITIVE_FRIENDS_LEADERBOARD = 3560;
public static WEEKLY_GAME2_FRIENDS_LEADERBOARD = 2270;
public static WEEKLY_GAME2_LEADERBOARD = 2196;
public static RENTABLE_FURNI_RENT_OR_BUYOUT_OFFER = 35;
}

View File

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

View File

@ -1,6 +1,7 @@
export * from './CustomUserNotificationMessageEvent';
export * from './DiceValueMessageEvent';
export * from './floor';
export * from './FurniRentOrBuyoutOfferMessageEvent';
export * from './FurnitureAliasesEvent';
export * from './FurnitureDataEvent';
export * from './FurnitureStackHeightEvent';

View File

@ -0,0 +1,67 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
export class FurniRentOrBuyoutOfferMessageParser implements IMessageParser
{
private _isWallItem: boolean;
private _furniTypeName: string;
private _buyout: boolean;
private _priceInCredits: number;
private _priceInActivityPoints: number;
private _activityPointType: number;
public flush(): boolean
{
this._isWallItem = false;
this._furniTypeName = null;
this._buyout = false;
this._priceInCredits = -1;
this._priceInActivityPoints = -1;
this._activityPointType = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._isWallItem = wrapper.readBoolean();
this._furniTypeName = wrapper.readString();
this._buyout = wrapper.readBoolean();
this._priceInCredits = wrapper.readInt();
this._priceInActivityPoints = wrapper.readInt();
this._activityPointType = wrapper.readInt();
return true;
}
public get isWallItem(): boolean
{
return this._isWallItem;
}
public get furniTypeName(): string
{
return this._furniTypeName;
}
public get buyout(): boolean
{
return this._buyout;
}
public get priceInCredits(): number
{
return this._priceInCredits;
}
public get priceInActivityPoints(): number
{
return this._priceInActivityPoints;
}
public get activityPointType(): number
{
return this._activityPointType;
}
}

View File

@ -1,6 +1,7 @@
export * from './CustomUserNotificationMessageParser';
export * from './DiceValueMessageParser';
export * from './floor';
export * from './FurniRentOrBuyoutOfferMessageParser';
export * from './FurnitureAliasesParser';
export * from './FurnitureDataParser';
export * from './FurnitureStackHeightParser';