mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
#28 - ChangeEmailResultEvent added
This commit is contained in:
parent
26741b78a7
commit
e6db149b24
File diff suppressed because one or more lines are too long
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
export * from './access';
|
||||
export * from './ApproveNameMessageEvent';
|
||||
export * from './ChangeEmailResultEvent';
|
||||
export * from './data';
|
||||
export * from './GuildMembershipsMessageEvent';
|
||||
export * from './HabboGroupBadgesMessageEvent';
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
export * from './access';
|
||||
export * from './ApproveNameResultParser';
|
||||
export * from './ChangeEmailResultParser';
|
||||
export * from './data';
|
||||
export * from './GuildMembershipsMessageParser';
|
||||
export * from './HabboGroupBadgesMessageParser';
|
||||
|
Loading…
Reference in New Issue
Block a user