mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
Account Safety Lock Status
This commit is contained in:
parent
26741b78a7
commit
8481fffb99
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 SHOW_ENFORCE_ROOM_CATEGORY = 3896;
|
||||||
public static CUSTOM_USER_NOTIFICATION = 909;
|
public static CUSTOM_USER_NOTIFICATION = 909;
|
||||||
public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575;
|
public static NEW_USER_EXPERIENCE_GIFT_OFFER = 3575;
|
||||||
|
public static ACCOUNT_SAFETY_LOCK_STATUS_CHANGE = 1243;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../events';
|
||||||
|
import { AccountSafetyLockStatusChangeParser } from '../../parser/user/AccountSafetyLockStatusChangeParser';
|
||||||
|
|
||||||
|
export class AccountSafetyLockStatusChangeMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, AccountSafetyLockStatusChangeParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): AccountSafetyLockStatusChangeParser
|
||||||
|
{
|
||||||
|
return this.parser as AccountSafetyLockStatusChangeParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
export * from './access';
|
export * from './access';
|
||||||
|
export * from './AccountSafetyLockStatusChangeMessageEvent';
|
||||||
export * from './ApproveNameMessageEvent';
|
export * from './ApproveNameMessageEvent';
|
||||||
export * from './data';
|
export * from './data';
|
||||||
export * from './GuildMembershipsMessageEvent';
|
export * from './GuildMembershipsMessageEvent';
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
|
|
||||||
|
export class AccountSafetyLockStatusChangeParser implements IMessageParser
|
||||||
|
{
|
||||||
|
public static SAFETY_LOCK_STATUS_LOCKED: number = 0;
|
||||||
|
public static SAFETY_LOCK_STATUS_UNLOCKED: number = 1;
|
||||||
|
|
||||||
|
private _status: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._status = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get status(): number
|
||||||
|
{
|
||||||
|
return this._status;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
export * from './access';
|
export * from './access';
|
||||||
|
export * from './AccountSafetyLockStatusChangeParser';
|
||||||
export * from './ApproveNameResultParser';
|
export * from './ApproveNameResultParser';
|
||||||
export * from './data';
|
export * from './data';
|
||||||
export * from './GuildMembershipsMessageParser';
|
export * from './GuildMembershipsMessageParser';
|
||||||
|
@ -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 { AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, FigureUpdateEvent, GetUserTagsComposer, InClientLinkEvent, MysteryBoxKeysEvent, NoobnessLevelMessageEvent, PetRespectComposer, PetScratchFailedMessageEvent, RoomReadyMessageEvent, RoomUnitChatComposer, UserInfoEvent, UserNameChangeMessageEvent, UserPermissionsEvent, UserRespectComposer, UserTagsMessageEvent } from '../communication';
|
import { AccountSafetyLockStatusChangeMessageEvent, AccountSafetyLockStatusChangeParser, AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, 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';
|
||||||
@ -24,6 +24,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
private _respectsLeft: number;
|
private _respectsLeft: number;
|
||||||
private _respectsPetLeft: number;
|
private _respectsPetLeft: number;
|
||||||
private _canChangeName: boolean;
|
private _canChangeName: boolean;
|
||||||
|
private _safetyLocked: boolean;
|
||||||
|
|
||||||
private _ignoredUsersManager: IgnoredUsersManager;
|
private _ignoredUsersManager: IgnoredUsersManager;
|
||||||
private _groupInformationManager: IGroupInformationManager;
|
private _groupInformationManager: IGroupInformationManager;
|
||||||
@ -116,6 +117,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
this._communication.registerMessageEvent(new InClientLinkEvent(this.onInClientLinkEvent.bind(this)));
|
this._communication.registerMessageEvent(new InClientLinkEvent(this.onInClientLinkEvent.bind(this)));
|
||||||
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)));
|
||||||
|
|
||||||
Nitro.instance.events.addEventListener(NitroSettingsEvent.SETTINGS_UPDATED, this.onNitroSettingsEvent);
|
Nitro.instance.events.addEventListener(NitroSettingsEvent.SETTINGS_UPDATED, this.onNitroSettingsEvent);
|
||||||
}
|
}
|
||||||
@ -151,6 +153,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
this._gender = null;
|
this._gender = null;
|
||||||
this._realName = null;
|
this._realName = null;
|
||||||
this._canChangeName = false;
|
this._canChangeName = false;
|
||||||
|
this._safetyLocked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private loadFurnitureData(): void
|
private loadFurnitureData(): void
|
||||||
@ -260,6 +263,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
this._respectsLeft = userInfo.respectsRemaining;
|
this._respectsLeft = userInfo.respectsRemaining;
|
||||||
this._respectsPetLeft = userInfo.respectsPetRemaining;
|
this._respectsPetLeft = userInfo.respectsPetRemaining;
|
||||||
this._canChangeName = userInfo.canChangeName;
|
this._canChangeName = userInfo.canChangeName;
|
||||||
|
this._safetyLocked = userInfo.safetyLocked;
|
||||||
|
|
||||||
(this._ignoredUsersManager && this._ignoredUsersManager.requestIgnoredUsers());
|
(this._ignoredUsersManager && this._ignoredUsersManager.requestIgnoredUsers());
|
||||||
}
|
}
|
||||||
@ -408,6 +412,17 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private onAccountSafetyLockStatusChangeMessageEvent(event: AccountSafetyLockStatusChangeMessageEvent): void
|
||||||
|
{
|
||||||
|
if(!event) return;
|
||||||
|
|
||||||
|
const parser = event.getParser();
|
||||||
|
|
||||||
|
if(!parser) return;
|
||||||
|
|
||||||
|
this._safetyLocked = (parser.status == AccountSafetyLockStatusChangeParser.SAFETY_LOCK_STATUS_LOCKED);
|
||||||
|
}
|
||||||
|
|
||||||
private onNitroSettingsEvent(event: NitroSettingsEvent): void
|
private onNitroSettingsEvent(event: NitroSettingsEvent): void
|
||||||
{
|
{
|
||||||
this._isRoomCameraFollowDisabled = event.cameraFollow;
|
this._isRoomCameraFollowDisabled = event.cameraFollow;
|
||||||
|
Loading…
Reference in New Issue
Block a user