feat: add builders club communication support

This commit is contained in:
Lorenzune
2026-04-07 14:40:51 +02:00
parent aacdfe3eae
commit fd40a74396
10 changed files with 45 additions and 16 deletions
@@ -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;
}
}