#28 - WelcomeGiftChangeEmailResultEvent and WelcomeGiftStatusEvent added

This commit is contained in:
oobjectt 2022-12-26 16:16:18 +01:00
parent e70d9cc804
commit dfcf637d95
10 changed files with 129 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -429,4 +429,6 @@ export class IncomingHeader
public static PHONE_COLLECTION_STATE = 2890;
public static PHONE_TRY_NUMBER_RESULT = 800;
public static PHONE_TRY_VERIFICATION_CODE_RESULT = 91;
public static WELCOME_GIFT_CHANGE_EMAIL_RESULT = 2293;
public static WELCOME_GIFT_STATUS = 2707;
}

View File

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

View File

@ -14,4 +14,5 @@ export * from './RequestSpamWallPostItMessageEvent';
export * from './RoomDimmerPresetsMessageEvent';
export * from './RoomMessageNotificationMessageEvent';
export * from './wall';
export * from './WelcomeGiftStatusEvent';
export * from './youtube';

View File

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

View File

@ -21,3 +21,4 @@ export * from './PetSupplementedNotificationEvent';
export * from './RespectReceivedEvent';
export * from './ScrSendKickbackInfoMessageEvent';
export * from './wardrobe';
export * from './WelcomeGiftChangeEmailResultEvent';

View File

@ -0,0 +1,59 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
export class WelcomeGiftStatusParser implements IMessageParser
{
private _email: string;
private _isVerified: boolean;
private _allowChange: boolean;
private _furniId: number;
private _Str_10840: boolean;
public flush(): boolean
{
this._email = null;
this._isVerified = false;
this._allowChange = false;
this._furniId = -1;
this._Str_10840 = false;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._email = wrapper.readString();
this._isVerified = wrapper.readBoolean();
this._allowChange = wrapper.readBoolean();
this._furniId = wrapper.readInt();
this._Str_10840 = wrapper.readBoolean();
return true;
}
public get email(): string
{
return this._email;
}
public get isVerified(): boolean
{
return this._isVerified;
}
public get allowChange(): boolean
{
return this._allowChange;
}
public get furniId(): number
{
return this._furniId;
}
public get Str_10840(): boolean
{
return this._Str_10840;
}
}

View File

@ -15,4 +15,5 @@ export * from './RoomDimmerPresetsMessageData';
export * from './RoomDimmerPresetsMessageParser';
export * from './RoomMessageNotificationMessageParser';
export * from './wall';
export * from './WelcomeGiftStatusParser';
export * from './youtube';

View File

@ -0,0 +1,27 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
export class WelcomeGiftChangeEmailResultParser implements IMessageParser
{
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

@ -24,3 +24,4 @@ export * from './RoomEntryData';
export * from './ScrKickbackData';
export * from './ScrSendKickbackInfoMessageParser';
export * from './wardrobe';
export * from './WelcomeGiftChangeEmailResultParser';