#28 - ChangeEmailResultEvent added

This commit is contained in:
oobjectt 2022-12-25 15:54:28 +01:00
parent 26741b78a7
commit e6db149b24
6 changed files with 52 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 CUSTOM_USER_NOTIFICATION = 909;
public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575;
public static CHANGE_EMAIL_RESULT = 1815;
}

View File

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

View File

@ -1,5 +1,6 @@
export * from './access';
export * from './ApproveNameMessageEvent';
export * from './ChangeEmailResultEvent';
export * from './data';
export * from './GuildMembershipsMessageEvent';
export * from './HabboGroupBadgesMessageEvent';

View File

@ -0,0 +1,29 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
export class ChangeEmailResultParser implements IMessageParser
{
public static readonly EMAIL_STATUS_OK: number = 0;
private _result: number;
public flush(): boolean
{
this._result = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._result = wrapper.readInt();
return true;
}
public get result(): number
{
return this._result;
}
}

View File

@ -1,5 +1,6 @@
export * from './access';
export * from './ApproveNameResultParser';
export * from './ChangeEmailResultParser';
export * from './data';
export * from './GuildMembershipsMessageParser';
export * from './HabboGroupBadgesMessageParser';