Merge branch 'oobjectt-phone-collection-tryphone-tryverifiaction'

This commit is contained in:
dank074 2022-12-26 01:38:46 -06:00
commit e70d9cc804
12 changed files with 173 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -426,4 +426,7 @@ export class IncomingHeader
public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575;
public static CONNECTION_ERROR = 1004;
public static ACCOUNT_SAFETY_LOCK_STATUS_CHANGE = 1243;
public static PHONE_COLLECTION_STATE = 2890;
public static PHONE_TRY_NUMBER_RESULT = 800;
public static PHONE_TRY_VERIFICATION_CODE_RESULT = 91;
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,3 @@
export * from './PhoneCollectionStateMessageEvent';
export * from './TryPhoneNumberResultMessageEvent';
export * from './TryVerificationCodeResultMessageEvent';

View File

@ -15,6 +15,7 @@ export * from './game';
export * from './game/directory';
export * from './game/lobby';
export * from './generic';
export * from './gifts';
export * from './group';
export * from './groupforums';
export * from './handshake';

View File

@ -0,0 +1,41 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
export class PhoneCollectionStateParser implements IMessageParser
{
private _phoneStatusCode: number;
private _collectionStatusCode: number;
private _millisecondsToAllowProcessReset: number;
public flush(): boolean
{
this._phoneStatusCode = -1;
this._millisecondsToAllowProcessReset = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._phoneStatusCode = wrapper.readInt();
this._collectionStatusCode = wrapper.readInt();
this._millisecondsToAllowProcessReset = wrapper.readInt();
return true;
}
public get phoneStatusCode(): number
{
return this._phoneStatusCode;
}
public get collectionStatusCode(): number
{
return this._collectionStatusCode;
}
public get millisecondsToAllowProcessReset(): number
{
return this._millisecondsToAllowProcessReset;
}
}

View File

@ -0,0 +1,33 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
export class TryPhoneNumberResultParser implements IMessageParser
{
private _resultCode: number;
private _millisToAllowProcessReset: number;
public flush(): boolean
{
this._resultCode = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._resultCode = wrapper.readInt();
this._millisToAllowProcessReset = wrapper.readInt();
return true;
}
public get resultCode(): number
{
return this._resultCode;
}
public get millisToAllowProcessReset(): number
{
return this._millisToAllowProcessReset;
}
}

View File

@ -0,0 +1,34 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
export class TryVerificationCodeResultParser implements IMessageParser
{
private _resultCode: number;
private _millisecondsToAllowProcessReset: number;
public flush(): boolean
{
this._resultCode = -1;
this._millisecondsToAllowProcessReset = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._resultCode = wrapper.readInt();
this._millisecondsToAllowProcessReset = wrapper.readInt();
return true;
}
public get resultCode(): number
{
return this._resultCode;
}
public get millisToAllowProcessReset(): number
{
return this._millisecondsToAllowProcessReset;
}
}

View File

@ -0,0 +1,3 @@
export * from './PhoneCollectionStateParser';
export * from './TryPhoneNumberResultParser';
export * from './TryVerificationCodeResultParser';

View File

@ -16,6 +16,7 @@ export * from './game/directory';
export * from './game/lobby';
export * from './game/score';
export * from './generic';
export * from './gifts';
export * from './group';
export * from './group/utils';
export * from './groupforums';