Merge branch 'extended-profile-changed' of https://github.com/oobjectt/nitro-renderer into oobjectt-extended-profile-changed

This commit is contained in:
dank074 2022-12-26 17:42:14 -06:00
commit 1198c9c450
6 changed files with 48 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -430,4 +430,5 @@ 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 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

@ -2,6 +2,7 @@ export * from './access';
export * from './AccountSafetyLockStatusChangeMessageEvent';
export * from './ApproveNameMessageEvent';
export * from './data';
export * from './ExtendedProfileChangedMessageEvent';
export * from './GroupDetailsChangedMessageEvent';
export * from './GroupMembershipRequestedMessageEvent';
export * from './GuildEditFailedMessageEvent';

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

@ -2,6 +2,7 @@ export * from './access';
export * from './AccountSafetyLockStatusChangeParser';
export * from './ApproveNameResultParser';
export * from './data';
export * from './ExtendedProfileChangedMessageParser';
export * from './GroupDetailsChangedMessageParser';
export * from './GroupMembershipRequestedMessageParser';
export * from './GuildEditFailedMessageParser';