mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
Merge branch 'email-status' of https://github.com/oobjectt/nitro-renderer into oobjectt-email-status
This commit is contained in:
commit
9dc5f366d7
File diff suppressed because one or more lines are too long
@ -444,4 +444,5 @@ export class IncomingHeader
|
|||||||
public static RENTABLE_SPACE_RENT_OK = 2046;
|
public static RENTABLE_SPACE_RENT_OK = 2046;
|
||||||
public static RENTABLE_SPACE_STATUS = 3559;
|
public static RENTABLE_SPACE_STATUS = 3559;
|
||||||
public static RENTABLE_SPACE_RENT_FAILED = 1868;
|
public static RENTABLE_SPACE_RENT_FAILED = 1868;
|
||||||
|
public static EMAIL_STATUS = 612;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../events';
|
||||||
|
import { EmailStatusParser } from '../../parser';
|
||||||
|
|
||||||
|
export class EmailStatusResultEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, EmailStatusParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): EmailStatusParser
|
||||||
|
{
|
||||||
|
return this.parser as EmailStatusParser;
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ export * from './access';
|
|||||||
export * from './AccountSafetyLockStatusChangeMessageEvent';
|
export * from './AccountSafetyLockStatusChangeMessageEvent';
|
||||||
export * from './ApproveNameMessageEvent';
|
export * from './ApproveNameMessageEvent';
|
||||||
export * from './data';
|
export * from './data';
|
||||||
|
export * from './EmailStatusResultEvent';
|
||||||
export * from './ExtendedProfileChangedMessageEvent';
|
export * from './ExtendedProfileChangedMessageEvent';
|
||||||
export * from './GroupDetailsChangedMessageEvent';
|
export * from './GroupDetailsChangedMessageEvent';
|
||||||
export * from './GroupMembershipRequestedMessageEvent';
|
export * from './GroupMembershipRequestedMessageEvent';
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
|
|
||||||
|
export class EmailStatusParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _email: string;
|
||||||
|
private _isVerified: boolean;
|
||||||
|
private _allowChange: boolean;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._email = null;
|
||||||
|
this._isVerified = false;
|
||||||
|
this._allowChange = false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._email = wrapper.readString();
|
||||||
|
this._isVerified = wrapper.readBoolean();
|
||||||
|
this._allowChange = 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;
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ export * from './access';
|
|||||||
export * from './AccountSafetyLockStatusChangeParser';
|
export * from './AccountSafetyLockStatusChangeParser';
|
||||||
export * from './ApproveNameResultParser';
|
export * from './ApproveNameResultParser';
|
||||||
export * from './data';
|
export * from './data';
|
||||||
|
export * from './EmailStatusParser';
|
||||||
export * from './ExtendedProfileChangedMessageParser';
|
export * from './ExtendedProfileChangedMessageParser';
|
||||||
export * from './GroupDetailsChangedMessageParser';
|
export * from './GroupDetailsChangedMessageParser';
|
||||||
export * from './GroupMembershipRequestedMessageParser';
|
export * from './GroupMembershipRequestedMessageParser';
|
||||||
|
@ -2,7 +2,7 @@ import { Resource, Texture } from '@pixi/core';
|
|||||||
import { GetAssetManager, IFurnitureData, IFurnitureDataListener, IGroupInformationManager, IMessageComposer, INitroCommunicationManager, INitroEvent, IProductData, IProductDataListener, ISessionDataManager, NitroConfiguration, NoobnessLevelEnum, SecurityLevel } from '../../api';
|
import { GetAssetManager, IFurnitureData, IFurnitureDataListener, IGroupInformationManager, IMessageComposer, INitroCommunicationManager, INitroEvent, IProductData, IProductDataListener, ISessionDataManager, NitroConfiguration, NoobnessLevelEnum, SecurityLevel } from '../../api';
|
||||||
import { NitroManager } from '../../core';
|
import { NitroManager } from '../../core';
|
||||||
import { MysteryBoxKeysUpdateEvent, NitroSettingsEvent, SessionDataPreferencesEvent, UserNameUpdateEvent } from '../../events';
|
import { MysteryBoxKeysUpdateEvent, NitroSettingsEvent, SessionDataPreferencesEvent, UserNameUpdateEvent } from '../../events';
|
||||||
import { AccountSafetyLockStatusChangeMessageEvent, AccountSafetyLockStatusChangeParser, AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, FigureUpdateEvent, GetUserTagsComposer, InClientLinkEvent, MysteryBoxKeysEvent, NoobnessLevelMessageEvent, PetRespectComposer, PetScratchFailedMessageEvent, RoomReadyMessageEvent, RoomUnitChatComposer, UserInfoEvent, UserNameChangeMessageEvent, UserPermissionsEvent, UserRespectComposer, UserTagsMessageEvent } from '../communication';
|
import { AccountSafetyLockStatusChangeMessageEvent, AccountSafetyLockStatusChangeParser, AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, EmailStatusResultEvent, FigureUpdateEvent, GetUserTagsComposer, InClientLinkEvent, MysteryBoxKeysEvent, NoobnessLevelMessageEvent, PetRespectComposer, PetScratchFailedMessageEvent, RoomReadyMessageEvent, RoomUnitChatComposer, UserInfoEvent, UserNameChangeMessageEvent, UserPermissionsEvent, UserRespectComposer, UserTagsMessageEvent } from '../communication';
|
||||||
import { Nitro } from '../Nitro';
|
import { Nitro } from '../Nitro';
|
||||||
import { HabboWebTools } from '../utils/HabboWebTools';
|
import { HabboWebTools } from '../utils/HabboWebTools';
|
||||||
import { BadgeImageManager } from './badge/BadgeImageManager';
|
import { BadgeImageManager } from './badge/BadgeImageManager';
|
||||||
@ -33,6 +33,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
private _securityLevel: number;
|
private _securityLevel: number;
|
||||||
private _isAmbassador: boolean;
|
private _isAmbassador: boolean;
|
||||||
private _noobnessLevel: number;
|
private _noobnessLevel: number;
|
||||||
|
private _isEmailVerified: boolean;
|
||||||
|
|
||||||
private _systemOpen: boolean;
|
private _systemOpen: boolean;
|
||||||
private _systemShutdown: boolean;
|
private _systemShutdown: boolean;
|
||||||
@ -70,6 +71,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
this._securityLevel = 0;
|
this._securityLevel = 0;
|
||||||
this._isAmbassador = false;
|
this._isAmbassador = false;
|
||||||
this._noobnessLevel = -1;
|
this._noobnessLevel = -1;
|
||||||
|
this._isEmailVerified = false;
|
||||||
|
|
||||||
this._systemOpen = false;
|
this._systemOpen = false;
|
||||||
this._systemShutdown = false;
|
this._systemShutdown = false;
|
||||||
@ -118,6 +120,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
this._communication.registerMessageEvent(new MysteryBoxKeysEvent(this.onMysteryBoxKeysEvent.bind(this)));
|
this._communication.registerMessageEvent(new MysteryBoxKeysEvent(this.onMysteryBoxKeysEvent.bind(this)));
|
||||||
this._communication.registerMessageEvent(new NoobnessLevelMessageEvent(this.onNoobnessLevelMessageEvent.bind(this)));
|
this._communication.registerMessageEvent(new NoobnessLevelMessageEvent(this.onNoobnessLevelMessageEvent.bind(this)));
|
||||||
this._communication.registerMessageEvent(new AccountSafetyLockStatusChangeMessageEvent(this.onAccountSafetyLockStatusChangeMessageEvent.bind(this)));
|
this._communication.registerMessageEvent(new AccountSafetyLockStatusChangeMessageEvent(this.onAccountSafetyLockStatusChangeMessageEvent.bind(this)));
|
||||||
|
this._communication.registerMessageEvent(new EmailStatusResultEvent(this.onEmailStatus.bind(this)));
|
||||||
|
|
||||||
Nitro.instance.events.addEventListener(NitroSettingsEvent.SETTINGS_UPDATED, this.onNitroSettingsEvent);
|
Nitro.instance.events.addEventListener(NitroSettingsEvent.SETTINGS_UPDATED, this.onNitroSettingsEvent);
|
||||||
}
|
}
|
||||||
@ -423,6 +426,17 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
this._safetyLocked = (parser.status == AccountSafetyLockStatusChangeParser.SAFETY_LOCK_STATUS_LOCKED);
|
this._safetyLocked = (parser.status == AccountSafetyLockStatusChangeParser.SAFETY_LOCK_STATUS_LOCKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private onEmailStatus(event: EmailStatusResultEvent): void
|
||||||
|
{
|
||||||
|
if(!event) return;
|
||||||
|
|
||||||
|
const parser = event.getParser();
|
||||||
|
|
||||||
|
if(!parser) return;
|
||||||
|
|
||||||
|
this._isEmailVerified = parser.isVerified;
|
||||||
|
}
|
||||||
|
|
||||||
private onNitroSettingsEvent(event: NitroSettingsEvent): void
|
private onNitroSettingsEvent(event: NitroSettingsEvent): void
|
||||||
{
|
{
|
||||||
this._isRoomCameraFollowDisabled = event.cameraFollow;
|
this._isRoomCameraFollowDisabled = event.cameraFollow;
|
||||||
@ -663,6 +677,11 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
return this._isAmbassador;
|
return this._isAmbassador;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get isEmailVerified(): boolean
|
||||||
|
{
|
||||||
|
return this._isEmailVerified;
|
||||||
|
}
|
||||||
|
|
||||||
public get isNoob(): boolean
|
public get isNoob(): boolean
|
||||||
{
|
{
|
||||||
return (this._noobnessLevel !== NoobnessLevelEnum.OLD_IDENTITY);
|
return (this._noobnessLevel !== NoobnessLevelEnum.OLD_IDENTITY);
|
||||||
|
Loading…
Reference in New Issue
Block a user