#28 - FireworkChargeDataEvent added (#38)

Co-authored-by: Bill <billsonnn@users.noreply.github.com>
This commit is contained in:
object 2023-04-30 01:43:51 +02:00 committed by GitHub
parent ef7cef6056
commit 7ac70f4ef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 103 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -442,6 +442,7 @@ export class IncomingHeader
public static SHOW_ENFORCE_ROOM_CATEGORY = 3896;
public static CUSTOM_USER_NOTIFICATION = 909;
public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575;
public static FIREWORK_CHARGE_DATA = 5210;
public static NEW_USER_EXPERIENCE_NOT_COMPLETE = 3639;
public static CONNECTION_ERROR = 1004;
public static ACCOUNT_SAFETY_LOCK_STATUS_CHANGE = 1243;

View File

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

View File

@ -10,6 +10,7 @@ export * from './CatalogPublishedMessageEvent';
export * from './ClubGiftInfoEvent';
export * from './ClubGiftSelectedEvent';
export * from './DirectSMSClubBuyAvailableMessageEvent';
export * from './FireworkChargeDataEvent';
export * from './GiftReceiverNotFoundEvent';
export * from './GiftWrappingConfigurationEvent';
export * from './HabboClubExtendOfferMessageEvent';

View File

@ -0,0 +1,51 @@
import { IMessageDataWrapper } from '../../../../../api';
export class FireworkChargeData
{
private _stuffId: number;
private _charges: number;
private _SafeStr_6935: number;
private _SafeStr_6936: number;
private _SafeStr_6518: number;
private _SafeStr_7875: number;
constructor(wrapper: IMessageDataWrapper)
{
this._stuffId = wrapper.readInt();
this._charges = wrapper.readInt();
this._SafeStr_6935 = wrapper.readInt();
this._SafeStr_6936 = wrapper.readInt();
this._SafeStr_6518 = wrapper.readInt();
this._SafeStr_7875 = wrapper.readInt();
}
public get stuffId(): number
{
return this._stuffId;
}
public get charges(): number
{
return this._charges;
}
public get _SafeStr_5946(): number
{
return this._SafeStr_6935;
}
public get _SafeStr_5944(): number
{
return this._SafeStr_6936;
}
public get _SafeStr_7876(): number
{
return this._SafeStr_7875;
}
public get _SafeStr_5945(): number
{
return this._SafeStr_6518;
}
}

View File

@ -0,0 +1,28 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
import { FireworkChargeData } from './FireworkChargeData';
export class FireworkChargeDataParser implements IMessageParser
{
private _fireworkChargeData: FireworkChargeData;
public flush(): boolean
{
this._fireworkChargeData = null;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._fireworkChargeData = new FireworkChargeData(wrapper);
return true;
}
public get fireworkChargeData(): FireworkChargeData
{
return this._fireworkChargeData;
}
}

View File

@ -17,6 +17,8 @@ export * from './ClubGiftSelectedParser';
export * from './ClubOfferData';
export * from './ClubOfferExtendData';
export * from './DirectSMSClubBuyAvailableMessageParser';
export * from './FireworkChargeData';
export * from './FireworkChargeDataParser';
export * from './FrontPageItem';
export * from './GiftReceiverNotFoundParser';
export * from './GiftWrappingConfigurationParser';