#28 - ExtendedProfileChangedMessageEvent added

This commit is contained in:
oobjectt 2022-12-25 21:43:02 +01:00
parent 26741b78a7
commit f222bffa43
6 changed files with 48 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -414,4 +414,5 @@ export class IncomingHeader
public static SHOW_ENFORCE_ROOM_CATEGORY = 3896; public static SHOW_ENFORCE_ROOM_CATEGORY = 3896;
public static CUSTOM_USER_NOTIFICATION = 909; public static CUSTOM_USER_NOTIFICATION = 909;
public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575; public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575;
public static EXTENDED_PROFILE_CHANGED = 876;
} }

View File

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

View File

@ -1,6 +1,7 @@
export * from './access'; export * from './access';
export * from './ApproveNameMessageEvent'; export * from './ApproveNameMessageEvent';
export * from './data'; export * from './data';
export * from './ExtendedProfileChangedMessageEvent';
export * from './GuildMembershipsMessageEvent'; export * from './GuildMembershipsMessageEvent';
export * from './HabboGroupBadgesMessageEvent'; export * from './HabboGroupBadgesMessageEvent';
export * from './IgnoredUsersEvent'; export * from './IgnoredUsersEvent';

View File

@ -0,0 +1,27 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
export class ExtendedProfileChangedMessageParser implements IMessageParser
{
private _userId: number;
public flush(): boolean
{
this._userId = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._userId = wrapper.readInt();
return true;
}
public get userId(): number
{
return this._userId;
}
}

View File

@ -1,6 +1,7 @@
export * from './access'; export * from './access';
export * from './ApproveNameResultParser'; export * from './ApproveNameResultParser';
export * from './data'; export * from './data';
export * from './ExtendedProfileChangedMessageParser';
export * from './GuildMembershipsMessageParser'; export * from './GuildMembershipsMessageParser';
export * from './HabboGroupBadgesMessageParser'; export * from './HabboGroupBadgesMessageParser';
export * from './HabboGroupEntryData'; export * from './HabboGroupEntryData';