diff --git a/src/core/common/disposable/IDisposable.ts b/src/api/common/IDisposable.ts similarity index 100% rename from src/core/common/disposable/IDisposable.ts rename to src/api/common/IDisposable.ts diff --git a/src/core/common/logger/INitroLogger.ts b/src/api/common/INitroLogger.ts similarity index 100% rename from src/core/common/logger/INitroLogger.ts rename to src/api/common/INitroLogger.ts diff --git a/src/core/common/INitroManager.ts b/src/api/common/INitroManager.ts similarity index 50% rename from src/core/common/INitroManager.ts rename to src/api/common/INitroManager.ts index d502b2b3..6ee5574e 100644 --- a/src/core/common/INitroManager.ts +++ b/src/api/common/INitroManager.ts @@ -1,6 +1,6 @@ -import { IEventDispatcher } from '../events/IEventDispatcher'; -import { IDisposable } from './disposable/IDisposable'; -import { INitroLogger } from './logger/INitroLogger'; +import { IEventDispatcher } from '../events'; +import { IDisposable } from './IDisposable'; +import { INitroLogger } from './INitroLogger'; export interface INitroManager extends IDisposable { @@ -9,4 +9,4 @@ export interface INitroManager extends IDisposable events: IEventDispatcher; isLoaded: boolean; isLoading: boolean; -} \ No newline at end of file +} diff --git a/src/core/common/IUpdateReceiver.ts b/src/api/common/IUpdateReceiver.ts similarity index 60% rename from src/core/common/IUpdateReceiver.ts rename to src/api/common/IUpdateReceiver.ts index 51608b4c..76c3891b 100644 --- a/src/core/common/IUpdateReceiver.ts +++ b/src/api/common/IUpdateReceiver.ts @@ -1,6 +1,6 @@ -import { IDisposable } from './disposable/IDisposable'; +import { IDisposable } from './IDisposable'; export interface IUpdateReceiver extends IDisposable { update(time: number): void; -} \ No newline at end of file +} diff --git a/src/api/common/index.ts b/src/api/common/index.ts new file mode 100644 index 00000000..a5e04021 --- /dev/null +++ b/src/api/common/index.ts @@ -0,0 +1,4 @@ +export * from './IDisposable'; +export * from './INitroLogger'; +export * from './INitroManager'; +export * from './IUpdateReceiver'; diff --git a/src/api/communication/IBinaryReader.ts b/src/api/communication/IBinaryReader.ts new file mode 100644 index 00000000..6ad26576 --- /dev/null +++ b/src/api/communication/IBinaryReader.ts @@ -0,0 +1,12 @@ +export interface IBinaryReader +{ + readBytes(length: number): IBinaryReader; + readByte(): number; + readShort(): number; + readInt(): number; + readFloat(): number; + readDouble(): number; + remaining(): number; + toString(encoding?: string): string; + toArrayBuffer(): ArrayBuffer; +} diff --git a/src/api/communication/IBinaryWriter.ts b/src/api/communication/IBinaryWriter.ts new file mode 100644 index 00000000..f3135c05 --- /dev/null +++ b/src/api/communication/IBinaryWriter.ts @@ -0,0 +1,11 @@ +export interface IBinaryWriter +{ + writeByte(byte: number): IBinaryWriter; + writeBytes(bytes: ArrayBuffer | number[]): IBinaryWriter; + writeShort(short: number): IBinaryWriter; + writeInt(integer: number): IBinaryWriter; + writeString(string: string, includeLength?: boolean): IBinaryWriter; + getBuffer(): ArrayBuffer; + position: number; + toString(encoding?: string): string; +} diff --git a/src/api/communication/ICodec.ts b/src/api/communication/ICodec.ts new file mode 100644 index 00000000..5d13f24c --- /dev/null +++ b/src/api/communication/ICodec.ts @@ -0,0 +1,9 @@ +import { IBinaryWriter } from './IBinaryWriter'; +import { IConnection } from './IConnection'; +import { IMessageDataWrapper } from './IMessageDataWrapper'; + +export interface ICodec +{ + encode(header: number, messages: any[]): IBinaryWriter; + decode(connection: IConnection): IMessageDataWrapper[]; +} diff --git a/src/api/communication/ICommunicationManager.ts b/src/api/communication/ICommunicationManager.ts new file mode 100644 index 00000000..fc79a49a --- /dev/null +++ b/src/api/communication/ICommunicationManager.ts @@ -0,0 +1,8 @@ +import { IDisposable } from '../common'; +import { IConnection } from './IConnection'; +import { IConnectionStateListener } from './IConnectionStateListener'; + +export interface ICommunicationManager extends IDisposable +{ + createConnection(stateListener?: IConnectionStateListener): IConnection; +} diff --git a/src/core/communication/connections/IConnection.ts b/src/api/communication/IConnection.ts similarity index 64% rename from src/core/communication/connections/IConnection.ts rename to src/api/communication/IConnection.ts index a00a07db..158f6ec6 100644 --- a/src/core/communication/connections/IConnection.ts +++ b/src/api/communication/IConnection.ts @@ -1,7 +1,7 @@ -import { IEventDispatcher } from '../../events/IEventDispatcher'; -import { IMessageComposer } from '../messages/IMessageComposer'; -import { IMessageConfiguration } from '../messages/IMessageConfiguration'; -import { IMessageEvent } from '../messages/IMessageEvent'; +import { IEventDispatcher } from '../events'; +import { IMessageComposer } from './IMessageComposer'; +import { IMessageConfiguration } from './IMessageConfiguration'; +import { IMessageEvent } from './IMessageEvent'; export interface IConnection extends IEventDispatcher { @@ -16,4 +16,4 @@ export interface IConnection extends IEventDispatcher removeMessageEvent(event: IMessageEvent): void; isAuthenticated: boolean; dataBuffer: ArrayBuffer; -} \ No newline at end of file +} diff --git a/src/core/communication/connections/IConnectionStateListener.ts b/src/api/communication/IConnectionStateListener.ts similarity index 100% rename from src/core/communication/connections/IConnectionStateListener.ts rename to src/api/communication/IConnectionStateListener.ts diff --git a/src/core/communication/messages/IMessageComposer.ts b/src/api/communication/IMessageComposer.ts similarity index 100% rename from src/core/communication/messages/IMessageComposer.ts rename to src/api/communication/IMessageComposer.ts diff --git a/src/core/communication/messages/IMessageConfiguration.ts b/src/api/communication/IMessageConfiguration.ts similarity index 100% rename from src/core/communication/messages/IMessageConfiguration.ts rename to src/api/communication/IMessageConfiguration.ts diff --git a/src/core/communication/messages/IMessageDataWrapper.ts b/src/api/communication/IMessageDataWrapper.ts similarity index 73% rename from src/core/communication/messages/IMessageDataWrapper.ts rename to src/api/communication/IMessageDataWrapper.ts index 87337b8a..407106aa 100644 --- a/src/core/communication/messages/IMessageDataWrapper.ts +++ b/src/api/communication/IMessageDataWrapper.ts @@ -1,9 +1,9 @@ -import { BinaryReader } from '../codec/BinaryReader'; +import { IBinaryReader } from './IBinaryReader'; export interface IMessageDataWrapper { readByte(): number; - readBytes(length: number): BinaryReader; + readBytes(length: number): IBinaryReader; readBoolean(): boolean; readShort(): number; readInt(): number; diff --git a/src/core/communication/messages/IMessageEvent.ts b/src/api/communication/IMessageEvent.ts similarity index 78% rename from src/core/communication/messages/IMessageEvent.ts rename to src/api/communication/IMessageEvent.ts index 58b802d9..5949015e 100644 --- a/src/core/communication/messages/IMessageEvent.ts +++ b/src/api/communication/IMessageEvent.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../connections/IConnection'; +import { IConnection } from './IConnection'; import { IMessageParser } from './IMessageParser'; export interface IMessageEvent @@ -8,4 +8,4 @@ export interface IMessageEvent parserClass: Function; parser: IMessageParser; connection: IConnection; -} \ No newline at end of file +} diff --git a/src/core/communication/messages/IMessageParser.ts b/src/api/communication/IMessageParser.ts similarity index 100% rename from src/core/communication/messages/IMessageParser.ts rename to src/api/communication/IMessageParser.ts diff --git a/src/core/communication/connections/enums/ClientDeviceCategoryEnum.ts b/src/api/communication/enums/ClientDeviceCategoryEnum.ts similarity index 100% rename from src/core/communication/connections/enums/ClientDeviceCategoryEnum.ts rename to src/api/communication/enums/ClientDeviceCategoryEnum.ts diff --git a/src/core/communication/connections/enums/ClientPlatformEnum.ts b/src/api/communication/enums/ClientPlatformEnum.ts similarity index 100% rename from src/core/communication/connections/enums/ClientPlatformEnum.ts rename to src/api/communication/enums/ClientPlatformEnum.ts diff --git a/src/core/communication/connections/enums/WebSocketEventEnum.ts b/src/api/communication/enums/WebSocketEventEnum.ts similarity index 100% rename from src/core/communication/connections/enums/WebSocketEventEnum.ts rename to src/api/communication/enums/WebSocketEventEnum.ts diff --git a/src/core/communication/connections/enums/index.ts b/src/api/communication/enums/index.ts similarity index 100% rename from src/core/communication/connections/enums/index.ts rename to src/api/communication/enums/index.ts diff --git a/src/api/communication/index.ts b/src/api/communication/index.ts new file mode 100644 index 00000000..a92f6edf --- /dev/null +++ b/src/api/communication/index.ts @@ -0,0 +1,12 @@ +export * from './enums'; +export * from './IBinaryReader'; +export * from './IBinaryWriter'; +export * from './ICodec'; +export * from './ICommunicationManager'; +export * from './IConnection'; +export * from './IConnectionStateListener'; +export * from './IMessageComposer'; +export * from './IMessageConfiguration'; +export * from './IMessageDataWrapper'; +export * from './IMessageEvent'; +export * from './IMessageParser'; diff --git a/src/core/events/IEventDispatcher.ts b/src/api/events/IEventDispatcher.ts similarity index 55% rename from src/core/events/IEventDispatcher.ts rename to src/api/events/IEventDispatcher.ts index 0ab97087..6b7e119b 100644 --- a/src/core/events/IEventDispatcher.ts +++ b/src/api/events/IEventDispatcher.ts @@ -1,12 +1,11 @@ -import { INitroLogger } from '../common'; -import { IDisposable } from '../common/disposable/IDisposable'; -import { NitroEvent } from './NitroEvent'; +import { IDisposable, INitroLogger } from '../common'; +import { INitroEvent } from './INitroEvent'; export interface IEventDispatcher extends IDisposable { addEventListener(type: string, callback: Function): void removeEventListener(type: string, callback: Function): void; removeAllListeners(): void; - dispatchEvent(event: NitroEvent): boolean; + dispatchEvent(event: INitroEvent): boolean; logger: INitroLogger; } diff --git a/src/core/events/ILinkEventTracker.ts b/src/api/events/ILinkEventTracker.ts similarity index 100% rename from src/core/events/ILinkEventTracker.ts rename to src/api/events/ILinkEventTracker.ts diff --git a/src/api/events/INitroEvent.ts b/src/api/events/INitroEvent.ts new file mode 100644 index 00000000..e063ad82 --- /dev/null +++ b/src/api/events/INitroEvent.ts @@ -0,0 +1,4 @@ +export interface INitroEvent +{ + type: string; +} diff --git a/src/core/events/IWorkerEventTracker.ts b/src/api/events/IWorkerEventTracker.ts similarity index 100% rename from src/core/events/IWorkerEventTracker.ts rename to src/api/events/IWorkerEventTracker.ts diff --git a/src/api/events/index.ts b/src/api/events/index.ts new file mode 100644 index 00000000..c4495c04 --- /dev/null +++ b/src/api/events/index.ts @@ -0,0 +1,4 @@ +export * from './IEventDispatcher'; +export * from './ILinkEventTracker'; +export * from './INitroEvent'; +export * from './IWorkerEventTracker'; diff --git a/src/api/index.ts b/src/api/index.ts index ff64c4f8..d03b92b6 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -9,3 +9,6 @@ export * from './asset/visualization/animation'; export * from './asset/visualization/color'; export * from './asset/visualization/gestures'; export * from './asset/visualization/postures'; +export * from './common'; +export * from './communication'; +export * from './events'; diff --git a/src/core/INitroCore.ts b/src/core/INitroCore.ts index 288e1c5f..9051c792 100644 --- a/src/core/INitroCore.ts +++ b/src/core/INitroCore.ts @@ -1,6 +1,4 @@ -import { IAssetManager } from '../api'; -import { IDisposable } from './common/disposable/IDisposable'; -import { ICommunicationManager } from './communication/ICommunicationManager'; +import { IAssetManager, ICommunicationManager, IDisposable } from '../api'; import { IConfigurationManager } from './configuration/IConfigurationManager'; export interface INitroCore extends IDisposable diff --git a/src/core/NitroCore.ts b/src/core/NitroCore.ts index 1929b00d..9b8c261e 100644 --- a/src/core/NitroCore.ts +++ b/src/core/NitroCore.ts @@ -1,8 +1,7 @@ -import { IAssetManager } from '../api'; +import { IAssetManager, ICommunicationManager } from '../api'; import { AssetManager } from './asset/AssetManager'; -import { Disposable } from './common/disposable/Disposable'; +import { Disposable } from './common/Disposable'; import { CommunicationManager } from './communication/CommunicationManager'; -import { ICommunicationManager } from './communication/ICommunicationManager'; import { ConfigurationManager } from './configuration/ConfigurationManager'; import { IConfigurationManager } from './configuration/IConfigurationManager'; import { INitroCore } from './INitroCore'; diff --git a/src/core/asset/AssetManager.ts b/src/core/asset/AssetManager.ts index 699c0238..d8936c2e 100644 --- a/src/core/asset/AssetManager.ts +++ b/src/core/asset/AssetManager.ts @@ -1,11 +1,10 @@ import { BaseTexture, Resource, Texture } from '@pixi/core'; import { Loader, LoaderResource } from '@pixi/loaders'; import { Spritesheet } from '@pixi/spritesheet'; -import { IAssetData, IAssetManager, IGraphicAsset, IGraphicAssetCollection } from '../../api'; +import { IAssetData, IAssetManager, IGraphicAsset, IGraphicAssetCollection, INitroLogger } from '../../api'; import { GraphicAssetCollection } from '../../room/object/visualization/utils/GraphicAssetCollection'; -import { Disposable } from '../common/disposable/Disposable'; -import { INitroLogger } from '../common/logger/INitroLogger'; -import { NitroLogger } from '../common/logger/NitroLogger'; +import { Disposable } from '../common/Disposable'; +import { NitroLogger } from '../common/NitroLogger'; import { ArrayBufferToBase64 } from '../utils'; import { NitroBundle } from './NitroBundle'; diff --git a/src/core/common/disposable/Disposable.ts b/src/core/common/Disposable.ts similarity index 85% rename from src/core/common/disposable/Disposable.ts rename to src/core/common/Disposable.ts index 23e34d34..df3872ee 100644 --- a/src/core/common/disposable/Disposable.ts +++ b/src/core/common/Disposable.ts @@ -1,4 +1,4 @@ -import { IDisposable } from './IDisposable'; +import { IDisposable } from '../../api'; export class Disposable implements IDisposable { @@ -13,7 +13,7 @@ export class Disposable implements IDisposable public dispose(): void { - if(this._isDisposed || this._isDisposing) return; + if (this._isDisposed || this._isDisposing) return; this._isDisposing = true; @@ -37,4 +37,4 @@ export class Disposable implements IDisposable { return this._isDisposing; } -} \ No newline at end of file +} diff --git a/src/core/common/logger/NitroLogger.ts b/src/core/common/NitroLogger.ts similarity index 94% rename from src/core/common/logger/NitroLogger.ts rename to src/core/common/NitroLogger.ts index 0cc8bdda..29a41955 100644 --- a/src/core/common/logger/NitroLogger.ts +++ b/src/core/common/NitroLogger.ts @@ -1,4 +1,4 @@ -import { INitroLogger } from './INitroLogger'; +import { INitroLogger } from '../../api'; export class NitroLogger implements INitroLogger { @@ -30,7 +30,7 @@ export class NitroLogger implements INitroLogger public printMessage(modus: string, ...message: any[]): void { - if(!this._print) return; + if (!this._print) return; NitroLogger.log(this._name, modus, ...message); } @@ -39,7 +39,7 @@ export class NitroLogger implements INitroLogger { const logPrefix = `[Nitro] [${name}]`; - switch(modus) + switch (modus) { case 'error': console.error(logPrefix, ...message); diff --git a/src/core/common/NitroManager.ts b/src/core/common/NitroManager.ts index 91c77cfd..026ffe95 100644 --- a/src/core/common/NitroManager.ts +++ b/src/core/common/NitroManager.ts @@ -1,9 +1,7 @@ +import { IEventDispatcher, INitroLogger, INitroManager } from '../../api'; import { EventDispatcher } from '../events/EventDispatcher'; -import { IEventDispatcher } from '../events/IEventDispatcher'; -import { Disposable } from './disposable/Disposable'; -import { INitroManager } from './INitroManager'; -import { INitroLogger } from './logger/INitroLogger'; -import { NitroLogger } from './logger/NitroLogger'; +import { Disposable } from './Disposable'; +import { NitroLogger } from './NitroLogger'; export class NitroManager extends Disposable implements INitroManager { @@ -28,7 +26,7 @@ export class NitroManager extends Disposable implements INitroManager public init(): void { - if(this._isLoaded || this._isLoading || this.isDisposing) return; + if (this._isLoaded || this._isLoading || this.isDisposing) return; this._isLoading = true; @@ -45,7 +43,7 @@ export class NitroManager extends Disposable implements INitroManager protected onDispose(): void { - if(this._events) this._events.dispose(); + if (this._events) this._events.dispose(); super.onDispose(); } @@ -75,4 +73,4 @@ export class NitroManager extends Disposable implements INitroManager { return this._isLoading; } -} \ No newline at end of file +} diff --git a/src/core/common/disposable/index.ts b/src/core/common/disposable/index.ts deleted file mode 100644 index 2edb6e9f..00000000 --- a/src/core/common/disposable/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './Disposable'; -export * from './IDisposable'; diff --git a/src/core/common/index.ts b/src/core/common/index.ts index 50a8f018..59124d14 100644 --- a/src/core/common/index.ts +++ b/src/core/common/index.ts @@ -1,5 +1,3 @@ -export * from './disposable'; -export * from './INitroManager'; -export * from './IUpdateReceiver'; -export * from './logger'; +export * from './Disposable'; +export * from './NitroLogger'; export * from './NitroManager'; diff --git a/src/core/common/logger/index.ts b/src/core/common/logger/index.ts deleted file mode 100644 index 147aa164..00000000 --- a/src/core/common/logger/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './INitroLogger'; -export * from './NitroLogger'; diff --git a/src/core/communication/CommunicationManager.ts b/src/core/communication/CommunicationManager.ts index 9c9cae2c..3c081cb3 100644 --- a/src/core/communication/CommunicationManager.ts +++ b/src/core/communication/CommunicationManager.ts @@ -1,9 +1,6 @@ -import { Disposable } from '../common/disposable/Disposable'; -import { IUpdateReceiver } from '../common/IUpdateReceiver'; -import { IConnection } from './connections/IConnection'; -import { IConnectionStateListener } from './connections/IConnectionStateListener'; +import { ICommunicationManager, IConnection, IConnectionStateListener, IUpdateReceiver } from '../../api'; +import { Disposable } from '../common/Disposable'; import { SocketConnection } from './connections/SocketConnection'; -import { ICommunicationManager } from './ICommunicationManager'; export class CommunicationManager extends Disposable implements ICommunicationManager, IUpdateReceiver { @@ -18,16 +15,16 @@ export class CommunicationManager extends Disposable implements ICommunicationMa protected onDispose(): void { - if(!this._connections || !this._connections.length) return; + if (!this._connections || !this._connections.length) return; - for(const connection of this._connections.values()) connection && connection.dispose(); + for (const connection of this._connections.values()) connection && connection.dispose(); } public createConnection(stateListener: IConnectionStateListener = null): IConnection { const connection = new SocketConnection(this, stateListener); - if(!connection) return; + if (!connection) return; this._connections.push(connection); @@ -38,16 +35,16 @@ export class CommunicationManager extends Disposable implements ICommunicationMa { let index = 0; - while(index < this._connections.length) + while (index < this._connections.length) { const connection = this._connections[index]; connection.processReceivedData(); - if(this.disposed) return; + if (this.disposed) return; - if(connection.disposed) this._connections.splice(index, 1); + if (connection.disposed) this._connections.splice(index, 1); else index++; } } -} \ No newline at end of file +} diff --git a/src/core/communication/ICommunicationManager.ts b/src/core/communication/ICommunicationManager.ts deleted file mode 100644 index 532e0be4..00000000 --- a/src/core/communication/ICommunicationManager.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IDisposable } from '../common/disposable/IDisposable'; -import { IConnection } from './connections/IConnection'; -import { IConnectionStateListener } from './connections/IConnectionStateListener'; - -export interface ICommunicationManager extends IDisposable -{ - createConnection(stateListener?: IConnectionStateListener): IConnection; -} \ No newline at end of file diff --git a/src/core/communication/codec/ICodec.ts b/src/core/communication/codec/ICodec.ts deleted file mode 100644 index 824d7f80..00000000 --- a/src/core/communication/codec/ICodec.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BinaryWriter } from './BinaryWriter'; -import { IConnection } from '../connections/IConnection'; -import { IMessageDataWrapper } from '../messages/IMessageDataWrapper'; - -export interface ICodec -{ - encode(header: number, messages: any[]): BinaryWriter; - decode(connection: IConnection): IMessageDataWrapper[]; -} \ No newline at end of file diff --git a/src/core/communication/codec/evawire/EvaWireDataWrapper.ts b/src/core/communication/codec/evawire/EvaWireDataWrapper.ts index 66a744f8..c1ed4e85 100644 --- a/src/core/communication/codec/evawire/EvaWireDataWrapper.ts +++ b/src/core/communication/codec/evawire/EvaWireDataWrapper.ts @@ -1,27 +1,26 @@ -import { IMessageDataWrapper } from '../../messages/IMessageDataWrapper'; -import { BinaryReader } from '../BinaryReader'; +import { IBinaryReader, IMessageDataWrapper } from '../../../../api'; export class EvaWireDataWrapper implements IMessageDataWrapper { private _header: number; - private _buffer: BinaryReader; + private _buffer: IBinaryReader; - constructor(header: number, buffer: BinaryReader) + constructor(header: number, buffer: IBinaryReader) { this._header = header; this._buffer = buffer; } - public readBytes(length: number): BinaryReader + public readBytes(length: number): IBinaryReader { - if(!this._buffer) return null; + if (!this._buffer) return null; return this._buffer.readBytes(length); } public readByte(): number { - if(!this._buffer) return -1; + if (!this._buffer) return -1; return this._buffer.readByte(); } @@ -33,28 +32,28 @@ export class EvaWireDataWrapper implements IMessageDataWrapper public readShort(): number { - if(!this._buffer) return -1; + if (!this._buffer) return -1; return this._buffer.readShort(); } public readInt(): number { - if(!this._buffer) return -1; + if (!this._buffer) return -1; return this._buffer.readInt(); } public readFloat(): number { - if(!this._buffer) return -1; + if (!this._buffer) return -1; return this._buffer.readFloat(); } public readDouble(): number { - if(!this._buffer) return -1; + if (!this._buffer) return -1; return this._buffer.readDouble(); } diff --git a/src/core/communication/codec/evawire/EvaWireFormat.ts b/src/core/communication/codec/evawire/EvaWireFormat.ts index 08d2d66b..13a6c3f5 100644 --- a/src/core/communication/codec/evawire/EvaWireFormat.ts +++ b/src/core/communication/codec/evawire/EvaWireFormat.ts @@ -1,33 +1,31 @@ -import { IConnection } from '../../connections/IConnection'; -import { IMessageDataWrapper } from '../../messages/IMessageDataWrapper'; +import { IBinaryWriter, ICodec, IConnection, IMessageDataWrapper } from '../../../../api'; import { BinaryReader } from '../BinaryReader'; import { BinaryWriter } from '../BinaryWriter'; import { Byte } from '../Byte'; -import { ICodec } from '../ICodec'; import { Short } from '../Short'; import { EvaWireDataWrapper } from './EvaWireDataWrapper'; export class EvaWireFormat implements ICodec { - public encode(header: number, messages: any[]): BinaryWriter + public encode(header: number, messages: any[]): IBinaryWriter { const writer = new BinaryWriter(); writer.writeShort(header); - for(const value of messages) + for (const value of messages) { let type: string = typeof value; - if(type === 'object') + if (type === 'object') { - if(value === null) type = 'null'; - else if(value instanceof Byte) type = 'byte'; - else if(value instanceof Short) type = 'short'; - else if(value instanceof ArrayBuffer) type = 'arraybuffer'; + if (value === null) type = 'null'; + else if (value instanceof Byte) type = 'byte'; + else if (value instanceof Short) type = 'short'; + else if (value instanceof ArrayBuffer) type = 'arraybuffer'; } - switch(type) + switch (type) { case 'undefined': case 'null': @@ -46,7 +44,7 @@ export class EvaWireFormat implements ICodec writer.writeByte(value ? 1 : 0); break; case 'string': - if(!value) writer.writeShort(0); + if (!value) writer.writeShort(0); else { writer.writeString(value, true); @@ -60,25 +58,25 @@ export class EvaWireFormat implements ICodec const buffer = writer.getBuffer(); - if(!buffer) return null; + if (!buffer) return null; return new BinaryWriter().writeInt(buffer.byteLength).writeBytes(buffer); } public decode(connection: IConnection): IMessageDataWrapper[] { - if(!connection || !connection.dataBuffer || !connection.dataBuffer.byteLength) return null; + if (!connection || !connection.dataBuffer || !connection.dataBuffer.byteLength) return null; const wrappers: IMessageDataWrapper[] = []; - while(connection.dataBuffer.byteLength) + while (connection.dataBuffer.byteLength) { - if(connection.dataBuffer.byteLength < 4) break; + if (connection.dataBuffer.byteLength < 4) break; const container = new BinaryReader(connection.dataBuffer); const length = container.readInt(); - if(length > (connection.dataBuffer.byteLength - 4)) break; + if (length > (connection.dataBuffer.byteLength - 4)) break; const extracted = container.readBytes(length); diff --git a/src/core/communication/codec/index.ts b/src/core/communication/codec/index.ts index ae6e3432..565b726a 100644 --- a/src/core/communication/codec/index.ts +++ b/src/core/communication/codec/index.ts @@ -2,5 +2,4 @@ export * from './BinaryReader'; export * from './BinaryWriter'; export * from './Byte'; export * from './evawire'; -export * from './ICodec'; export * from './Short'; diff --git a/src/core/communication/connections/SocketConnection.ts b/src/core/communication/connections/SocketConnection.ts index bdb4d056..bab5d33a 100644 --- a/src/core/communication/connections/SocketConnection.ts +++ b/src/core/communication/connections/SocketConnection.ts @@ -1,17 +1,9 @@ +import { ICodec, ICommunicationManager, IConnection, IConnectionStateListener, IMessageComposer, IMessageConfiguration, IMessageDataWrapper, IMessageEvent, WebSocketEventEnum } from '../../../api'; import { Nitro } from '../../../nitro/Nitro'; import { EventDispatcher } from '../../events/EventDispatcher'; import { EvaWireFormat } from '../codec/evawire/EvaWireFormat'; -import { ICodec } from '../codec/ICodec'; import { SocketConnectionEvent } from '../events/SocketConnectionEvent'; -import { ICommunicationManager } from '../ICommunicationManager'; -import { IMessageComposer } from '../messages/IMessageComposer'; -import { IMessageConfiguration } from '../messages/IMessageConfiguration'; -import { IMessageDataWrapper } from '../messages/IMessageDataWrapper'; -import { IMessageEvent } from '../messages/IMessageEvent'; import { MessageClassManager } from '../messages/MessageClassManager'; -import { WebSocketEventEnum } from './enums/WebSocketEventEnum'; -import { IConnection } from './IConnection'; -import { IConnectionStateListener } from './IConnectionStateListener'; export class SocketConnection extends EventDispatcher implements IConnection { @@ -53,7 +45,7 @@ export class SocketConnection extends EventDispatcher implements IConnection public init(socketUrl: string): void { - if(this._stateListener) + if (this._stateListener) { this._stateListener.connectionInit(socketUrl); } @@ -76,13 +68,13 @@ export class SocketConnection extends EventDispatcher implements IConnection public onReady(): void { - if(this._isReady) return; + if (this._isReady) return; this._isReady = true; - if(this._pendingServerMessages && this._pendingServerMessages.length) this.processWrappers(...this._pendingServerMessages); + if (this._pendingServerMessages && this._pendingServerMessages.length) this.processWrappers(...this._pendingServerMessages); - if(this._pendingClientMessages && this._pendingClientMessages.length) this.send(...this._pendingClientMessages); + if (this._pendingClientMessages && this._pendingClientMessages.length) this.send(...this._pendingClientMessages); this._pendingServerMessages = []; this._pendingClientMessages = []; @@ -90,7 +82,7 @@ export class SocketConnection extends EventDispatcher implements IConnection private createSocket(socketUrl: string): void { - if(!socketUrl) return; + if (!socketUrl) return; this.destroySocket(); @@ -105,14 +97,14 @@ export class SocketConnection extends EventDispatcher implements IConnection private destroySocket(): void { - if(!this._socket) return; + if (!this._socket) return; this._socket.removeEventListener(WebSocketEventEnum.CONNECTION_OPENED, this.onOpen); this._socket.removeEventListener(WebSocketEventEnum.CONNECTION_CLOSED, this.onClose); this._socket.removeEventListener(WebSocketEventEnum.CONNECTION_ERROR, this.onError); this._socket.removeEventListener(WebSocketEventEnum.CONNECTION_MESSAGE, this.onMessage); - if(this._socket.readyState === WebSocket.OPEN) this._socket.close(); + if (this._socket.readyState === WebSocket.OPEN) this._socket.close(); this._socket = null; } @@ -134,7 +126,7 @@ export class SocketConnection extends EventDispatcher implements IConnection private onMessage(event: MessageEvent): void { - if(!event) return; + if (!event) return; //this.dispatchConnectionEvent(SocketConnectionEvent.CONNECTION_MESSAGE, event); @@ -162,28 +154,28 @@ export class SocketConnection extends EventDispatcher implements IConnection public send(...composers: IMessageComposer[]): boolean { - if(this.disposed || !composers) return false; + if (this.disposed || !composers) return false; composers = [...composers]; - if(this._isAuthenticated && !this._isReady) + if (this._isAuthenticated && !this._isReady) { - if(!this._pendingClientMessages) this._pendingClientMessages = []; + if (!this._pendingClientMessages) this._pendingClientMessages = []; this._pendingClientMessages.push(...composers); return false; } - for(const composer of composers) + for (const composer of composers) { - if(!composer) continue; + if (!composer) continue; const header = this._messages.getComposerId(composer); - if(header === -1) + if (header === -1) { - if(Nitro.instance.getConfiguration('system.packet.log')) this.logger.log(`Unknown Composer: ${composer.constructor.name}`); + if (Nitro.instance.getConfiguration('system.packet.log')) this.logger.log(`Unknown Composer: ${composer.constructor.name}`); continue; } @@ -191,14 +183,14 @@ export class SocketConnection extends EventDispatcher implements IConnection const message = composer.getMessageArray(); const encoded = this._codec.encode(header, message); - if(!encoded) + if (!encoded) { - if(Nitro.instance.getConfiguration('system.packet.log')) this.logger.log('Encoding Failed', composer.constructor.name); + if (Nitro.instance.getConfiguration('system.packet.log')) this.logger.log('Encoding Failed', composer.constructor.name); continue; } - if(Nitro.instance.getConfiguration('system.packet.log')) this.logger.log('OutgoingComposer', header, composer.constructor.name, message); + if (Nitro.instance.getConfiguration('system.packet.log')) this.logger.log('OutgoingComposer', header, composer.constructor.name, message); this.write(encoded.getBuffer()); } @@ -208,7 +200,7 @@ export class SocketConnection extends EventDispatcher implements IConnection private write(buffer: ArrayBuffer): void { - if(this._socket.readyState !== WebSocket.OPEN) return; + if (this._socket.readyState !== WebSocket.OPEN) return; this._socket.send(buffer); } @@ -230,11 +222,11 @@ export class SocketConnection extends EventDispatcher implements IConnection { const wrappers = this.splitReceivedMessages(); - if(!wrappers || !wrappers.length) return; + if (!wrappers || !wrappers.length) return; - if(this._isAuthenticated && !this._isReady) + if (this._isAuthenticated && !this._isReady) { - if(!this._pendingServerMessages) this._pendingServerMessages = []; + if (!this._pendingServerMessages) this._pendingServerMessages = []; this._pendingServerMessages.push(...wrappers); @@ -246,17 +238,17 @@ export class SocketConnection extends EventDispatcher implements IConnection private processWrappers(...wrappers: IMessageDataWrapper[]): void { - if(!wrappers || !wrappers.length) return; + if (!wrappers || !wrappers.length) return; - for(const wrapper of wrappers) + for (const wrapper of wrappers) { - if(!wrapper) continue; + if (!wrapper) continue; const messages = this.getMessagesForWrapper(wrapper); - if(!messages || !messages.length) continue; + if (!messages || !messages.length) continue; - if(Nitro.instance.getConfiguration('system.packet.log')) this.logger.log('IncomingMessage', wrapper.header, messages[0].constructor.name, messages[0].parser); + if (Nitro.instance.getConfiguration('system.packet.log')) this.logger.log('IncomingMessage', wrapper.header, messages[0].constructor.name, messages[0].parser); this.handleMessages(...messages); } @@ -264,7 +256,7 @@ export class SocketConnection extends EventDispatcher implements IConnection private splitReceivedMessages(): IMessageDataWrapper[] { - if(!this._dataBuffer || !this._dataBuffer.byteLength) return null; + if (!this._dataBuffer || !this._dataBuffer.byteLength) return null; return this._codec.decode(this); } @@ -281,13 +273,13 @@ export class SocketConnection extends EventDispatcher implements IConnection private getMessagesForWrapper(wrapper: IMessageDataWrapper): IMessageEvent[] { - if(!wrapper) return null; + if (!wrapper) return null; const events = this._messages.getEvents(wrapper.header); - if(!events || !events.length) + if (!events || !events.length) { - if(Nitro.instance.getConfiguration('system.packet.log')) this.logger.log('IncomingMessage', wrapper.header, 'UNREGISTERED', wrapper); + if (Nitro.instance.getConfiguration('system.packet.log')) this.logger.log('IncomingMessage', wrapper.header, 'UNREGISTERED', wrapper); return; } @@ -297,9 +289,9 @@ export class SocketConnection extends EventDispatcher implements IConnection //@ts-ignore const parser = new events[0].parserClass(); - if(!parser || !parser.flush() || !parser.parse(wrapper)) return null; + if (!parser || !parser.flush() || !parser.parse(wrapper)) return null; - for(const event of events) (event.parser = parser); + for (const event of events) (event.parser = parser); } catch (e) @@ -316,33 +308,33 @@ export class SocketConnection extends EventDispatcher implements IConnection { messages = [...messages]; - for(const message of messages) + for (const message of messages) { - if(!message) continue; + if (!message) continue; message.connection = this; - if(message.callBack) message.callBack(message); + if (message.callBack) message.callBack(message); } } public registerMessages(configuration: IMessageConfiguration): void { - if(!configuration) return; + if (!configuration) return; this._messages.registerMessages(configuration); } public addMessageEvent(event: IMessageEvent): void { - if(!event || !this._messages) return; + if (!event || !this._messages) return; this._messages.registerMessageEvent(event); } public removeMessageEvent(event: IMessageEvent): void { - if(!event || !this._messages) return; + if (!event || !this._messages) return; this._messages.removeMessageEvent(event); } diff --git a/src/core/communication/connections/index.ts b/src/core/communication/connections/index.ts index a8e8e168..4f36c51e 100644 --- a/src/core/communication/connections/index.ts +++ b/src/core/communication/connections/index.ts @@ -1,4 +1 @@ -export * from './enums'; -export * from './IConnection'; -export * from './IConnectionStateListener'; export * from './SocketConnection'; diff --git a/src/core/communication/events/SocketConnectionEvent.ts b/src/core/communication/events/SocketConnectionEvent.ts index 7ccc44d7..b2dcd055 100644 --- a/src/core/communication/events/SocketConnectionEvent.ts +++ b/src/core/communication/events/SocketConnectionEvent.ts @@ -1,5 +1,5 @@ +import { IConnection } from '../../../api'; import { NitroEvent } from '../../events/NitroEvent'; -import { IConnection } from '../connections/IConnection'; export class SocketConnectionEvent extends NitroEvent { @@ -28,4 +28,4 @@ export class SocketConnectionEvent extends NitroEvent { return this._originalEvent; } -} \ No newline at end of file +} diff --git a/src/core/communication/index.ts b/src/core/communication/index.ts index b34d744e..803caee8 100644 --- a/src/core/communication/index.ts +++ b/src/core/communication/index.ts @@ -2,5 +2,4 @@ export * from './codec'; export * from './CommunicationManager'; export * from './connections'; export * from './events'; -export * from './ICommunicationManager'; export * from './messages'; diff --git a/src/core/communication/messages/MessageClassManager.ts b/src/core/communication/messages/MessageClassManager.ts index 839f9b66..42b5c1bb 100644 --- a/src/core/communication/messages/MessageClassManager.ts +++ b/src/core/communication/messages/MessageClassManager.ts @@ -1,6 +1,4 @@ -import { IMessageComposer } from './IMessageComposer'; -import { IMessageConfiguration } from './IMessageConfiguration'; -import { IMessageEvent } from './IMessageEvent'; +import { IMessageComposer, IMessageConfiguration, IMessageEvent } from '../../../api'; import { MessageEvent } from './MessageEvent'; export class MessageClassManager @@ -25,36 +23,36 @@ export class MessageClassManager public registerMessages(configuration: IMessageConfiguration): void { - for(const [ header, handler ] of configuration.events) this.registerMessageEventClass(header, handler); + for (const [header, handler] of configuration.events) this.registerMessageEventClass(header, handler); - for(const [ header, handler ] of configuration.composers) this.registerMessageComposerClass(header, handler); + for (const [header, handler] of configuration.composers) this.registerMessageComposerClass(header, handler); } private registerMessageEventClass(header: number, handler: Function): void { - if(!header || !handler) return; + if (!header || !handler) return; this._messageIdByEvent.set(handler, header); } private registerMessageComposerClass(header: number, handler: Function): void { - if(!header || !handler) return; + if (!header || !handler) return; this._messageIdByComposer.set(handler, header); } public registerMessageEvent(event: IMessageEvent): void { - if(!event) return; + if (!event) return; const header = this.getEventId(event); - if(!header) return; + if (!header) return; let existing = this._messageInstancesById.get(header); - if(!existing || !existing.length) + if (!existing || !existing.length) { existing = []; @@ -66,25 +64,25 @@ export class MessageClassManager public removeMessageEvent(event: IMessageEvent): void { - if(!event) return; + if (!event) return; const header = this.getEventId(event); - if(!header) return; + if (!header) return; const existing = this._messageInstancesById.get(header); - if(!existing) return; + if (!existing) return; - for(const [ index, message ] of existing.entries()) + for (const [index, message] of existing.entries()) { - if(!message) continue; + if (!message) continue; - if(message !== event) continue; + if (message !== event) continue; existing.splice(index, 1); - if(existing.length === 0) this._messageInstancesById.delete(header); + if (existing.length === 0) this._messageInstancesById.delete(header); message.dispose(); @@ -94,36 +92,36 @@ export class MessageClassManager public getEvents(header: number): IMessageEvent[] { - if(!header) return; + if (!header) return; const existing = this._messageInstancesById.get(header); - if(!existing) return; + if (!existing) return; return existing; } public getEventId(event: IMessageEvent): number { - if(!event) return -1; + if (!event) return -1; //@ts-ignore const name = (event instanceof MessageEvent ? event.constructor : event) as Function; const existing = this._messageIdByEvent.get(name); - if(!existing) return -1; + if (!existing) return -1; return existing; } public getComposerId(composer: IMessageComposer): number { - if(!composer) return -1; + if (!composer) return -1; const existing = this._messageIdByComposer.get(composer.constructor); - if(!existing) return -1; + if (!existing) return -1; return existing; } diff --git a/src/core/communication/messages/MessageEvent.ts b/src/core/communication/messages/MessageEvent.ts index c2c5217d..0adb4622 100644 --- a/src/core/communication/messages/MessageEvent.ts +++ b/src/core/communication/messages/MessageEvent.ts @@ -1,6 +1,4 @@ -import { IConnection } from '../connections/IConnection'; -import { IMessageEvent } from './IMessageEvent'; -import { IMessageParser } from './IMessageParser'; +import { IConnection, IMessageEvent, IMessageParser } from '../../../api'; export class MessageEvent implements IMessageEvent { @@ -54,4 +52,4 @@ export class MessageEvent implements IMessageEvent { this._connection = connection; } -} \ No newline at end of file +} diff --git a/src/core/communication/messages/index.ts b/src/core/communication/messages/index.ts index 5cc8eb81..208dd896 100644 --- a/src/core/communication/messages/index.ts +++ b/src/core/communication/messages/index.ts @@ -1,7 +1,2 @@ -export * from './IMessageComposer'; -export * from './IMessageConfiguration'; -export * from './IMessageDataWrapper'; -export * from './IMessageEvent'; -export * from './IMessageParser'; export * from './MessageClassManager'; export * from './MessageEvent'; diff --git a/src/core/configuration/ConfigurationManager.ts b/src/core/configuration/ConfigurationManager.ts index 93f847e3..fe2a099a 100644 --- a/src/core/configuration/ConfigurationManager.ts +++ b/src/core/configuration/ConfigurationManager.ts @@ -5,6 +5,7 @@ import { IConfigurationManager } from './IConfigurationManager'; export class ConfigurationManager extends NitroManager implements IConfigurationManager { private _definitions: Map; + private _config: any; private _pendingUrls: string[]; private _missingKeys: string[]; @@ -13,6 +14,7 @@ export class ConfigurationManager extends NitroManager implements IConfiguration super(); this._definitions = new Map(); + this._config = []; this._pendingUrls = []; this._missingKeys = []; @@ -30,7 +32,7 @@ export class ConfigurationManager extends NitroManager implements IConfiguration private loadNextConfiguration(): void { - if(!this._pendingUrls.length) + if (!this._pendingUrls.length) { this.dispatchConfigurationEvent(ConfigurationEvent.LOADED); @@ -42,7 +44,7 @@ export class ConfigurationManager extends NitroManager implements IConfiguration public loadConfigurationFromUrl(url: string): void { - if(!url || (url === '')) + if (!url || (url === '')) { this.dispatchConfigurationEvent(ConfigurationEvent.FAILED); @@ -57,13 +59,13 @@ export class ConfigurationManager extends NitroManager implements IConfiguration private onConfigurationLoaded(data: { [index: string]: any }, url: string): void { - if(!data) return; + if (!data) return; - if(this.parseConfiguration(data)) + if (this.parseConfiguration(data)) { const index = this._pendingUrls.indexOf(url); - if(index >= 0) this._pendingUrls.splice(index, 1); + if (index >= 0) this._pendingUrls.splice(index, 1); this.loadNextConfiguration(); @@ -85,21 +87,21 @@ export class ConfigurationManager extends NitroManager implements IConfiguration private parseConfiguration(data: { [index: string]: any }, overrides: boolean = false): boolean { - if(!data) return false; + if (!data) return false; try { const regex = new RegExp(/\${(.*?)}/g); - for(const key in data) + for (const key in data) { let value = data[key]; - if(typeof value === 'string') value = this.interpolate((value as string), regex); + if (typeof value === 'string') value = this.interpolate((value as string), regex); - if(this._definitions.has(key)) + if (this._definitions.has(key)) { - if(overrides) this.setValue(key, value); + if (overrides) this.setValue(key, value); } else { @@ -120,17 +122,17 @@ export class ConfigurationManager extends NitroManager implements IConfiguration public interpolate(value: string, regex: RegExp = null): string { - if(!regex) regex = new RegExp(/\${(.*?)}/g); + if (!regex) regex = new RegExp(/\${(.*?)}/g); const pieces = value.match(regex); - if(pieces && pieces.length) + if (pieces && pieces.length) { - for(const piece of pieces) + for (const piece of pieces) { const existing = (this._definitions.get(this.removeInterpolateKey(piece)) as string); - if(existing) (value = value.replace(piece, existing)); + if (existing) (value = value.replace(piece, existing)); } } @@ -146,12 +148,12 @@ export class ConfigurationManager extends NitroManager implements IConfiguration { let existing = this._definitions.get(key); - if(existing === undefined) + if (existing === undefined) { - if(this._missingKeys.indexOf(key) >= 0) return value; + if (this._missingKeys.indexOf(key) >= 0) return value; this._missingKeys.push(key); - this.logger.warn(`Missing configuration key: ${ key }`); + this.logger.warn(`Missing configuration key: ${key}`); existing = value; } @@ -161,6 +163,26 @@ export class ConfigurationManager extends NitroManager implements IConfiguration public setValue(key: string, value: T): void { + const parts = key.split('.'); + + let last = this._config; + + for (let i = 0; i < parts.length; i++) + { + const part = parts[i].toString(); + + if (i !== (parts.length - 1)) + { + if (!last[part]) last[part] = {}; + + last = last[part]; + + continue; + } + + last[part] = value; + } + this._definitions.set(key, value); } diff --git a/src/core/configuration/IConfigurationManager.ts b/src/core/configuration/IConfigurationManager.ts index ce9b1093..ba2833bc 100644 --- a/src/core/configuration/IConfigurationManager.ts +++ b/src/core/configuration/IConfigurationManager.ts @@ -1,4 +1,4 @@ -import { INitroManager } from '../common/INitroManager'; +import { INitroManager } from '../../api'; export interface IConfigurationManager extends INitroManager { diff --git a/src/core/events/EventDispatcher.ts b/src/core/events/EventDispatcher.ts index f83ba7a3..0a781e32 100644 --- a/src/core/events/EventDispatcher.ts +++ b/src/core/events/EventDispatcher.ts @@ -1,9 +1,7 @@ +import { IDisposable, IEventDispatcher, INitroLogger } from '../../api'; import { Nitro } from '../../nitro/Nitro'; -import { Disposable } from '../common/disposable/Disposable'; -import { IDisposable } from '../common/disposable/IDisposable'; -import { INitroLogger } from '../common/logger/INitroLogger'; -import { NitroLogger } from '../common/logger/NitroLogger'; -import { IEventDispatcher } from './IEventDispatcher'; +import { Disposable } from '../common/Disposable'; +import { NitroLogger } from '../common/NitroLogger'; import { NitroEvent } from './NitroEvent'; export class EventDispatcher extends Disposable implements IEventDispatcher, IDisposable @@ -28,11 +26,11 @@ export class EventDispatcher extends Disposable implements IEventDispatcher, IDi public addEventListener(type: string, callback: Function): void { - if(!type || !callback) return; + if (!type || !callback) return; const existing = this._listeners.get(type); - if(!existing) + if (!existing) { this._listeners.set(type, [callback]); @@ -44,19 +42,19 @@ export class EventDispatcher extends Disposable implements IEventDispatcher, IDi public removeEventListener(type: string, callback: any): void { - if(!type || !callback) return; + if (!type || !callback) return; const existing = this._listeners.get(type); - if(!existing || !existing.length) return; + if (!existing || !existing.length) return; - for(const [i, cb] of existing.entries()) + for (const [i, cb] of existing.entries()) { - if(!cb || (cb !== callback)) continue; + if (!cb || (cb !== callback)) continue; existing.splice(i, 1); - if(!existing.length) this._listeners.delete(type); + if (!existing.length) this._listeners.delete(type); return; } @@ -64,9 +62,9 @@ export class EventDispatcher extends Disposable implements IEventDispatcher, IDi public dispatchEvent(event: NitroEvent): boolean { - if(!event) return false; + if (!event) return false; - if(Nitro.instance.getConfiguration('system.dispatcher.log')) this._logger.log('Dispatched Event', event.type); + if (Nitro.instance.getConfiguration('system.dispatcher.log')) this._logger.log('Dispatched Event', event.type); this.processEvent(event); @@ -77,18 +75,18 @@ export class EventDispatcher extends Disposable implements IEventDispatcher, IDi { const existing = this._listeners.get(event.type); - if(!existing || !existing.length) return; + if (!existing || !existing.length) return; const callbacks = []; - for(const callback of existing) + for (const callback of existing) { - if(!callback) continue; + if (!callback) continue; callbacks.push(callback); } - while(callbacks.length) + while (callbacks.length) { const callback = callbacks.shift(); diff --git a/src/core/events/index.ts b/src/core/events/index.ts index 17a287bc..6b39ee44 100644 --- a/src/core/events/index.ts +++ b/src/core/events/index.ts @@ -1,5 +1,2 @@ export * from './EventDispatcher'; -export * from './IEventDispatcher'; -export * from './ILinkEventTracker'; -export * from './IWorkerEventTracker'; export * from './NitroEvent'; diff --git a/src/core/utils/AdvancedMap.ts b/src/core/utils/AdvancedMap.ts index e1cff566..68a27e69 100644 --- a/src/core/utils/AdvancedMap.ts +++ b/src/core/utils/AdvancedMap.ts @@ -1,4 +1,4 @@ -import { IDisposable } from '../common/disposable/IDisposable'; +import { IDisposable } from '../../api'; export class AdvancedMap implements IDisposable { @@ -14,7 +14,7 @@ export class AdvancedMap implements IDisposable this._array = []; this._keys = []; - if(map) for(const [ key, value ] of map.entries()) this.add(key, value); + if (map) for (const [key, value] of map.entries()) this.add(key, value); } public get length(): number @@ -29,9 +29,9 @@ export class AdvancedMap implements IDisposable public dispose(): void { - if(!this._dictionary) + if (!this._dictionary) { - for(const key of this._dictionary.keys()) this._dictionary.delete(key); + for (const key of this._dictionary.keys()) this._dictionary.delete(key); this._dictionary = null; } @@ -43,7 +43,7 @@ export class AdvancedMap implements IDisposable public reset(): void { - for(const key of this._dictionary.keys()) this._dictionary.delete(key); + for (const key of this._dictionary.keys()) this._dictionary.delete(key); this._length = 0; this._array = []; @@ -52,7 +52,7 @@ export class AdvancedMap implements IDisposable public unshift(key: T, value: U): boolean { - if(this._dictionary.get(key) !== null) return false; + if (this._dictionary.get(key) !== null) return false; this._dictionary.set(key, value); @@ -66,7 +66,7 @@ export class AdvancedMap implements IDisposable public add(key: T, value: U): boolean { - if(this._dictionary.get(key) !== undefined) return false; + if (this._dictionary.get(key) !== undefined) return false; this._dictionary.set(key, value); @@ -82,11 +82,11 @@ export class AdvancedMap implements IDisposable { const value = this._dictionary.get(key); - if(!value) return null; + if (!value) return null; const index = this._array.indexOf(value); - if(index >= 0) + if (index >= 0) { this._array.splice(index, 1); this._keys.splice(index, 1); @@ -101,14 +101,14 @@ export class AdvancedMap implements IDisposable public getWithIndex(index: number): U { - if((index < 0) || (index >= this._length)) return null; + if ((index < 0) || (index >= this._length)) return null; return this._array[index]; } public getKey(index: number): T { - if((index < 0) || (index >= this._length)) return null; + if ((index < 0) || (index >= this._length)) return null; return this._keys[index]; } @@ -145,7 +145,7 @@ export class AdvancedMap implements IDisposable public concatenate(newValues: AdvancedMap): void { - for(const k of newValues._keys) this.add(k, newValues.getValue(k)); + for (const k of newValues._keys) this.add(k, newValues.getValue(k)); } public clone(): AdvancedMap diff --git a/src/nitro/INitro.ts b/src/nitro/INitro.ts index ea44c39c..87309b67 100644 --- a/src/nitro/INitro.ts +++ b/src/nitro/INitro.ts @@ -1,8 +1,6 @@ import { Application } from '@pixi/app'; import { Ticker } from '@pixi/ticker'; -import { IEventDispatcher } from '../core/events/IEventDispatcher'; -import { ILinkEventTracker } from '../core/events/ILinkEventTracker'; -import { IWorkerEventTracker } from '../core/events/IWorkerEventTracker'; +import { IEventDispatcher, ILinkEventTracker, IWorkerEventTracker } from '../api'; import { INitroCore } from '../core/INitroCore'; import { NitroTimer } from '../core/utils/NitroTimer'; import { IRoomManager } from '../room/IRoomManager'; diff --git a/src/nitro/Nitro.ts b/src/nitro/Nitro.ts index 53b0f32e..f4a61e88 100644 --- a/src/nitro/Nitro.ts +++ b/src/nitro/Nitro.ts @@ -2,11 +2,9 @@ import { Application, IApplicationOptions } from '@pixi/app'; import { SCALE_MODES } from '@pixi/constants'; import { settings } from '@pixi/settings'; import { Ticker } from '@pixi/ticker'; +import { IEventDispatcher, ILinkEventTracker, IWorkerEventTracker } from '../api'; import { ConfigurationEvent } from '../core/configuration/ConfigurationEvent'; import { EventDispatcher } from '../core/events/EventDispatcher'; -import { IEventDispatcher } from '../core/events/IEventDispatcher'; -import { ILinkEventTracker } from '../core/events/ILinkEventTracker'; -import { IWorkerEventTracker } from '../core/events/IWorkerEventTracker'; import { NitroEvent } from '../core/events/NitroEvent'; import { INitroCore } from '../core/INitroCore'; import { NitroCore } from '../core/NitroCore'; @@ -72,7 +70,7 @@ export class Nitro extends Application implements INitro { super(options); - if(!Nitro.INSTANCE) Nitro.INSTANCE = this; + if (!Nitro.INSTANCE) Nitro.INSTANCE = this; this._nitroTimer = new NitroTimer(); this._worker = null; @@ -96,12 +94,12 @@ export class Nitro extends Application implements INitro this._core.configuration.events.addEventListener(ConfigurationEvent.LOADED, this.onConfigurationLoadedEvent.bind(this)); this._roomEngine.events.addEventListener(RoomEngineEvent.ENGINE_INITIALIZED, this.onRoomEngineReady.bind(this)); - if(this._worker) this._worker.onmessage = this.createWorkerEvent.bind(this); + if (this._worker) this._worker.onmessage = this.createWorkerEvent.bind(this); } public static bootstrap(): void { - if(Nitro.INSTANCE) + if (Nitro.INSTANCE) { Nitro.INSTANCE.dispose(); @@ -123,25 +121,25 @@ export class Nitro extends Application implements INitro public init(): void { - if(this._isReady || this._isDisposed) return; + if (this._isReady || this._isDisposed) return; - if(this._avatar) this._avatar.init(); + if (this._avatar) this._avatar.init(); - if(this._soundManager) this._soundManager.init(); + if (this._soundManager) this._soundManager.init(); - if(this._roomEngine) + if (this._roomEngine) { this._roomEngine.sessionDataManager = this._sessionDataManager; this._roomEngine.roomSessionManager = this._roomSessionManager; this._roomEngine.roomManager = this._roomManager; - if(this._sessionDataManager) this._sessionDataManager.init(); - if(this._roomSessionManager) this._roomSessionManager.init(); + if (this._sessionDataManager) this._sessionDataManager.init(); + if (this._roomSessionManager) this._roomSessionManager.init(); this._roomEngine.init(); } - if(!this._communication.connection) + if (!this._communication.connection) { throw new Error('No connection found'); } @@ -153,51 +151,51 @@ export class Nitro extends Application implements INitro public dispose(): void { - if(this._isDisposed) return; + if (this._isDisposed) return; - if(this._roomManager) + if (this._roomManager) { this._roomManager.dispose(); this._roomManager = null; } - if(this._roomSessionManager) + if (this._roomSessionManager) { this._roomSessionManager.dispose(); this._roomSessionManager = null; } - if(this._sessionDataManager) + if (this._sessionDataManager) { this._sessionDataManager.dispose(); this._sessionDataManager = null; } - if(this._roomEngine) + if (this._roomEngine) { this._roomEngine.dispose(); this._roomEngine = null; } - if(this._avatar) + if (this._avatar) { this._avatar.dispose(); this._avatar = null; } - if(this._soundManager) + if (this._soundManager) { this._soundManager.dispose(); this._soundManager = null; } - if(this._communication) + if (this._communication) { this._communication.dispose(); @@ -215,7 +213,7 @@ export class Nitro extends Application implements INitro const animationFPS = this.getConfiguration('system.animation.fps', 24); const limitsFPS = this.getConfiguration('system.limits.fps', true); - if(limitsFPS) Nitro.instance.ticker.maxFPS = animationFPS; + if (limitsFPS) Nitro.instance.ticker.maxFPS = animationFPS; } private onRoomEngineReady(event: RoomEngineEvent): void @@ -245,7 +243,7 @@ export class Nitro extends Application implements INitro public addWorkerEventTracker(tracker: IWorkerEventTracker): void { - if(this._workerTrackers.indexOf(tracker) >= 0) return; + if (this._workerTrackers.indexOf(tracker) >= 0) return; this._workerTrackers.push(tracker); } @@ -254,20 +252,20 @@ export class Nitro extends Application implements INitro { const index = this._workerTrackers.indexOf(tracker); - if(index === -1) return; + if (index === -1) return; this._workerTrackers.splice(index, 1); } public createWorkerEvent(message: MessageEvent): void { - if(!message) return; + if (!message) return; const data: { [index: string]: any } = message.data; - for(const tracker of this._workerTrackers) + for (const tracker of this._workerTrackers) { - if(!tracker) continue; + if (!tracker) continue; tracker.workerMessageReceived(data); } @@ -275,14 +273,14 @@ export class Nitro extends Application implements INitro public sendWorkerEvent(message: { [index: string]: any }): void { - if(!message || !this._worker) return; + if (!message || !this._worker) return; this._worker.postMessage(message); } public addLinkEventTracker(tracker: ILinkEventTracker): void { - if(this._linkTrackers.indexOf(tracker) >= 0) return; + if (this._linkTrackers.indexOf(tracker) >= 0) return; this._linkTrackers.push(tracker); } @@ -291,24 +289,24 @@ export class Nitro extends Application implements INitro { const index = this._linkTrackers.indexOf(tracker); - if(index === -1) return; + if (index === -1) return; this._linkTrackers.splice(index, 1); } public createLinkEvent(link: string): void { - if(!link || (link === '')) return; + if (!link || (link === '')) return; - for(const tracker of this._linkTrackers) + for (const tracker of this._linkTrackers) { - if(!tracker) continue; + if (!tracker) continue; const prefix = tracker.eventUrlPrefix; - if(prefix.length > 0) + if (prefix.length > 0) { - if(link.substr(0, prefix.length) === prefix) tracker.linkReceived(link); + if (link.substr(0, prefix.length) === prefix) tracker.linkReceived(link); } else { diff --git a/src/nitro/avatar/IAvatarEffectListener.ts b/src/nitro/avatar/IAvatarEffectListener.ts index c0fd5cf3..0af6db28 100644 --- a/src/nitro/avatar/IAvatarEffectListener.ts +++ b/src/nitro/avatar/IAvatarEffectListener.ts @@ -1,6 +1,6 @@ -import { IDisposable } from '../../core/common/disposable/IDisposable'; +import { IDisposable } from '../../api'; export interface IAvatarEffectListener extends IDisposable { resetEffect(effect: number): void; -} \ No newline at end of file +} diff --git a/src/nitro/avatar/IAvatarImage.ts b/src/nitro/avatar/IAvatarImage.ts index a3260b71..88dd9e02 100644 --- a/src/nitro/avatar/IAvatarImage.ts +++ b/src/nitro/avatar/IAvatarImage.ts @@ -1,7 +1,6 @@ import { RenderTexture } from '@pixi/core'; import { Sprite } from '@pixi/sprite'; -import { IGraphicAsset } from '../../api'; -import { IDisposable } from '../../core/common/disposable/IDisposable'; +import { IDisposable, IGraphicAsset } from '../../api'; import { IAnimationLayerData } from './animation/IAnimationLayerData'; import { IAvatarDataContainer } from './animation/IAvatarDataContainer'; import { ISpriteDataContainer } from './animation/ISpriteDataContainer'; diff --git a/src/nitro/avatar/IAvatarImageListener.ts b/src/nitro/avatar/IAvatarImageListener.ts index 9a0b0ddf..36a0007d 100644 --- a/src/nitro/avatar/IAvatarImageListener.ts +++ b/src/nitro/avatar/IAvatarImageListener.ts @@ -1,4 +1,4 @@ -import { IDisposable } from '../../core/common/disposable/IDisposable'; +import { IDisposable } from '../../api'; export interface IAvatarImageListener extends IDisposable { diff --git a/src/nitro/avatar/IAvatarRenderManager.ts b/src/nitro/avatar/IAvatarRenderManager.ts index 6fcda479..427bd3b1 100644 --- a/src/nitro/avatar/IAvatarRenderManager.ts +++ b/src/nitro/avatar/IAvatarRenderManager.ts @@ -1,5 +1,4 @@ -import { IAssetManager, IGraphicAsset } from '../../api'; -import { INitroManager } from '../../core/common/INitroManager'; +import { IAssetManager, IGraphicAsset, INitroManager } from '../../api'; import { AvatarAssetDownloadManager } from './AvatarAssetDownloadManager'; import { AvatarStructure } from './AvatarStructure'; import { IAvatarEffectListener } from './IAvatarEffectListener'; diff --git a/src/nitro/camera/IRoomCameraWidgetManager.ts b/src/nitro/camera/IRoomCameraWidgetManager.ts index 9cf9dd30..712563ff 100644 --- a/src/nitro/camera/IRoomCameraWidgetManager.ts +++ b/src/nitro/camera/IRoomCameraWidgetManager.ts @@ -1,5 +1,5 @@ import { Resource, Texture } from '@pixi/core'; -import { IEventDispatcher } from '../../core'; +import { IEventDispatcher } from '../../api'; import { IRoomCameraWidgetEffect } from './IRoomCameraWidgetEffect'; import { IRoomCameraWidgetSelectedEffect } from './IRoomCameraWidgetSelectedEffect'; diff --git a/src/nitro/camera/RoomCameraWidgetManager.ts b/src/nitro/camera/RoomCameraWidgetManager.ts index 0475fee3..70fe5e2d 100644 --- a/src/nitro/camera/RoomCameraWidgetManager.ts +++ b/src/nitro/camera/RoomCameraWidgetManager.ts @@ -1,6 +1,7 @@ import { Texture } from '@pixi/core'; import { ColorMatrix, ColorMatrixFilter } from '@pixi/filter-color-matrix'; -import { EventDispatcher, IEventDispatcher, NitroContainer, NitroSprite } from '../../core'; +import { IEventDispatcher } from '../../api'; +import { EventDispatcher, NitroContainer, NitroSprite } from '../../core'; import { TextureUtils } from '../../room'; import { Nitro } from '../Nitro'; import { RoomCameraWidgetManagerEvent } from './events/RoomCameraWidgetManagerEvent'; diff --git a/src/nitro/communication/INitroCommunicationManager.ts b/src/nitro/communication/INitroCommunicationManager.ts index e5a8af3a..5c22fb53 100644 --- a/src/nitro/communication/INitroCommunicationManager.ts +++ b/src/nitro/communication/INitroCommunicationManager.ts @@ -1,6 +1,4 @@ -import { IMessageEvent } from '../../core'; -import { INitroManager } from '../../core/common/INitroManager'; -import { IConnection } from '../../core/communication/connections/IConnection'; +import { IConnection, IMessageEvent, INitroManager } from '../../api'; import { NitroCommunicationDemo } from './demo/NitroCommunicationDemo'; export interface INitroCommunicationManager extends INitroManager diff --git a/src/nitro/communication/NitroCommunicationManager.ts b/src/nitro/communication/NitroCommunicationManager.ts index 2854b946..0a5731fa 100644 --- a/src/nitro/communication/NitroCommunicationManager.ts +++ b/src/nitro/communication/NitroCommunicationManager.ts @@ -1,10 +1,6 @@ -import { IMessageEvent } from '../../core'; +import { ICommunicationManager, IConnection, IConnectionStateListener, IMessageConfiguration, IMessageEvent } from '../../api'; import { NitroManager } from '../../core/common/NitroManager'; -import { IConnection } from '../../core/communication/connections/IConnection'; -import { IConnectionStateListener } from '../../core/communication/connections/IConnectionStateListener'; import { SocketConnectionEvent } from '../../core/communication/events/SocketConnectionEvent'; -import { ICommunicationManager } from '../../core/communication/ICommunicationManager'; -import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration'; import { NitroEvent } from '../../core/events/NitroEvent'; import { Nitro } from '../Nitro'; import { NitroCommunicationDemo } from './demo/NitroCommunicationDemo'; @@ -38,7 +34,7 @@ export class NitroCommunicationManager extends NitroManager implements INitroCom protected onInit(): void { - if(this._connection) return; + if (this._connection) return; Nitro.instance.events.addEventListener(NitroCommunicationDemoEvent.CONNECTION_AUTHENTICATED, this.onConnectionAuthenticatedEvent); @@ -50,16 +46,16 @@ export class NitroCommunicationManager extends NitroManager implements INitroCom this._connection.addEventListener(SocketConnectionEvent.CONNECTION_CLOSED, this.onConnectionClosedEvent); this._connection.addEventListener(SocketConnectionEvent.CONNECTION_ERROR, this.onConnectionErrorEvent); - if(this._demo) this._demo.init(); + if (this._demo) this._demo.init(); this._connection.init(Nitro.instance.getConfiguration('socket.url')); } protected onDispose(): void { - if(this._demo) this._demo.dispose(); + if (this._demo) this._demo.dispose(); - if(this._connection) + if (this._connection) { this._connection.removeEventListener(SocketConnectionEvent.CONNECTION_OPENED, this.onConnectionOpenedEvent); this._connection.removeEventListener(SocketConnectionEvent.CONNECTION_CLOSED, this.onConnectionClosedEvent); @@ -90,24 +86,24 @@ export class NitroCommunicationManager extends NitroManager implements INitroCom { this.logger.log('Connection Authenticated'); - if(this._connection) this._connection.authenticated(); + if (this._connection) this._connection.authenticated(); } public connectionInit(socketUrl: string): void { - this.logger.log(`Initializing Connection: ${ socketUrl }`); + this.logger.log(`Initializing Connection: ${socketUrl}`); } public registerMessageEvent(event: IMessageEvent): IMessageEvent { - if(this._connection) this._connection.addMessageEvent(event); + if (this._connection) this._connection.addMessageEvent(event); return event; } public removeMessageEvent(event: IMessageEvent): void { - if(!this._connection) return; + if (!this._connection) return; this._connection.removeMessageEvent(event); } diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index 69d887e9..9908d403 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -1,4 +1,4 @@ -import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration'; +import { IMessageConfiguration } from '../../api'; import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddFavouriteRoomMessageComposer, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, BuyMarketplaceOfferMessageComposer, BuyMarketplaceTokensMessageComposer, CallForHelpFromForumMessageMessageComposer, CallForHelpFromForumThreadMessageComposer, CallForHelpFromIMMessageComposer, CallForHelpFromPhotoMessageComposer, CallForHelpFromSelfieMessageComposer, CallForHelpMessageComposer, CallForHelpPendingCallsDeletedMessageEvent, CallForHelpPendingCallsMessageEvent, CallForHelpReplyMessageEvent, CancelEventMessageComposer, CancelMarketplaceOfferMessageComposer, CanCreateRoomEvent, CanCreateRoomMessageComposer, CategoriesWithVisitorCountEvent, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, ChatReviewGuideDecidesOnOfferMessageComposer, ChatReviewGuideDetachedMessageComposer, ChatReviewGuideVoteMessageComposer, ChatReviewSessionCreateMessageComposer, ChatReviewSessionDetachedMessageEvent, ChatReviewSessionOfferedToGuideMessageEvent, ChatReviewSessionResultsMessageEvent, ChatReviewSessionStartedMessageEvent, ChatReviewSessionVotingStatusMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, CloseIssueDefaultActionMessageComposer, CloseIssuesMessageComposer, ClubGiftNotificationEvent, CompetitionRoomsDataMessageEvent, CompetitionRoomsSearchMessageComposer, ControlYoutubeDisplayPlaybackMessageComposer, ConvertedRoomIdEvent, CustomUserNotificationMessageEvent, DeleteFavouriteRoomMessageComposer, DeletePendingCallsForHelpMessageComposer, DirectSMSClubBuyAvailableMessageEvent, DoorbellMessageEvent, EditEventMessageComposer, FavouriteChangedEvent, FavouritesEvent, FigureUpdateEvent, FlatAccessDeniedMessageEvent, FlatCreatedEvent, ForwardToARandomPromotedRoomMessageComposer, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, ForwardToSomeRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCategoriesWithUserCountMessageComposer, GetCfhChatlogMessageComposer, GetCfhStatusMessageComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetExtendedProfileByNameMessageComposer, GetFaqCategoryMessageComposer, GetFaqTextMessageComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetGuestRoomMessageComposer, GetGuestRoomResultEvent, GetGuideReportingStatusMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetHabboGroupBadgesMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMarketplaceConfigurationMessageComposer, GetMarketplaceItemStatsComposer, GetMarketplaceOffersMessageComposer, GetMarketplaceOwnOffersMessageComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialRoomsMessageComposer, GetOfficialSongIdMessageComposer, GetPendingCallsForHelpMessageComposer, GetPopularRoomTagsMessageComposer, GetQuizQuestionsComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GoToFlatMessageComposer, GuideOnDutyStatusMessageEvent, GuideSessionAttachedMessageEvent, GuideSessionCreateMessageComposer, GuideSessionDetachedMessageEvent, GuideSessionEndedMessageEvent, GuideSessionErrorMessageEvent, GuideSessionFeedbackMessageComposer, GuideSessionGetRequesterRoomMessageComposer, GuideSessionGuideDecidesMessageComposer, GuideSessionInvitedToGuideRoomMessageEvent, GuideSessionInviteRequesterMessageComposer, GuideSessionIsTypingMessageComposer, GuideSessionMessageMessageComposer, GuideSessionMessageMessageEvent, GuideSessionOnDutyUpdateMessageComposer, GuideSessionPartnerIsTypingMessageEvent, GuideSessionReportMessageComposer, GuideSessionRequesterCancelsMessageComposer, GuideSessionRequesterRoomMessageEvent, GuideSessionResolvedMessageComposer, GuideSessionStartedMessageEvent, GuideTicketCreationResultMessageEvent, GuideTicketResolutionMessageEvent, GuildBaseSearchMessageComposer, HabboClubExtendOfferMessageEvent, HabboGroupBadgesMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelMergeNameChangeEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, IssueCloseNotificationMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, ModToolPreferencesComposer, ModToolSanctionComposer, MyFavouriteRoomsSearchMessageComposer, MyFrequentRoomHistorySearchMessageComposer, MyFriendsRoomsSearchMessageComposer, MyGuildBasesSearchMessageComposer, MyRecommendedRoomsMessageComposer, MyRoomHistorySearchMessageComposer, MyRoomRightsSearchMessageComposer, MyRoomsSearchMessageComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PetSupplementedNotificationEvent, PickIssuesMessageComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PollAnswerComposer, PollContentsEvent, PollErrorEvent, PollOfferEvent, PollRejectComposer, PollStartComposer, PopularRoomsSearchMessageComposer, PostMessageMessageComposer, PostQuizAnswersComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, QuestionAnsweredEvent, QuestionEvent, QuestionFinishedEvent, QuizDataMessageEvent, QuizResultsMessageEvent, RateFlatMessageComposer, RedeemMarketplaceOfferCreditsMessageComposer, ReleaseIssuesMessageComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdEventTabAdClickedComposer, RoomAdEventTabViewedComposer, RoomAdPurchaseInfoEvent, RoomAdSearchMessageComposer, RoomCompetitionInitMessageComposer, RoomEventCancelEvent, RoomEventEvent, RoomsWhereMyFriendsAreSearchMessageComposer, RoomsWithHighestScoreSearchMessageComposer, RoomTextSearchMessageComposer, RoomThumbnailUpdateResultEvent, RoomUnitGiveHandItemPetComposer, ScrGetKickbackInfoMessageComposer, ScrSendKickbackInfoMessageEvent, SearchFaqsMessageComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetRoomSessionTagsMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackMessageEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, ToggleStaffPickMessageComposer, TraxSongInfoMessageEvent, TryPhoneNumberMessageComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UpdateForumReadMarkerMessageComposer, UpdateForumSettingsMessageComposer, UpdateHomeRoomMessageComposer, UpdateRoomThumbnailMessageComposer, UpdateThreadMessageComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VerifyCodeMessageComposer, VoteForRoomMessageComposer, WardrobeMessageEvent } from './messages'; import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent'; import { BotAddedToInventoryEvent, BotInventoryMessageEvent, BotReceivedMessageEvent, BotRemovedFromInventoryEvent } from './messages/incoming/bots'; diff --git a/src/nitro/communication/demo/NitroCommunicationDemo.ts b/src/nitro/communication/demo/NitroCommunicationDemo.ts index 04a406f4..2fe5243e 100644 --- a/src/nitro/communication/demo/NitroCommunicationDemo.ts +++ b/src/nitro/communication/demo/NitroCommunicationDemo.ts @@ -1,5 +1,5 @@ +import { IConnection } from '../../../api'; import { NitroManager } from '../../../core/common/NitroManager'; -import { IConnection } from '../../../core/communication/connections/IConnection'; import { SocketConnectionEvent } from '../../../core/communication/events/SocketConnectionEvent'; import { Nitro } from '../../Nitro'; import { INitroCommunicationManager } from '../INitroCommunicationManager'; @@ -41,7 +41,7 @@ export class NitroCommunicationDemo extends NitroManager { const connection = this._communication.connection; - if(connection) + if (connection) { connection.addEventListener(SocketConnectionEvent.CONNECTION_OPENED, this.onConnectionOpenedEvent); connection.addEventListener(SocketConnectionEvent.CONNECTION_CLOSED, this.onConnectionClosedEvent); @@ -56,7 +56,7 @@ export class NitroCommunicationDemo extends NitroManager { const connection = this._communication.connection; - if(connection) + if (connection) { connection.removeEventListener(SocketConnectionEvent.CONNECTION_OPENED, this.onConnectionOpenedEvent); connection.removeEventListener(SocketConnectionEvent.CONNECTION_CLOSED, this.onConnectionClosedEvent); @@ -74,13 +74,13 @@ export class NitroCommunicationDemo extends NitroManager { const connection = this._communication.connection; - if(!connection) return; + if (!connection) return; this._didConnect = true; this.dispatchCommunicationDemoEvent(NitroCommunicationDemoEvent.CONNECTION_ESTABLISHED, connection); - if(Nitro.instance.getConfiguration('system.pong.manually', false)) this.startPonging(); + if (Nitro.instance.getConfiguration('system.pong.manually', false)) this.startPonging(); this.startHandshake(connection); @@ -93,18 +93,18 @@ export class NitroCommunicationDemo extends NitroManager { const connection = this._communication.connection; - if(!connection) return; + if (!connection) return; this.stopPonging(); - if(this._didConnect) this.dispatchCommunicationDemoEvent(NitroCommunicationDemoEvent.CONNECTION_CLOSED, connection); + if (this._didConnect) this.dispatchCommunicationDemoEvent(NitroCommunicationDemoEvent.CONNECTION_CLOSED, connection); } private onConnectionErrorEvent(event: CloseEvent): void { const connection = this._communication.connection; - if(!connection) return; + if (!connection) return; this.stopPonging(); @@ -113,9 +113,9 @@ export class NitroCommunicationDemo extends NitroManager private tryAuthentication(connection: IConnection): void { - if(!connection || !this.getSSO()) + if (!connection || !this.getSSO()) { - if(!this.getSSO()) + if (!this.getSSO()) { this.logger.error('Login without an SSO ticket is not supported'); } @@ -130,14 +130,14 @@ export class NitroCommunicationDemo extends NitroManager private onClientPingEvent(event: ClientPingEvent): void { - if(!event || !event.connection) return; + if (!event || !event.connection) return; this.sendPong(event.connection); } private onAuthenticatedEvent(event: AuthenticatedEvent): void { - if(!event || !event.connection) return; + if (!event || !event.connection) return; this.completeHandshake(event.connection); @@ -169,7 +169,7 @@ export class NitroCommunicationDemo extends NitroManager private stopPonging(): void { - if(!this._pongInterval) return; + if (!this._pongInterval) return; clearInterval(this._pongInterval); @@ -180,7 +180,7 @@ export class NitroCommunicationDemo extends NitroManager { connection = ((connection || this._communication.connection) || null); - if(!connection) return; + if (!connection) return; connection.send(new PongMessageComposer()); } diff --git a/src/nitro/communication/demo/NitroCommunicationDemoEvent.ts b/src/nitro/communication/demo/NitroCommunicationDemoEvent.ts index 9f16b448..f1778da8 100644 --- a/src/nitro/communication/demo/NitroCommunicationDemoEvent.ts +++ b/src/nitro/communication/demo/NitroCommunicationDemoEvent.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { NitroEvent } from '../../../core/events/NitroEvent'; export class NitroCommunicationDemoEvent extends NitroEvent @@ -24,4 +24,4 @@ export class NitroCommunicationDemoEvent extends NitroEvent { return this._connection; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/incoming/advertisement/InterstitialMessageEvent.ts b/src/nitro/communication/messages/incoming/advertisement/InterstitialMessageEvent.ts index 865a949e..07ee3f98 100644 --- a/src/nitro/communication/messages/incoming/advertisement/InterstitialMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/advertisement/InterstitialMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { InterstitialMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/advertisement/RoomAdErrorEvent.ts b/src/nitro/communication/messages/incoming/advertisement/RoomAdErrorEvent.ts index 3d15bde8..77d7cf3e 100644 --- a/src/nitro/communication/messages/incoming/advertisement/RoomAdErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/advertisement/RoomAdErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomAdErrorMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/availability/AvailabilityStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/availability/AvailabilityStatusMessageEvent.ts index 6a580165..a492a043 100644 --- a/src/nitro/communication/messages/incoming/availability/AvailabilityStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/availability/AvailabilityStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { AvailabilityStatusMessageParser } from '../../parser/availability/AvailabilityStatusMessageParser'; diff --git a/src/nitro/communication/messages/incoming/availability/AvailabilityTimeMessageEvent.ts b/src/nitro/communication/messages/incoming/availability/AvailabilityTimeMessageEvent.ts index 5784493f..1ba18aab 100644 --- a/src/nitro/communication/messages/incoming/availability/AvailabilityTimeMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/availability/AvailabilityTimeMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { AvailabilityTimeMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/availability/HotelClosedAndOpensEvent.ts b/src/nitro/communication/messages/incoming/availability/HotelClosedAndOpensEvent.ts index a1e18b0b..0c1759e7 100644 --- a/src/nitro/communication/messages/incoming/availability/HotelClosedAndOpensEvent.ts +++ b/src/nitro/communication/messages/incoming/availability/HotelClosedAndOpensEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HotelClosedAndOpensMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/availability/HotelClosesAndWillOpenAtEvent.ts b/src/nitro/communication/messages/incoming/availability/HotelClosesAndWillOpenAtEvent.ts index b147dbb9..ad4ee56f 100644 --- a/src/nitro/communication/messages/incoming/availability/HotelClosesAndWillOpenAtEvent.ts +++ b/src/nitro/communication/messages/incoming/availability/HotelClosesAndWillOpenAtEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HotelClosesAndWillOpenAtMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/availability/HotelWillCloseInMinutesEvent.ts b/src/nitro/communication/messages/incoming/availability/HotelWillCloseInMinutesEvent.ts index 3f8dc247..ed16faee 100644 --- a/src/nitro/communication/messages/incoming/availability/HotelWillCloseInMinutesEvent.ts +++ b/src/nitro/communication/messages/incoming/availability/HotelWillCloseInMinutesEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HotelWillCloseInMinutesMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/availability/MaintenanceStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/availability/MaintenanceStatusMessageEvent.ts index 54f665da..8006558e 100644 --- a/src/nitro/communication/messages/incoming/availability/MaintenanceStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/availability/MaintenanceStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MaintenanceStatusMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/avatar/ChangeUserNameResultMessageEvent.ts b/src/nitro/communication/messages/incoming/avatar/ChangeUserNameResultMessageEvent.ts index d75817fa..01c02396 100644 --- a/src/nitro/communication/messages/incoming/avatar/ChangeUserNameResultMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/avatar/ChangeUserNameResultMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ChangeUserNameResultMessageParser } from '../../parser/avatar/ChangeUserNameResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/avatar/CheckUserNameResultMessageEvent.ts b/src/nitro/communication/messages/incoming/avatar/CheckUserNameResultMessageEvent.ts index 598f5a47..22e61167 100644 --- a/src/nitro/communication/messages/incoming/avatar/CheckUserNameResultMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/avatar/CheckUserNameResultMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CheckUserNameResultMessageParser } from '../../parser/avatar/CheckUserNameResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/avatar/FigureUpdateEvent.ts b/src/nitro/communication/messages/incoming/avatar/FigureUpdateEvent.ts index 876cea76..b8938155 100644 --- a/src/nitro/communication/messages/incoming/avatar/FigureUpdateEvent.ts +++ b/src/nitro/communication/messages/incoming/avatar/FigureUpdateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FigureUpdateParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/avatar/OutfitData.ts b/src/nitro/communication/messages/incoming/avatar/OutfitData.ts index 9c29c36c..4acde6db 100644 --- a/src/nitro/communication/messages/incoming/avatar/OutfitData.ts +++ b/src/nitro/communication/messages/incoming/avatar/OutfitData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class OutfitData { diff --git a/src/nitro/communication/messages/incoming/avatar/WardrobeMessageEvent.ts b/src/nitro/communication/messages/incoming/avatar/WardrobeMessageEvent.ts index 511aadcc..48435186 100644 --- a/src/nitro/communication/messages/incoming/avatar/WardrobeMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/avatar/WardrobeMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { WardrobeMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/bots/BotAddedToInventoryEvent.ts b/src/nitro/communication/messages/incoming/bots/BotAddedToInventoryEvent.ts index 710d708e..756ed488 100644 --- a/src/nitro/communication/messages/incoming/bots/BotAddedToInventoryEvent.ts +++ b/src/nitro/communication/messages/incoming/bots/BotAddedToInventoryEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BotAddedToInventoryParser } from '../../parser/bots/BotAddedToInventoryParser'; diff --git a/src/nitro/communication/messages/incoming/bots/BotInventoryMessageEvent.ts b/src/nitro/communication/messages/incoming/bots/BotInventoryMessageEvent.ts index a1473591..5d3ee304 100644 --- a/src/nitro/communication/messages/incoming/bots/BotInventoryMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/bots/BotInventoryMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BotInventoryMessageParser } from '../../parser/bots/BotInventoryMessageParser'; diff --git a/src/nitro/communication/messages/incoming/bots/BotReceivedMessageEvent.ts b/src/nitro/communication/messages/incoming/bots/BotReceivedMessageEvent.ts index 2a1d77a6..4e0edf02 100644 --- a/src/nitro/communication/messages/incoming/bots/BotReceivedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/bots/BotReceivedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BotReceivedMessageParser } from '../../parser/bots/BotReceivedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/bots/BotRemovedFromInventoryEvent.ts b/src/nitro/communication/messages/incoming/bots/BotRemovedFromInventoryEvent.ts index ffe8fdc7..58d6e86d 100644 --- a/src/nitro/communication/messages/incoming/bots/BotRemovedFromInventoryEvent.ts +++ b/src/nitro/communication/messages/incoming/bots/BotRemovedFromInventoryEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BotRemovedFromInventoryParser } from '../../parser/bots/BotRemovedFromInventoryParser'; diff --git a/src/nitro/communication/messages/incoming/callforhelp/CallForHelpCategoryData.ts b/src/nitro/communication/messages/incoming/callforhelp/CallForHelpCategoryData.ts index 45611642..74c7bc11 100644 --- a/src/nitro/communication/messages/incoming/callforhelp/CallForHelpCategoryData.ts +++ b/src/nitro/communication/messages/incoming/callforhelp/CallForHelpCategoryData.ts @@ -1,4 +1,4 @@ -import { IDisposable, IMessageDataWrapper } from '../../../../../core'; +import { IDisposable, IMessageDataWrapper } from '../../../../../api'; import { INamed } from '../moderation'; import { CallForHelpTopicData } from './CallForHelpTopicData'; @@ -15,7 +15,7 @@ export class CallForHelpCategoryData implements INamed, IDisposable let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._topics.push(new CallForHelpTopicData(wrapper)); @@ -25,7 +25,7 @@ export class CallForHelpCategoryData implements INamed, IDisposable public dispose(): void { - if(this._disposed) return; + if (this._disposed) return; this._disposed = true; this._topics = null; diff --git a/src/nitro/communication/messages/incoming/callforhelp/CallForHelpTopicData.ts b/src/nitro/communication/messages/incoming/callforhelp/CallForHelpTopicData.ts index c41c3630..dc485bd7 100644 --- a/src/nitro/communication/messages/incoming/callforhelp/CallForHelpTopicData.ts +++ b/src/nitro/communication/messages/incoming/callforhelp/CallForHelpTopicData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { INamed } from '../moderation'; export class CallForHelpTopicData implements INamed diff --git a/src/nitro/communication/messages/incoming/callforhelp/CfhSanctionMessageEvent.ts b/src/nitro/communication/messages/incoming/callforhelp/CfhSanctionMessageEvent.ts index 15762a6b..c95803df 100644 --- a/src/nitro/communication/messages/incoming/callforhelp/CfhSanctionMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/callforhelp/CfhSanctionMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CfhSanctionMessageParser } from '../../parser/callforhelp/CfhSanctionMessageParser'; diff --git a/src/nitro/communication/messages/incoming/callforhelp/CfhSanctionTypeData.ts b/src/nitro/communication/messages/incoming/callforhelp/CfhSanctionTypeData.ts index 6cdf23d4..9290b4d1 100644 --- a/src/nitro/communication/messages/incoming/callforhelp/CfhSanctionTypeData.ts +++ b/src/nitro/communication/messages/incoming/callforhelp/CfhSanctionTypeData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { INamed } from '../moderation'; export class CfhSanctionTypeData implements INamed @@ -17,9 +17,9 @@ export class CfhSanctionTypeData implements INamed this._probationDays = wrapper.readInt(); this._avatarOnly = wrapper.readBoolean(); - if(wrapper.bytesAvailable) this._tradeLockInfo = wrapper.readString(); + if (wrapper.bytesAvailable) this._tradeLockInfo = wrapper.readString(); - if(wrapper.bytesAvailable) this._machineBanInfo = wrapper.readString(); + if (wrapper.bytesAvailable) this._machineBanInfo = wrapper.readString(); } public get name(): string diff --git a/src/nitro/communication/messages/incoming/callforhelp/CfhTopicsInitEvent.ts b/src/nitro/communication/messages/incoming/callforhelp/CfhTopicsInitEvent.ts index 0b3b5022..6788922a 100644 --- a/src/nitro/communication/messages/incoming/callforhelp/CfhTopicsInitEvent.ts +++ b/src/nitro/communication/messages/incoming/callforhelp/CfhTopicsInitEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CfhTopicsInitMessageParser } from '../../parser/callforhelp/CfhTopicsInitMessageParser'; diff --git a/src/nitro/communication/messages/incoming/callforhelp/SanctionStatusEvent.ts b/src/nitro/communication/messages/incoming/callforhelp/SanctionStatusEvent.ts index 2a9ce7aa..aaf293ed 100644 --- a/src/nitro/communication/messages/incoming/callforhelp/SanctionStatusEvent.ts +++ b/src/nitro/communication/messages/incoming/callforhelp/SanctionStatusEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { SanctionStatusMessageParser } from '../../parser/callforhelp'; diff --git a/src/nitro/communication/messages/incoming/camera/CameraPublishStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/camera/CameraPublishStatusMessageEvent.ts index 88150612..7da5d50f 100644 --- a/src/nitro/communication/messages/incoming/camera/CameraPublishStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/camera/CameraPublishStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CameraPublishStatusMessageParser } from '../../parser/camera/CameraPublishStatusMessageParser'; diff --git a/src/nitro/communication/messages/incoming/camera/CameraPurchaseOKMessageEvent.ts b/src/nitro/communication/messages/incoming/camera/CameraPurchaseOKMessageEvent.ts index dac28290..4800dff4 100644 --- a/src/nitro/communication/messages/incoming/camera/CameraPurchaseOKMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/camera/CameraPurchaseOKMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CameraPurchaseOKMessageParser } from '../../parser/camera/CameraPurchaseOKMessageParser'; diff --git a/src/nitro/communication/messages/incoming/camera/CameraStorageUrlMessageEvent.ts b/src/nitro/communication/messages/incoming/camera/CameraStorageUrlMessageEvent.ts index 1d29fea0..2e2e90d9 100644 --- a/src/nitro/communication/messages/incoming/camera/CameraStorageUrlMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/camera/CameraStorageUrlMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CameraStorageUrlMessageParser } from '../../parser/camera/CameraStorageUrlMessageParser'; diff --git a/src/nitro/communication/messages/incoming/camera/CompetitionStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/camera/CompetitionStatusMessageEvent.ts index 2c87c7b8..6fb479f5 100644 --- a/src/nitro/communication/messages/incoming/camera/CompetitionStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/camera/CompetitionStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CompetitionStatusMessageParser } from '../../parser/camera/CompetitionStatusMessageParser'; diff --git a/src/nitro/communication/messages/incoming/camera/InitCameraMessageEvent.ts b/src/nitro/communication/messages/incoming/camera/InitCameraMessageEvent.ts index 50a36acd..b42c63cc 100644 --- a/src/nitro/communication/messages/incoming/camera/InitCameraMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/camera/InitCameraMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { InitCameraMessageParser } from '../../parser/camera/InitCameraMessageParser'; diff --git a/src/nitro/communication/messages/incoming/camera/ThumbnailStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/camera/ThumbnailStatusMessageEvent.ts index f48dd727..e2a4e40f 100644 --- a/src/nitro/communication/messages/incoming/camera/ThumbnailStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/camera/ThumbnailStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ThumbnailStatusMessageParser } from '../../parser/camera/ThumbnailStatusMessageParser'; diff --git a/src/nitro/communication/messages/incoming/campaign/CampaignCalendarDataMessageEvent.ts b/src/nitro/communication/messages/incoming/campaign/CampaignCalendarDataMessageEvent.ts index c8ba5bbd..046b133c 100644 --- a/src/nitro/communication/messages/incoming/campaign/CampaignCalendarDataMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/campaign/CampaignCalendarDataMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CampaignCalendarDataMessageParser } from '../../parser/campaign'; diff --git a/src/nitro/communication/messages/incoming/campaign/CampaignCalendarDoorOpenedMessageEvent.ts b/src/nitro/communication/messages/incoming/campaign/CampaignCalendarDoorOpenedMessageEvent.ts index 48911446..a8b3c37a 100644 --- a/src/nitro/communication/messages/incoming/campaign/CampaignCalendarDoorOpenedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/campaign/CampaignCalendarDoorOpenedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CampaignCalendarDoorOpenedMessageParser } from '../../parser/campaign'; diff --git a/src/nitro/communication/messages/incoming/catalog/BonusRareInfoMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/BonusRareInfoMessageEvent.ts index 2b66b732..f23ca691 100644 --- a/src/nitro/communication/messages/incoming/catalog/BonusRareInfoMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/BonusRareInfoMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BonusRareInfoMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/BuildersClubFurniCountMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/BuildersClubFurniCountMessageEvent.ts index 31d188b1..15824747 100644 --- a/src/nitro/communication/messages/incoming/catalog/BuildersClubFurniCountMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/BuildersClubFurniCountMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BuildersClubFurniCountMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/BuildersClubSubscriptionStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/BuildersClubSubscriptionStatusMessageEvent.ts index da70210d..0bde526e 100644 --- a/src/nitro/communication/messages/incoming/catalog/BuildersClubSubscriptionStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/BuildersClubSubscriptionStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BuildersClubSubscriptionStatusMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/BundleDiscountRuleset.ts b/src/nitro/communication/messages/incoming/catalog/BundleDiscountRuleset.ts index 82fde8fe..9ec7b9c7 100644 --- a/src/nitro/communication/messages/incoming/catalog/BundleDiscountRuleset.ts +++ b/src/nitro/communication/messages/incoming/catalog/BundleDiscountRuleset.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class BundleDiscountRuleset { @@ -18,7 +18,7 @@ export class BundleDiscountRuleset let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._Str_16144.push(wrapper.readInt()); diff --git a/src/nitro/communication/messages/incoming/catalog/BundleDiscountRulesetMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/BundleDiscountRulesetMessageEvent.ts index b5260693..a25ac574 100644 --- a/src/nitro/communication/messages/incoming/catalog/BundleDiscountRulesetMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/BundleDiscountRulesetMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BundleDiscountRulesetMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogLocalizationData.ts b/src/nitro/communication/messages/incoming/catalog/CatalogLocalizationData.ts index 70e25015..b0379ce0 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogLocalizationData.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogLocalizationData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class CatalogLocalizationData { @@ -12,7 +12,7 @@ export class CatalogLocalizationData let totalImages = wrapper.readInt(); - while(totalImages > 0) + while (totalImages > 0) { this._images.push(wrapper.readString()); @@ -21,7 +21,7 @@ export class CatalogLocalizationData let totalTexts = wrapper.readInt(); - while(totalTexts > 0) + while (totalTexts > 0) { this._texts.push(wrapper.readString()); diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogPageExpirationEvent.ts b/src/nitro/communication/messages/incoming/catalog/CatalogPageExpirationEvent.ts index a3047cc9..e337b58a 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogPageExpirationEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogPageExpirationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CatalogPageExpirationParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageEvent.ts index b959185a..f9e4f70c 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CatalogPageMessageParser } from '../../parser/catalog/CatalogPageMessageParser'; diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageOfferData.ts b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageOfferData.ts index e9cfd384..51f9f981 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageOfferData.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageOfferData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { CatalogPageMessageProductData } from './CatalogPageMessageProductData'; export class CatalogPageMessageOfferData @@ -30,7 +30,7 @@ export class CatalogPageMessageOfferData let totalProducts = wrapper.readInt(); - while(totalProducts > 0) + while (totalProducts > 0) { this._products.push(new CatalogPageMessageProductData(wrapper)); diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageProductData.ts b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageProductData.ts index d73bb05f..b0dcb09b 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageProductData.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageProductData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class CatalogPageMessageProductData { @@ -17,7 +17,7 @@ export class CatalogPageMessageProductData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -40,7 +40,7 @@ export class CatalogPageMessageProductData { this._productType = wrapper.readString(); - switch(this._productType) + switch (this._productType) { case CatalogPageMessageProductData.B: this._extraParam = wrapper.readString(); @@ -52,7 +52,7 @@ export class CatalogPageMessageProductData this._productCount = wrapper.readInt(); this._uniqueLimitedItem = wrapper.readBoolean(); - if(this._uniqueLimitedItem) + if (this._uniqueLimitedItem) { this._uniqueLimitedItemSeriesSize = wrapper.readInt(); this._uniqueLimitedItemsLeft = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogPageWithEarliestExpiryMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/CatalogPageWithEarliestExpiryMessageEvent.ts index a9fbf567..2a22e3fd 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogPageWithEarliestExpiryMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogPageWithEarliestExpiryMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CatalogPageWithEarliestExpiryMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogPagesListEvent.ts b/src/nitro/communication/messages/incoming/catalog/CatalogPagesListEvent.ts index bc599b6a..bbee5241 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogPagesListEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogPagesListEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CatalogIndexMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogPublishedMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/CatalogPublishedMessageEvent.ts index dcd39b36..54416cdc 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogPublishedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogPublishedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CatalogPublishedMessageParser } from '../../parser/catalog/CatalogPublishedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/catalog/ClubGiftData.ts b/src/nitro/communication/messages/incoming/catalog/ClubGiftData.ts index 56be33d9..d5664011 100644 --- a/src/nitro/communication/messages/incoming/catalog/ClubGiftData.ts +++ b/src/nitro/communication/messages/incoming/catalog/ClubGiftData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class ClubGiftData { diff --git a/src/nitro/communication/messages/incoming/catalog/ClubGiftInfoEvent.ts b/src/nitro/communication/messages/incoming/catalog/ClubGiftInfoEvent.ts index 6972d9b9..6017ac55 100644 --- a/src/nitro/communication/messages/incoming/catalog/ClubGiftInfoEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/ClubGiftInfoEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ClubGiftInfoParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/ClubGiftSelectedEvent.ts b/src/nitro/communication/messages/incoming/catalog/ClubGiftSelectedEvent.ts index da108e45..f52da0ac 100644 --- a/src/nitro/communication/messages/incoming/catalog/ClubGiftSelectedEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/ClubGiftSelectedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ClubGiftSelectedParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/ClubOfferData.ts b/src/nitro/communication/messages/incoming/catalog/ClubOfferData.ts index 7d03c67a..6bce2ac7 100644 --- a/src/nitro/communication/messages/incoming/catalog/ClubOfferData.ts +++ b/src/nitro/communication/messages/incoming/catalog/ClubOfferData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class ClubOfferData { @@ -18,7 +18,7 @@ export class ClubOfferData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._offerId = wrapper.readInt(); this._productCode = wrapper.readString(); diff --git a/src/nitro/communication/messages/incoming/catalog/ClubOfferExtendedData.ts b/src/nitro/communication/messages/incoming/catalog/ClubOfferExtendedData.ts index 94bf6bf8..f07bc961 100644 --- a/src/nitro/communication/messages/incoming/catalog/ClubOfferExtendedData.ts +++ b/src/nitro/communication/messages/incoming/catalog/ClubOfferExtendedData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { ClubOfferData } from './ClubOfferData'; export class ClubOfferExtendedData extends ClubOfferData diff --git a/src/nitro/communication/messages/incoming/catalog/DirectSMSClubBuyAvailableMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/DirectSMSClubBuyAvailableMessageEvent.ts index e92714e4..48a919df 100644 --- a/src/nitro/communication/messages/incoming/catalog/DirectSMSClubBuyAvailableMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/DirectSMSClubBuyAvailableMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { DirectSMSClubBuyAvailableMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/FrontPageItem.ts b/src/nitro/communication/messages/incoming/catalog/FrontPageItem.ts index eb49cbf7..2e9224c1 100644 --- a/src/nitro/communication/messages/incoming/catalog/FrontPageItem.ts +++ b/src/nitro/communication/messages/incoming/catalog/FrontPageItem.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { Nitro } from '../../../../Nitro'; export class FrontPageItem @@ -18,7 +18,7 @@ export class FrontPageItem constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -40,14 +40,14 @@ export class FrontPageItem public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._position = wrapper.readInt(); this._itemName = wrapper.readString(); this._itemPromoImage = wrapper.readString(); this._type = wrapper.readInt(); - switch(this._type) + switch (this._type) { case FrontPageItem.ITEM_CATALOGUE_PAGE: this._catalogPageLocation = wrapper.readString(); diff --git a/src/nitro/communication/messages/incoming/catalog/GiftReceiverNotFoundEvent.ts b/src/nitro/communication/messages/incoming/catalog/GiftReceiverNotFoundEvent.ts index e6245d10..9d969273 100644 --- a/src/nitro/communication/messages/incoming/catalog/GiftReceiverNotFoundEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/GiftReceiverNotFoundEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GiftReceiverNotFoundParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/GiftWrappingConfigurationEvent.ts b/src/nitro/communication/messages/incoming/catalog/GiftWrappingConfigurationEvent.ts index 9e0710c4..708de8b1 100644 --- a/src/nitro/communication/messages/incoming/catalog/GiftWrappingConfigurationEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/GiftWrappingConfigurationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GiftWrappingConfigurationParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/HabboClubExtendOfferMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/HabboClubExtendOfferMessageEvent.ts index 3cc47bbd..6ba8d1c3 100644 --- a/src/nitro/communication/messages/incoming/catalog/HabboClubExtendOfferMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/HabboClubExtendOfferMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HabboClubExtendOfferMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/HabboClubOffersMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/HabboClubOffersMessageEvent.ts index d1b0dc20..b52a7624 100644 --- a/src/nitro/communication/messages/incoming/catalog/HabboClubOffersMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/HabboClubOffersMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HabboClubOffersMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/IsOfferGiftableMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/IsOfferGiftableMessageEvent.ts index 6c2d1d4d..e6a4826c 100644 --- a/src/nitro/communication/messages/incoming/catalog/IsOfferGiftableMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/IsOfferGiftableMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { IsOfferGiftableMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/LimitedEditionSoldOutEvent.ts b/src/nitro/communication/messages/incoming/catalog/LimitedEditionSoldOutEvent.ts index 309b8466..2c061fac 100644 --- a/src/nitro/communication/messages/incoming/catalog/LimitedEditionSoldOutEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/LimitedEditionSoldOutEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { LimitedEditionSoldOutParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/LimitedOfferAppearingNextMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/LimitedOfferAppearingNextMessageEvent.ts index 55214458..0521cba5 100644 --- a/src/nitro/communication/messages/incoming/catalog/LimitedOfferAppearingNextMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/LimitedOfferAppearingNextMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { LimitedOfferAppearingNextMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/NodeData.ts b/src/nitro/communication/messages/incoming/catalog/NodeData.ts index 2baa88b8..cc6ecda9 100644 --- a/src/nitro/communication/messages/incoming/catalog/NodeData.ts +++ b/src/nitro/communication/messages/incoming/catalog/NodeData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class NodeData { @@ -12,7 +12,7 @@ export class NodeData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -33,7 +33,7 @@ export class NodeData public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._visible = wrapper.readBoolean(); this._icon = wrapper.readInt(); @@ -43,7 +43,7 @@ export class NodeData let totalOffers = wrapper.readInt(); - while(totalOffers > 0) + while (totalOffers > 0) { this._offerIds.push(wrapper.readInt()); @@ -52,7 +52,7 @@ export class NodeData let totalChildren = wrapper.readInt(); - while(totalChildren > 0) + while (totalChildren > 0) { this._children.push(new NodeData(wrapper)); diff --git a/src/nitro/communication/messages/incoming/catalog/NotEnoughBalanceMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/NotEnoughBalanceMessageEvent.ts index 710d888c..11e58e0e 100644 --- a/src/nitro/communication/messages/incoming/catalog/NotEnoughBalanceMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/NotEnoughBalanceMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NotEnoughBalanceMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/ProductOfferEvent.ts b/src/nitro/communication/messages/incoming/catalog/ProductOfferEvent.ts index 8941a878..7f8d79f6 100644 --- a/src/nitro/communication/messages/incoming/catalog/ProductOfferEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/ProductOfferEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ProductOfferMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/PurchaseErrorMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/PurchaseErrorMessageEvent.ts index 265f713c..645dda1c 100644 --- a/src/nitro/communication/messages/incoming/catalog/PurchaseErrorMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/PurchaseErrorMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PurchaseErrorMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/PurchaseNotAllowedMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/PurchaseNotAllowedMessageEvent.ts index 6b13263d..826d8adf 100644 --- a/src/nitro/communication/messages/incoming/catalog/PurchaseNotAllowedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/PurchaseNotAllowedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PurchaseNotAllowedMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageEvent.ts index 90e7ed55..743037fa 100644 --- a/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PurchaseOKMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageOfferData.ts b/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageOfferData.ts index fdbc6301..5a928599 100644 --- a/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageOfferData.ts +++ b/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageOfferData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { CatalogPageMessageProductData } from './CatalogPageMessageProductData'; export class PurchaseOKMessageOfferData @@ -16,7 +16,7 @@ export class PurchaseOKMessageOfferData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -40,7 +40,7 @@ export class PurchaseOKMessageOfferData public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._offerId = wrapper.readInt(); this._localizationId = wrapper.readString(); @@ -52,7 +52,7 @@ export class PurchaseOKMessageOfferData let totalProducts = wrapper.readInt(); - while(totalProducts > 0) + while (totalProducts > 0) { this._products.push(new CatalogPageMessageProductData(wrapper)); diff --git a/src/nitro/communication/messages/incoming/catalog/RoomAdPurchaseInfoEvent.ts b/src/nitro/communication/messages/incoming/catalog/RoomAdPurchaseInfoEvent.ts index ca0bb931..6cad2045 100644 --- a/src/nitro/communication/messages/incoming/catalog/RoomAdPurchaseInfoEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/RoomAdPurchaseInfoEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomAdPurchaseInfoEventParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/SeasonalCalendarDailyOfferMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/SeasonalCalendarDailyOfferMessageEvent.ts index 8098cb50..8d13f8ce 100644 --- a/src/nitro/communication/messages/incoming/catalog/SeasonalCalendarDailyOfferMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/SeasonalCalendarDailyOfferMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { SeasonalCalendarDailyOfferMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/SellablePetPalettesMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/SellablePetPalettesMessageEvent.ts index 06d67c8c..41ed7bff 100644 --- a/src/nitro/communication/messages/incoming/catalog/SellablePetPalettesMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/SellablePetPalettesMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { SellablePetPalettesParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/TargetedOfferData.ts b/src/nitro/communication/messages/incoming/catalog/TargetedOfferData.ts index d613008c..12436b34 100644 --- a/src/nitro/communication/messages/incoming/catalog/TargetedOfferData.ts +++ b/src/nitro/communication/messages/incoming/catalog/TargetedOfferData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { Nitro } from '../../../../Nitro'; export class TargetedOfferData @@ -42,7 +42,7 @@ export class TargetedOfferData let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._Str_11962.push(wrapper.readString()); @@ -53,7 +53,7 @@ export class TargetedOfferData public populate(offerData: TargetedOfferData) { - if(!offerData) return; + if (!offerData) return; this._id = offerData.id; this._identifier = offerData.identifier; diff --git a/src/nitro/communication/messages/incoming/catalog/TargetedOfferEvent.ts b/src/nitro/communication/messages/incoming/catalog/TargetedOfferEvent.ts index da896ef0..819ae9c7 100644 --- a/src/nitro/communication/messages/incoming/catalog/TargetedOfferEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/TargetedOfferEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { TargetedOfferParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/TargetedOfferNotFoundEvent.ts b/src/nitro/communication/messages/incoming/catalog/TargetedOfferNotFoundEvent.ts index d38b20f2..9e1a64f8 100644 --- a/src/nitro/communication/messages/incoming/catalog/TargetedOfferNotFoundEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/TargetedOfferNotFoundEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { TargetedOfferNotFoundParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/VoucherRedeemErrorMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/VoucherRedeemErrorMessageEvent.ts index 4c4870f3..be2717fc 100644 --- a/src/nitro/communication/messages/incoming/catalog/VoucherRedeemErrorMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/VoucherRedeemErrorMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { VoucherRedeemErrorMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/catalog/VoucherRedeemOkMessageEvent.ts b/src/nitro/communication/messages/incoming/catalog/VoucherRedeemOkMessageEvent.ts index 78440d6d..c30866c3 100644 --- a/src/nitro/communication/messages/incoming/catalog/VoucherRedeemOkMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/catalog/VoucherRedeemOkMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { VoucherRedeemOkMessageParser } from '../../parser/catalog/VoucherRedeemOkMessageParser'; diff --git a/src/nitro/communication/messages/incoming/client/ClientPingEvent.ts b/src/nitro/communication/messages/incoming/client/ClientPingEvent.ts index a478ba78..b550e018 100644 --- a/src/nitro/communication/messages/incoming/client/ClientPingEvent.ts +++ b/src/nitro/communication/messages/incoming/client/ClientPingEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ClientPingParser } from '../../parser/client/ClientPingParser'; diff --git a/src/nitro/communication/messages/incoming/competition/CompetitionEntrySubmitResultEvent.ts b/src/nitro/communication/messages/incoming/competition/CompetitionEntrySubmitResultEvent.ts index 3c3da7cd..a09d23b0 100644 --- a/src/nitro/communication/messages/incoming/competition/CompetitionEntrySubmitResultEvent.ts +++ b/src/nitro/communication/messages/incoming/competition/CompetitionEntrySubmitResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CompetitionEntrySubmitResultMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/competition/CompetitionVotingInfoMessageEvent.ts b/src/nitro/communication/messages/incoming/competition/CompetitionVotingInfoMessageEvent.ts index 4afaeabd..ff13ad7f 100644 --- a/src/nitro/communication/messages/incoming/competition/CompetitionVotingInfoMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/competition/CompetitionVotingInfoMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CompetitionVotingInfoMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/competition/CurrentTimingCodeMessageEvent.ts b/src/nitro/communication/messages/incoming/competition/CurrentTimingCodeMessageEvent.ts index a36b3c62..8b99a338 100644 --- a/src/nitro/communication/messages/incoming/competition/CurrentTimingCodeMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/competition/CurrentTimingCodeMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CurrentTimingCodeMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/competition/IsUserPartOfCompetitionMessageEvent.ts b/src/nitro/communication/messages/incoming/competition/IsUserPartOfCompetitionMessageEvent.ts index ab0f5155..8f8b0357 100644 --- a/src/nitro/communication/messages/incoming/competition/IsUserPartOfCompetitionMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/competition/IsUserPartOfCompetitionMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { IsUserPartOfCompetitionMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/competition/NoOwnedRoomsAlertMessageEvent.ts b/src/nitro/communication/messages/incoming/competition/NoOwnedRoomsAlertMessageEvent.ts index 0845f632..901b0373 100644 --- a/src/nitro/communication/messages/incoming/competition/NoOwnedRoomsAlertMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/competition/NoOwnedRoomsAlertMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NoOwnedRoomsAlertMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/competition/SecondsUntilMessageEvent.ts b/src/nitro/communication/messages/incoming/competition/SecondsUntilMessageEvent.ts index c9e1dd80..968e3172 100644 --- a/src/nitro/communication/messages/incoming/competition/SecondsUntilMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/competition/SecondsUntilMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { SecondsUntilMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/crafting/CraftableProductsEvent.ts b/src/nitro/communication/messages/incoming/crafting/CraftableProductsEvent.ts index 9f507f20..16480604 100644 --- a/src/nitro/communication/messages/incoming/crafting/CraftableProductsEvent.ts +++ b/src/nitro/communication/messages/incoming/crafting/CraftableProductsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CraftableProductsMessageParser } from '../../parser/crafting/CraftableProductsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/crafting/CraftingRecipeEvent.ts b/src/nitro/communication/messages/incoming/crafting/CraftingRecipeEvent.ts index 4f75d095..5b78c942 100644 --- a/src/nitro/communication/messages/incoming/crafting/CraftingRecipeEvent.ts +++ b/src/nitro/communication/messages/incoming/crafting/CraftingRecipeEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CraftingRecipeMessageParser } from '../../parser/crafting/CraftingRecipeMessageParser'; diff --git a/src/nitro/communication/messages/incoming/crafting/CraftingRecipesAvailableEvent.ts b/src/nitro/communication/messages/incoming/crafting/CraftingRecipesAvailableEvent.ts index ec6182fd..03d93a1b 100644 --- a/src/nitro/communication/messages/incoming/crafting/CraftingRecipesAvailableEvent.ts +++ b/src/nitro/communication/messages/incoming/crafting/CraftingRecipesAvailableEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CraftingRecipesAvailableMessageParser } from '../../parser/crafting/CraftingRecipesAvailableMessageParser'; diff --git a/src/nitro/communication/messages/incoming/crafting/CraftingResultEvent.ts b/src/nitro/communication/messages/incoming/crafting/CraftingResultEvent.ts index f3e0d30e..c20999c7 100644 --- a/src/nitro/communication/messages/incoming/crafting/CraftingResultEvent.ts +++ b/src/nitro/communication/messages/incoming/crafting/CraftingResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CraftingResultMessageParser } from '../../parser/crafting/CraftingResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/desktop/DesktopViewEvent.ts b/src/nitro/communication/messages/incoming/desktop/DesktopViewEvent.ts index 25673c31..9699adb1 100644 --- a/src/nitro/communication/messages/incoming/desktop/DesktopViewEvent.ts +++ b/src/nitro/communication/messages/incoming/desktop/DesktopViewEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { DesktopViewParser } from '../../parser/desktop/DesktopViewParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/AcceptFriendFailureData.ts b/src/nitro/communication/messages/incoming/friendlist/AcceptFriendFailureData.ts index a8f17aa6..2adb76c6 100644 --- a/src/nitro/communication/messages/incoming/friendlist/AcceptFriendFailureData.ts +++ b/src/nitro/communication/messages/incoming/friendlist/AcceptFriendFailureData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class AcceptFriendFailerData { @@ -7,7 +7,7 @@ export class AcceptFriendFailerData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._senderId = wrapper.readInt(); this._errorCode = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/friendlist/AcceptFriendResultEvent.ts b/src/nitro/communication/messages/incoming/friendlist/AcceptFriendResultEvent.ts index d1ec21db..6fcad4b3 100644 --- a/src/nitro/communication/messages/incoming/friendlist/AcceptFriendResultEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/AcceptFriendResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { AcceptFriendResultParser } from '../../parser/friendlist/AcceptFriendResultParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/FindFriendsProcessResultEvent.ts b/src/nitro/communication/messages/incoming/friendlist/FindFriendsProcessResultEvent.ts index 3e3d3462..ed60c01d 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FindFriendsProcessResultEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FindFriendsProcessResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FindFriendsProcessResultParser } from '../../parser/friendlist/FindFriendsProcessResultParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/FollowFriendFailedEvent.ts b/src/nitro/communication/messages/incoming/friendlist/FollowFriendFailedEvent.ts index 4701b262..3065b86b 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FollowFriendFailedEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FollowFriendFailedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { DesktopViewParser } from '../../parser/desktop/DesktopViewParser'; import { FollowFriendFailedParser } from '../../parser/friendlist/FollowFriendFailedParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendCategoryData.ts b/src/nitro/communication/messages/incoming/friendlist/FriendCategoryData.ts index 1b548d25..218b9bcd 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendCategoryData.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendCategoryData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class FriendCategoryData { @@ -7,7 +7,7 @@ export class FriendCategoryData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._id = wrapper.readInt(); this._name = wrapper.readString(); diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendListFragmentEvent.ts b/src/nitro/communication/messages/incoming/friendlist/FriendListFragmentEvent.ts index 28e1bca2..60c41bf8 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendListFragmentEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendListFragmentEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FriendListFragmentParser } from '../../parser/friendlist/FriendListFragmentMessageParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendListUpdateEvent.ts b/src/nitro/communication/messages/incoming/friendlist/FriendListUpdateEvent.ts index d3758975..286329bd 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendListUpdateEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendListUpdateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FriendListUpdateParser } from '../../parser/friendlist/FriendListUpdateParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendNotificationEvent.ts b/src/nitro/communication/messages/incoming/friendlist/FriendNotificationEvent.ts index d2dad119..98c98d4f 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendNotificationEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendNotificationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { DesktopViewParser } from '../../parser/desktop/DesktopViewParser'; import { FriendNotificationParser } from '../../parser/friendlist/FriendNotificationParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendParser.ts b/src/nitro/communication/messages/incoming/friendlist/FriendParser.ts index 5995b2d2..0936bde5 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendParser.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class FriendParser { @@ -19,7 +19,7 @@ export class FriendParser constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._id = wrapper.readInt(); this._name = wrapper.readString(); diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendRequestData.ts b/src/nitro/communication/messages/incoming/friendlist/FriendRequestData.ts index ad42d0e1..6ddb0930 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendRequestData.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendRequestData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class FriendRequestData { @@ -9,7 +9,7 @@ export class FriendRequestData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._requestId = wrapper.readInt(); this._requesterName = wrapper.readString(); diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendRequestsEvent.ts b/src/nitro/communication/messages/incoming/friendlist/FriendRequestsEvent.ts index cd68c8a5..c9f3d48c 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendRequestsEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendRequestsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FriendRequestsParser } from '../../parser/friendlist/FriendRequestsParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultData.ts b/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultData.ts index 14948241..66588bef 100644 --- a/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultData.ts +++ b/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class HabboSearchResultData { @@ -14,7 +14,7 @@ export class HabboSearchResultData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._avatarId = wrapper.readInt(); this._avatarName = wrapper.readString(); diff --git a/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultEvent.ts b/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultEvent.ts index ae14170d..9dfa7f43 100644 --- a/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HabboSearchResultParser } from '../../parser/friendlist/HabboSearchResultParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/InstantMessageErrorEvent.ts b/src/nitro/communication/messages/incoming/friendlist/InstantMessageErrorEvent.ts index d5781105..beaed3c0 100644 --- a/src/nitro/communication/messages/incoming/friendlist/InstantMessageErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/InstantMessageErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { InstantMessageErrorParser } from '../../parser/friendlist/InstantMessageErrorParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/MessageErrorEvent.ts b/src/nitro/communication/messages/incoming/friendlist/MessageErrorEvent.ts index e40b480e..190bb6f0 100644 --- a/src/nitro/communication/messages/incoming/friendlist/MessageErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/MessageErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MessageErrorParser } from '../../parser/friendlist/MessageErrorParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/MessengerInitEvent.ts b/src/nitro/communication/messages/incoming/friendlist/MessengerInitEvent.ts index c471c2c5..bfe90b0e 100644 --- a/src/nitro/communication/messages/incoming/friendlist/MessengerInitEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/MessengerInitEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MessengerInitParser } from '../../parser/friendlist/MessengerInitParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/MiniMailNewMessageEvent.ts b/src/nitro/communication/messages/incoming/friendlist/MiniMailNewMessageEvent.ts index a1f34542..6170bdb2 100644 --- a/src/nitro/communication/messages/incoming/friendlist/MiniMailNewMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/MiniMailNewMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MiniMailNewMessageParser } from '../../parser/friendlist/MiniMailNewMessageParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/MiniMailUnreadCountEvent.ts b/src/nitro/communication/messages/incoming/friendlist/MiniMailUnreadCountEvent.ts index ae800ddd..f4ebafd1 100644 --- a/src/nitro/communication/messages/incoming/friendlist/MiniMailUnreadCountEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/MiniMailUnreadCountEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MiniMailUnreadCountParser } from '../../parser/friendlist/MiniMailUnreadCountParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/NewConsoleMessageEvent.ts b/src/nitro/communication/messages/incoming/friendlist/NewConsoleMessageEvent.ts index dd7694fd..675660d0 100644 --- a/src/nitro/communication/messages/incoming/friendlist/NewConsoleMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/NewConsoleMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NewConsoleMessageParser } from '../../parser/friendlist/NewConsoleMessageParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/NewFriendRequestEvent.ts b/src/nitro/communication/messages/incoming/friendlist/NewFriendRequestEvent.ts index 622eab56..8f714b12 100644 --- a/src/nitro/communication/messages/incoming/friendlist/NewFriendRequestEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/NewFriendRequestEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NewFriendRequestParser } from '../../parser/friendlist/NewFriendRequestMessageParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/RoomInviteErrorEvent.ts b/src/nitro/communication/messages/incoming/friendlist/RoomInviteErrorEvent.ts index 561ac040..1d447655 100644 --- a/src/nitro/communication/messages/incoming/friendlist/RoomInviteErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/RoomInviteErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomInviteErrorParser } from '../../parser/friendlist/RoomInviteErrorParser'; diff --git a/src/nitro/communication/messages/incoming/friendlist/RoomInviteEvent.ts b/src/nitro/communication/messages/incoming/friendlist/RoomInviteEvent.ts index 8abe5642..57adc0df 100644 --- a/src/nitro/communication/messages/incoming/friendlist/RoomInviteEvent.ts +++ b/src/nitro/communication/messages/incoming/friendlist/RoomInviteEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomInviteParser } from '../../parser/friendlist/RoomInviteMessageParser'; diff --git a/src/nitro/communication/messages/incoming/game/LoadGameUrlEvent.ts b/src/nitro/communication/messages/incoming/game/LoadGameUrlEvent.ts index 4908b481..e50fae0a 100644 --- a/src/nitro/communication/messages/incoming/game/LoadGameUrlEvent.ts +++ b/src/nitro/communication/messages/incoming/game/LoadGameUrlEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { LoadGameUrlParser } from '../../parser/game/LoadGameUrlParser'; diff --git a/src/nitro/communication/messages/incoming/generic/GenericErrorEvent.ts b/src/nitro/communication/messages/incoming/generic/GenericErrorEvent.ts index 7e13fc1e..fdddbfa8 100644 --- a/src/nitro/communication/messages/incoming/generic/GenericErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/generic/GenericErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GenericErrorParser } from '../../parser/generic/GenericErrorParser'; diff --git a/src/nitro/communication/messages/incoming/group/GroupBadgePartsEvent.ts b/src/nitro/communication/messages/incoming/group/GroupBadgePartsEvent.ts index d9c6ca97..eeda87cc 100644 --- a/src/nitro/communication/messages/incoming/group/GroupBadgePartsEvent.ts +++ b/src/nitro/communication/messages/incoming/group/GroupBadgePartsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GroupBadgePartsParser } from '../../parser/group/GroupBadgePartsParser'; diff --git a/src/nitro/communication/messages/incoming/group/GroupBuyDataEvent.ts b/src/nitro/communication/messages/incoming/group/GroupBuyDataEvent.ts index 23a8e187..20454c56 100644 --- a/src/nitro/communication/messages/incoming/group/GroupBuyDataEvent.ts +++ b/src/nitro/communication/messages/incoming/group/GroupBuyDataEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GroupBuyDataParser } from '../../parser/group/GroupBuyDataParser'; diff --git a/src/nitro/communication/messages/incoming/group/GroupConfirmMemberRemoveEvent.ts b/src/nitro/communication/messages/incoming/group/GroupConfirmMemberRemoveEvent.ts index 7898f00b..f47b7f72 100644 --- a/src/nitro/communication/messages/incoming/group/GroupConfirmMemberRemoveEvent.ts +++ b/src/nitro/communication/messages/incoming/group/GroupConfirmMemberRemoveEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GroupConfirmMemberRemoveParser } from '../../parser/group/GroupConfirmMemberRemoveParser'; diff --git a/src/nitro/communication/messages/incoming/group/GroupInformationEvent.ts b/src/nitro/communication/messages/incoming/group/GroupInformationEvent.ts index edf38a55..f61591fc 100644 --- a/src/nitro/communication/messages/incoming/group/GroupInformationEvent.ts +++ b/src/nitro/communication/messages/incoming/group/GroupInformationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GroupInformationParser } from '../../parser/group/GroupInformationParser'; diff --git a/src/nitro/communication/messages/incoming/group/GroupMembersEvent.ts b/src/nitro/communication/messages/incoming/group/GroupMembersEvent.ts index e3f37f5e..ce802249 100644 --- a/src/nitro/communication/messages/incoming/group/GroupMembersEvent.ts +++ b/src/nitro/communication/messages/incoming/group/GroupMembersEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GroupMembersParser } from '../../parser/group/GroupMembersParser'; diff --git a/src/nitro/communication/messages/incoming/group/GroupPurchasedEvent.ts b/src/nitro/communication/messages/incoming/group/GroupPurchasedEvent.ts index 3fb1723d..883b3fae 100644 --- a/src/nitro/communication/messages/incoming/group/GroupPurchasedEvent.ts +++ b/src/nitro/communication/messages/incoming/group/GroupPurchasedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GroupPurchasedParser } from '../../parser/group/GroupPurchasedParser'; diff --git a/src/nitro/communication/messages/incoming/group/GroupSettingsEvent.ts b/src/nitro/communication/messages/incoming/group/GroupSettingsEvent.ts index 6cb4c775..ebac6158 100644 --- a/src/nitro/communication/messages/incoming/group/GroupSettingsEvent.ts +++ b/src/nitro/communication/messages/incoming/group/GroupSettingsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GroupSettingsParser } from '../../parser/group/GroupSettingsParser'; diff --git a/src/nitro/communication/messages/incoming/group/HabboGroupDeactivatedMessageEvent.ts b/src/nitro/communication/messages/incoming/group/HabboGroupDeactivatedMessageEvent.ts index 94138386..574cc3d4 100644 --- a/src/nitro/communication/messages/incoming/group/HabboGroupDeactivatedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/group/HabboGroupDeactivatedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HabboGroupDeactivatedMessageParser } from '../../parser/group/HabboGroupDeactivatedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/groupforums/ForumDataMessageEvent.ts b/src/nitro/communication/messages/incoming/groupforums/ForumDataMessageEvent.ts index 2d39bbae..b88b63c1 100644 --- a/src/nitro/communication/messages/incoming/groupforums/ForumDataMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/groupforums/ForumDataMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ForumDataMessageParser } from '../../parser/groupforums/ForumDataMessageParser'; diff --git a/src/nitro/communication/messages/incoming/groupforums/ForumsListMessageEvent.ts b/src/nitro/communication/messages/incoming/groupforums/ForumsListMessageEvent.ts index 2c0380ff..3c320533 100644 --- a/src/nitro/communication/messages/incoming/groupforums/ForumsListMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/groupforums/ForumsListMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GetForumsListMessageParser } from '../../parser/groupforums/GetForumsListMessageParser'; diff --git a/src/nitro/communication/messages/incoming/groupforums/GuildForumThreadsEvent.ts b/src/nitro/communication/messages/incoming/groupforums/GuildForumThreadsEvent.ts index 98dd9570..0f5c80a3 100644 --- a/src/nitro/communication/messages/incoming/groupforums/GuildForumThreadsEvent.ts +++ b/src/nitro/communication/messages/incoming/groupforums/GuildForumThreadsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuildForumThreadsParser } from '../../parser/groupforums/GuildForumThreadsParser'; diff --git a/src/nitro/communication/messages/incoming/groupforums/PostMessageMessageEvent.ts b/src/nitro/communication/messages/incoming/groupforums/PostMessageMessageEvent.ts index c1ed95ad..efb56789 100644 --- a/src/nitro/communication/messages/incoming/groupforums/PostMessageMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/groupforums/PostMessageMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PostMessageMessageParser } from '../../parser/groupforums/PostMessageMessageParser'; diff --git a/src/nitro/communication/messages/incoming/groupforums/PostThreadMessageEvent.ts b/src/nitro/communication/messages/incoming/groupforums/PostThreadMessageEvent.ts index d06b04d2..d4d6734b 100644 --- a/src/nitro/communication/messages/incoming/groupforums/PostThreadMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/groupforums/PostThreadMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PostThreadMessageParser } from '../../parser/groupforums/PostThreadMessageParser'; diff --git a/src/nitro/communication/messages/incoming/groupforums/ThreadMessagesMessageEvent.ts b/src/nitro/communication/messages/incoming/groupforums/ThreadMessagesMessageEvent.ts index 0bf85c95..6618d87e 100644 --- a/src/nitro/communication/messages/incoming/groupforums/ThreadMessagesMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/groupforums/ThreadMessagesMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ThreadMessagesMessageParser } from '../../parser/groupforums/ThreadMessagesMessageParser'; diff --git a/src/nitro/communication/messages/incoming/groupforums/UnreadForumsCountMessageEvent.ts b/src/nitro/communication/messages/incoming/groupforums/UnreadForumsCountMessageEvent.ts index 51fbd5d1..b0fd08fd 100644 --- a/src/nitro/communication/messages/incoming/groupforums/UnreadForumsCountMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/groupforums/UnreadForumsCountMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UnreadForumsCountMessageParser } from '../../parser/groupforums/UnreadForumsCountMessageParser'; diff --git a/src/nitro/communication/messages/incoming/groupforums/UpdateMessageMessageEvent.ts b/src/nitro/communication/messages/incoming/groupforums/UpdateMessageMessageEvent.ts index 5cebd2af..216e62b2 100644 --- a/src/nitro/communication/messages/incoming/groupforums/UpdateMessageMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/groupforums/UpdateMessageMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UpdateMessageMessageParser } from '../../parser/groupforums/UpdateMessageMessageParser'; diff --git a/src/nitro/communication/messages/incoming/groupforums/UpdateThreadMessageEvent.ts b/src/nitro/communication/messages/incoming/groupforums/UpdateThreadMessageEvent.ts index 3d8fc216..11f4a12b 100644 --- a/src/nitro/communication/messages/incoming/groupforums/UpdateThreadMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/groupforums/UpdateThreadMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UpdateThreadMessageParser } from '../../parser/groupforums/UpdateThreadMessageParser'; diff --git a/src/nitro/communication/messages/incoming/handshake/NoobnessLevelMessageEvent.ts b/src/nitro/communication/messages/incoming/handshake/NoobnessLevelMessageEvent.ts index 16a73c38..52610426 100644 --- a/src/nitro/communication/messages/incoming/handshake/NoobnessLevelMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/handshake/NoobnessLevelMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NoobnessLevelMessageParser } from '../../parser/handshake/NoobnessLevelMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/CallForHelpDisabledNotifyMessageEvent.ts b/src/nitro/communication/messages/incoming/help/CallForHelpDisabledNotifyMessageEvent.ts index 2f7ca860..79031708 100644 --- a/src/nitro/communication/messages/incoming/help/CallForHelpDisabledNotifyMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/CallForHelpDisabledNotifyMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CallForHelpDisabledNotifyMessageParser } from '../../parser/help/CallForHelpDisabledNotifyMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsDeletedMessageEvent.ts b/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsDeletedMessageEvent.ts index c0b823bf..2cf56828 100644 --- a/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsDeletedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsDeletedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CallForHelpPendingCallsDeletedMessageParser } from '../../parser/help/CallForHelpPendingCallsDeletedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsMessageEvent.ts b/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsMessageEvent.ts index bd0eb880..2c2802d9 100644 --- a/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CallForHelpPendingCallsMessageParser } from '../../parser/help/CallForHelpPendingCallsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/CallForHelpReplyMessageEvent.ts b/src/nitro/communication/messages/incoming/help/CallForHelpReplyMessageEvent.ts index 3e653f42..1a171c4c 100644 --- a/src/nitro/communication/messages/incoming/help/CallForHelpReplyMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/CallForHelpReplyMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CallForHelpReplyMessageParser } from '../../parser/help/CallForHelpReplyMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/CallForHelpResultMessageEvent.ts b/src/nitro/communication/messages/incoming/help/CallForHelpResultMessageEvent.ts index 70b21b38..87792a70 100644 --- a/src/nitro/communication/messages/incoming/help/CallForHelpResultMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/CallForHelpResultMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CallForHelpResultMessageParser } from '../../parser/help/CallForHelpResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionDetachedMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionDetachedMessageEvent.ts index a1a835c2..93c03489 100644 --- a/src/nitro/communication/messages/incoming/help/ChatReviewSessionDetachedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionDetachedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ChatReviewSessionDetachedMessageParser } from '../../parser/help/ChatReviewSessionDetachedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionOfferedToGuideMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionOfferedToGuideMessageEvent.ts index c695498b..77dcca21 100644 --- a/src/nitro/communication/messages/incoming/help/ChatReviewSessionOfferedToGuideMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionOfferedToGuideMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ChatReviewSessionOfferedToGuideMessageParser } from '../../parser/help/ChatReviewSessionOfferedToGuideMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionResultsMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionResultsMessageEvent.ts index 75b50343..290ad974 100644 --- a/src/nitro/communication/messages/incoming/help/ChatReviewSessionResultsMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionResultsMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ChatReviewSessionResultsMessageParser } from '../../parser/help/ChatReviewSessionResultsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionStartedMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionStartedMessageEvent.ts index acb47b5f..76363cc9 100644 --- a/src/nitro/communication/messages/incoming/help/ChatReviewSessionStartedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionStartedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ChatReviewSessionStartedMessageParser } from '../../parser/help/ChatReviewSessionStartedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionVotingStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionVotingStatusMessageEvent.ts index 34471608..823130de 100644 --- a/src/nitro/communication/messages/incoming/help/ChatReviewSessionVotingStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionVotingStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ChatReviewSessionVotingStatusMessageParser } from '../../parser/help/ChatReviewSessionVotingStatusMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideOnDutyStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideOnDutyStatusMessageEvent.ts index 72f411d5..89aea980 100644 --- a/src/nitro/communication/messages/incoming/help/GuideOnDutyStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideOnDutyStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideOnDutyStatusMessageParser } from '../../parser/help/GuideOnDutyStatusMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideReportingStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideReportingStatusMessageEvent.ts index 72a89fd3..ed1844e9 100644 --- a/src/nitro/communication/messages/incoming/help/GuideReportingStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideReportingStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideReportingStatusMessageParser } from './../../parser/help/GuideReportingStatusMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideSessionAttachedMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideSessionAttachedMessageEvent.ts index 9165f5cc..b57017b6 100644 --- a/src/nitro/communication/messages/incoming/help/GuideSessionAttachedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideSessionAttachedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideSessionAttachedMessageParser } from '../../parser/help/GuideSessionAttachedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideSessionDetachedMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideSessionDetachedMessageEvent.ts index 16b4473c..dd817394 100644 --- a/src/nitro/communication/messages/incoming/help/GuideSessionDetachedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideSessionDetachedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideSessionDetachedMessageParser } from '../../parser/help/GuideSessionDetachedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideSessionEndedMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideSessionEndedMessageEvent.ts index 5aa1e2e8..80762302 100644 --- a/src/nitro/communication/messages/incoming/help/GuideSessionEndedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideSessionEndedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideSessionEndedMessageParser } from '../../parser/help/GuideSessionEndedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideSessionErrorMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideSessionErrorMessageEvent.ts index a6199407..0c8298b1 100644 --- a/src/nitro/communication/messages/incoming/help/GuideSessionErrorMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideSessionErrorMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideSessionErrorMessageParser } from '../../parser/help/GuideSessionErrorMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideSessionInvitedToGuideRoomMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideSessionInvitedToGuideRoomMessageEvent.ts index d7926ef5..5a21fd24 100644 --- a/src/nitro/communication/messages/incoming/help/GuideSessionInvitedToGuideRoomMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideSessionInvitedToGuideRoomMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideSessionInvitedToGuideRoomMessageParser } from '../../parser/help/GuideSessionInvitedToGuideRoomMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideSessionMessageMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideSessionMessageMessageEvent.ts index e7d720bd..28eb0652 100644 --- a/src/nitro/communication/messages/incoming/help/GuideSessionMessageMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideSessionMessageMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideSessionMessageMessageParser } from '../../parser/help/GuideSessionMessageMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideSessionPartnerIsTypingMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideSessionPartnerIsTypingMessageEvent.ts index 6d987656..f3695bfa 100644 --- a/src/nitro/communication/messages/incoming/help/GuideSessionPartnerIsTypingMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideSessionPartnerIsTypingMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideSessionPartnerIsTypingMessageParser } from '../../parser/help/GuideSessionPartnerIsTypingMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideSessionRequesterRoomMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideSessionRequesterRoomMessageEvent.ts index d4d88c4b..fb1411df 100644 --- a/src/nitro/communication/messages/incoming/help/GuideSessionRequesterRoomMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideSessionRequesterRoomMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideSessionRequesterRoomMessageParser } from '../../parser/help/GuideSessionRequesterRoomMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideSessionStartedMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideSessionStartedMessageEvent.ts index 4e5c91ba..e3b503e2 100644 --- a/src/nitro/communication/messages/incoming/help/GuideSessionStartedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideSessionStartedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideSessionStartedMessageParser } from '../../parser/help/GuideSessionStartedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideTicketCreationResultMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideTicketCreationResultMessageEvent.ts index 82834816..3edf5741 100644 --- a/src/nitro/communication/messages/incoming/help/GuideTicketCreationResultMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideTicketCreationResultMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideTicketCreationResultMessageParser } from '../../parser/help/GuideTicketCreationResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/GuideTicketResolutionMessageEvent.ts b/src/nitro/communication/messages/incoming/help/GuideTicketResolutionMessageEvent.ts index e72ca515..045f50ef 100644 --- a/src/nitro/communication/messages/incoming/help/GuideTicketResolutionMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/GuideTicketResolutionMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuideTicketResolutionMessageParser } from '../../parser/help/GuideTicketResolutionMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/HotelMergeNameChangeEvent.ts b/src/nitro/communication/messages/incoming/help/HotelMergeNameChangeEvent.ts index ded04e0c..9b96f68a 100644 --- a/src/nitro/communication/messages/incoming/help/HotelMergeNameChangeEvent.ts +++ b/src/nitro/communication/messages/incoming/help/HotelMergeNameChangeEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HotelMergeNameChangeParser } from '../../parser/help/HotelMergeNameChangeParser'; diff --git a/src/nitro/communication/messages/incoming/help/IssueCloseNotificationMessageEvent.ts b/src/nitro/communication/messages/incoming/help/IssueCloseNotificationMessageEvent.ts index 165e8bda..dceb86b9 100644 --- a/src/nitro/communication/messages/incoming/help/IssueCloseNotificationMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/IssueCloseNotificationMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { IssueCloseNotificationMessageParser } from '../../parser/help/IssueCloseNotificationMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/QuizDataMessageEvent.ts b/src/nitro/communication/messages/incoming/help/QuizDataMessageEvent.ts index 5435e27d..1c832743 100644 --- a/src/nitro/communication/messages/incoming/help/QuizDataMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/QuizDataMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuizDataMessageParser } from '../../parser/help/QuizDataMessageParser'; diff --git a/src/nitro/communication/messages/incoming/help/QuizResultsMessageEvent.ts b/src/nitro/communication/messages/incoming/help/QuizResultsMessageEvent.ts index 5460df5d..49a5503f 100644 --- a/src/nitro/communication/messages/incoming/help/QuizResultsMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/QuizResultsMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuizResultsMessageParser } from '../../parser/help/QuizResultsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementData.ts b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementData.ts index f51e1ed5..4ce02bcf 100644 --- a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementData.ts +++ b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; export class AchievementData { @@ -25,7 +25,7 @@ export class AchievementData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_parser'); + if (!wrapper) throw new Error('invalid_parser'); this._achievementId = wrapper.readInt(); this._level = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementEvent.ts b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementEvent.ts index 044470f5..94116287 100644 --- a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { AchievementParser } from '../../../parser/inventory/achievements/AchievementParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementResolutionData.ts b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementResolutionData.ts index 1692488e..9cbd5f14 100644 --- a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementResolutionData.ts +++ b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementResolutionData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; export class AchievementResolutionData { diff --git a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementsEvent.ts b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementsEvent.ts index 05dde21b..b85fb7b6 100644 --- a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementsEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { AchievementsParser } from '../../../parser/inventory/achievements/AchievementsParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementsScoreEvent.ts b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementsScoreEvent.ts index 0be7f785..24f11b54 100644 --- a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementsScoreEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementsScoreEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { AchievementsScoreParser } from '../../../parser/inventory/achievements/AchievementsScoreParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectActivatedEvent.ts b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectActivatedEvent.ts index 47ff020b..db0acfde 100644 --- a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectActivatedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectActivatedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { AvatarEffectActivatedParser } from '../../../parser/inventory/avatareffect/AvatarEffectActivatedParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectAddedEvent.ts b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectAddedEvent.ts index 78d17fa0..aee00215 100644 --- a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectAddedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectAddedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { AvatarEffectAddedParser } from '../../../parser/inventory/avatareffect/AvatarEffectAddedParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectExpiredEvent.ts b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectExpiredEvent.ts index e2f6cd25..1b3e16ef 100644 --- a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectExpiredEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectExpiredEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { AvatarEffectExpiredParser } from '../../../parser/inventory/avatareffect/AvatarEffectExpiredParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectSelectedEvent.ts b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectSelectedEvent.ts index 88b7bbc0..931f5e65 100644 --- a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectSelectedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectSelectedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { AvatarEffectSelectedParser } from '../../../parser/inventory/avatareffect/AvatarEffectSelectedParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectsEvent.ts b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectsEvent.ts index 2041f9d1..c9913da1 100644 --- a/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectsEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/avatareffect/AvatarEffectsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { AvatarEffectsParser } from '../../../parser/inventory/avatareffect/AvatarEffectsParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/badges/BadgePointLimitsEvent.ts b/src/nitro/communication/messages/incoming/inventory/badges/BadgePointLimitsEvent.ts index 10cd2557..56386fd1 100644 --- a/src/nitro/communication/messages/incoming/inventory/badges/BadgePointLimitsEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/badges/BadgePointLimitsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { BadgePointLimitsParser } from '../../../parser/inventory/badges/BadgePointLimitsParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/badges/BadgeReceivedEvent.ts b/src/nitro/communication/messages/incoming/inventory/badges/BadgeReceivedEvent.ts index fc346823..e547c372 100644 --- a/src/nitro/communication/messages/incoming/inventory/badges/BadgeReceivedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/badges/BadgeReceivedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { BadgeReceivedParser } from '../../../parser/inventory/badges/BadgeReceivedParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/badges/BadgesEvent.ts b/src/nitro/communication/messages/incoming/inventory/badges/BadgesEvent.ts index bae0c33d..d0439b15 100644 --- a/src/nitro/communication/messages/incoming/inventory/badges/BadgesEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/badges/BadgesEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { BadgesParser } from '../../../parser/inventory/badges/BadgesParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/badges/IsBadgeRequestFulfilledEvent.ts b/src/nitro/communication/messages/incoming/inventory/badges/IsBadgeRequestFulfilledEvent.ts index c9f1beac..18dc9dbd 100644 --- a/src/nitro/communication/messages/incoming/inventory/badges/IsBadgeRequestFulfilledEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/badges/IsBadgeRequestFulfilledEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { IsBadgeRequestFulfilledParser } from '../../../parser/inventory/badges/IsBadgeRequestFulfilledParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/clothes/FigureSetIdsMessageEvent.ts b/src/nitro/communication/messages/incoming/inventory/clothes/FigureSetIdsMessageEvent.ts index c8719bee..bff27eac 100644 --- a/src/nitro/communication/messages/incoming/inventory/clothes/FigureSetIdsMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/clothes/FigureSetIdsMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FigureSetIdsMessageParser } from '../../../parser/inventory/clothing/FigureSetIdsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/clothes/_Str_16135.ts b/src/nitro/communication/messages/incoming/inventory/clothes/_Str_16135.ts index 231a4d28..0279105f 100644 --- a/src/nitro/communication/messages/incoming/inventory/clothes/_Str_16135.ts +++ b/src/nitro/communication/messages/incoming/inventory/clothes/_Str_16135.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { _Str_8728 } from '../../../parser/inventory/clothing/_Str_8728'; diff --git a/src/nitro/communication/messages/incoming/inventory/clothes/_Str_17532.ts b/src/nitro/communication/messages/incoming/inventory/clothes/_Str_17532.ts index 06df9aa2..923d89b6 100644 --- a/src/nitro/communication/messages/incoming/inventory/clothes/_Str_17532.ts +++ b/src/nitro/communication/messages/incoming/inventory/clothes/_Str_17532.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { _Str_9021 } from '../../../parser/inventory/clothing/_Str_9021'; diff --git a/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListAddOrUpdateEvent.ts b/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListAddOrUpdateEvent.ts index d497690f..2f0a30ec 100644 --- a/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListAddOrUpdateEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListAddOrUpdateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FurnitureListAddOrUpdateParser } from '../../../parser/inventory/furniture/FurnitureListAddOrUpdateParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListEvent.ts b/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListEvent.ts index a8616b92..7d247a1f 100644 --- a/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FurnitureListParser } from '../../../parser/inventory/furniture/FurnitureListParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListInvalidateEvent.ts b/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListInvalidateEvent.ts index fe66590f..0aab03cb 100644 --- a/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListInvalidateEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListInvalidateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FurnitureListInvalidateParser } from '../../../parser/inventory/furniture/FurnitureListInvalidateParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListRemovedEvent.ts b/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListRemovedEvent.ts index 2e85c5cb..f28297a2 100644 --- a/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListRemovedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/furni/FurnitureListRemovedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FurnitureListRemovedParser } from '../../../parser/inventory/furniture/FurnitureListRemovedParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/furni/FurniturePostItPlacedEvent.ts b/src/nitro/communication/messages/incoming/inventory/furni/FurniturePostItPlacedEvent.ts index 2b55894f..e734fe2f 100644 --- a/src/nitro/communication/messages/incoming/inventory/furni/FurniturePostItPlacedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/furni/FurniturePostItPlacedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FurniturePostItPlacedParser } from '../../../parser/inventory/furniture/FurniturePostItPlacedParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/furni/gifts/PresentOpenedMessageEvent.ts b/src/nitro/communication/messages/incoming/inventory/furni/gifts/PresentOpenedMessageEvent.ts index f1237c15..585956a9 100644 --- a/src/nitro/communication/messages/incoming/inventory/furni/gifts/PresentOpenedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/furni/gifts/PresentOpenedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { PresentOpenedMessageParser } from '../../../../parser/inventory/furniture/PresentOpenedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/pets/PetAddedToInventoryEvent.ts b/src/nitro/communication/messages/incoming/inventory/pets/PetAddedToInventoryEvent.ts index 31eb0db6..0f05b3e1 100644 --- a/src/nitro/communication/messages/incoming/inventory/pets/PetAddedToInventoryEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/pets/PetAddedToInventoryEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { PetAddedToInventoryParser } from '../../../parser/inventory/pets/PetAddedToInventoryParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/pets/PetInventoryEvent.ts b/src/nitro/communication/messages/incoming/inventory/pets/PetInventoryEvent.ts index cbf1cc23..5d1e3e81 100644 --- a/src/nitro/communication/messages/incoming/inventory/pets/PetInventoryEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/pets/PetInventoryEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { PetInventoryParser } from '../../../parser/inventory/pets/PetInventoryParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/pets/PetReceivedMessageEvent.ts b/src/nitro/communication/messages/incoming/inventory/pets/PetReceivedMessageEvent.ts index cfa6603b..391408cc 100644 --- a/src/nitro/communication/messages/incoming/inventory/pets/PetReceivedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/pets/PetReceivedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { PetReceivedMessageParser } from '../../../parser/inventory/pets/PetReceivedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/pets/PetRemovedFromInventoryEvent.ts b/src/nitro/communication/messages/incoming/inventory/pets/PetRemovedFromInventoryEvent.ts index 0e7c833c..3259b304 100644 --- a/src/nitro/communication/messages/incoming/inventory/pets/PetRemovedFromInventoryEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/pets/PetRemovedFromInventoryEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { PetRemovedFromInventoryParser } from '../../../parser/inventory/pets/PetRemovedFromInventoryParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/ItemDataStructure.ts b/src/nitro/communication/messages/incoming/inventory/trading/ItemDataStructure.ts index d465ee4c..a2e86a30 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/ItemDataStructure.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/ItemDataStructure.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; import { Nitro } from '../../../../../Nitro'; import { IObjectData } from '../../../../../room/object/data/IObjectData'; import { FurnitureDataParser } from '../../../parser/room/furniture/FurnitureDataParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingAcceptEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingAcceptEvent.ts index 3a471864..8bde2bb6 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingAcceptEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingAcceptEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingAcceptParser } from '../../../parser/inventory/trading/TradingAcceptParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingCloseEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingCloseEvent.ts index 4747ddf5..4bb40995 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingCloseEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingCloseEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingCloseParser } from '../../../parser/inventory/trading/TradingCloseParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingCompletedEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingCompletedEvent.ts index 8950725c..05eb065d 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingCompletedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingCompletedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingCompletedParser } from '../../../parser/inventory/trading/TradingCompletedParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingConfirmationEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingConfirmationEvent.ts index 42d028d0..99ce1111 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingConfirmationEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingConfirmationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingConfirmationParser } from '../../../parser/inventory/trading/TradingConfirmationParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingListItemEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingListItemEvent.ts index 38638f45..fb4394c4 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingListItemEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingListItemEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingListItemParser } from '../../../parser/inventory/trading/TradingListItemParser'; import { ItemDataStructure } from './ItemDataStructure'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingNotOpenEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingNotOpenEvent.ts index a0771333..cf28e7ec 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingNotOpenEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingNotOpenEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingNotOpenParser } from '../../../parser/inventory/trading/TradingNotOpenParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingOpenEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingOpenEvent.ts index bf387f6d..790e5fc9 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingOpenEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingOpenEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingOpenParser } from '../../../parser/inventory/trading/TradingOpenParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingOpenFailedEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingOpenFailedEvent.ts index 4c7f5ed5..5c926406 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingOpenFailedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingOpenFailedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingOpenFailedParser } from '../../../parser/inventory/trading/TradingOpenFailedParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingOtherNotAllowedEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingOtherNotAllowedEvent.ts index aea5be20..8866d63d 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingOtherNotAllowedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingOtherNotAllowedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingOtherNotAllowedParser } from '../../../parser/inventory/trading/TradingOtherNotAllowedParser'; diff --git a/src/nitro/communication/messages/incoming/inventory/trading/TradingYouAreNotAllowedEvent.ts b/src/nitro/communication/messages/incoming/inventory/trading/TradingYouAreNotAllowedEvent.ts index 7d37ab00..ac80bd45 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/TradingYouAreNotAllowedEvent.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/TradingYouAreNotAllowedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { TradingYouAreNotAllowedParser } from '../../../parser/inventory/trading/TradingYouAreNotAllowedParser'; diff --git a/src/nitro/communication/messages/incoming/landingview/PromoArticleData.ts b/src/nitro/communication/messages/incoming/landingview/PromoArticleData.ts index 69f4cf8d..088569cd 100644 --- a/src/nitro/communication/messages/incoming/landingview/PromoArticleData.ts +++ b/src/nitro/communication/messages/incoming/landingview/PromoArticleData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class PromoArticleData { diff --git a/src/nitro/communication/messages/incoming/landingview/PromoArticlesMessageEvent.ts b/src/nitro/communication/messages/incoming/landingview/PromoArticlesMessageEvent.ts index 53b66a91..37383273 100644 --- a/src/nitro/communication/messages/incoming/landingview/PromoArticlesMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/landingview/PromoArticlesMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PromoArticlesMessageParser } from '../../parser/landingview/PromoArticlesMessageParser'; diff --git a/src/nitro/communication/messages/incoming/landingview/votes/CommunityGoalVoteMessageEvent.ts b/src/nitro/communication/messages/incoming/landingview/votes/CommunityGoalVoteMessageEvent.ts index f8e7a8bd..cd28aefc 100644 --- a/src/nitro/communication/messages/incoming/landingview/votes/CommunityGoalVoteMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/landingview/votes/CommunityGoalVoteMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { CommunityVoteReceivedParser } from '../../../parser/landingview/votes/CommunityVoteReceivedParser'; diff --git a/src/nitro/communication/messages/incoming/marketplace/MarketplaceBuyOfferResultEvent.ts b/src/nitro/communication/messages/incoming/marketplace/MarketplaceBuyOfferResultEvent.ts index 234908d0..9a82e32c 100644 --- a/src/nitro/communication/messages/incoming/marketplace/MarketplaceBuyOfferResultEvent.ts +++ b/src/nitro/communication/messages/incoming/marketplace/MarketplaceBuyOfferResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MarketplaceBuyOfferResultParser } from '../../parser/marketplace/MarketplaceBuyOfferResultParser'; diff --git a/src/nitro/communication/messages/incoming/marketplace/MarketplaceCanMakeOfferResult.ts b/src/nitro/communication/messages/incoming/marketplace/MarketplaceCanMakeOfferResult.ts index 43d1ee98..e122bcb7 100644 --- a/src/nitro/communication/messages/incoming/marketplace/MarketplaceCanMakeOfferResult.ts +++ b/src/nitro/communication/messages/incoming/marketplace/MarketplaceCanMakeOfferResult.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MarketplaceCanMakeOfferResultParser } from '../../parser/marketplace/MarketplaceCanMakeOfferResultParser'; diff --git a/src/nitro/communication/messages/incoming/marketplace/MarketplaceCancelOfferResultEvent.ts b/src/nitro/communication/messages/incoming/marketplace/MarketplaceCancelOfferResultEvent.ts index cee1646d..12274fb5 100644 --- a/src/nitro/communication/messages/incoming/marketplace/MarketplaceCancelOfferResultEvent.ts +++ b/src/nitro/communication/messages/incoming/marketplace/MarketplaceCancelOfferResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MarketplaceCancelOfferResultParser } from '../../parser/marketplace/MarketplaceCancelOfferResultParser'; diff --git a/src/nitro/communication/messages/incoming/marketplace/MarketplaceConfigurationEvent.ts b/src/nitro/communication/messages/incoming/marketplace/MarketplaceConfigurationEvent.ts index ac957ee1..6c5a015c 100644 --- a/src/nitro/communication/messages/incoming/marketplace/MarketplaceConfigurationEvent.ts +++ b/src/nitro/communication/messages/incoming/marketplace/MarketplaceConfigurationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MarketplaceConfigurationMessageParser } from '../../parser/marketplace/MarketplaceConfigurationMessageParser'; diff --git a/src/nitro/communication/messages/incoming/marketplace/MarketplaceItemStatsEvent.ts b/src/nitro/communication/messages/incoming/marketplace/MarketplaceItemStatsEvent.ts index b29cad1e..c312132b 100644 --- a/src/nitro/communication/messages/incoming/marketplace/MarketplaceItemStatsEvent.ts +++ b/src/nitro/communication/messages/incoming/marketplace/MarketplaceItemStatsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MarketplaceItemStatsParser } from '../../parser/marketplace/MarketplaceItemStatsParser'; diff --git a/src/nitro/communication/messages/incoming/marketplace/MarketplaceMakeOfferResult.ts b/src/nitro/communication/messages/incoming/marketplace/MarketplaceMakeOfferResult.ts index 8a006cd6..98b9c8ff 100644 --- a/src/nitro/communication/messages/incoming/marketplace/MarketplaceMakeOfferResult.ts +++ b/src/nitro/communication/messages/incoming/marketplace/MarketplaceMakeOfferResult.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MarketplaceMakeOfferResultParser } from '../../parser/marketplace/MarketplaceItemPostedParser'; diff --git a/src/nitro/communication/messages/incoming/marketplace/MarketplaceOffersEvent.ts b/src/nitro/communication/messages/incoming/marketplace/MarketplaceOffersEvent.ts index 6f3d0e74..a17b11ea 100644 --- a/src/nitro/communication/messages/incoming/marketplace/MarketplaceOffersEvent.ts +++ b/src/nitro/communication/messages/incoming/marketplace/MarketplaceOffersEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MarketplaceOffersParser } from '../../parser/marketplace/MarketplaceOffersParser'; diff --git a/src/nitro/communication/messages/incoming/marketplace/MarketplaceOwnOffersEvent.ts b/src/nitro/communication/messages/incoming/marketplace/MarketplaceOwnOffersEvent.ts index 57220249..22e22244 100644 --- a/src/nitro/communication/messages/incoming/marketplace/MarketplaceOwnOffersEvent.ts +++ b/src/nitro/communication/messages/incoming/marketplace/MarketplaceOwnOffersEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MarketplaceOwnOffersParser } from '../../parser/marketplace/MarketplaceOwnOffersParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/CfhChatlogData.ts b/src/nitro/communication/messages/incoming/moderation/CfhChatlogData.ts index 58a90314..b9cc8bdc 100644 --- a/src/nitro/communication/messages/incoming/moderation/CfhChatlogData.ts +++ b/src/nitro/communication/messages/incoming/moderation/CfhChatlogData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { ChatRecordData } from './ChatRecordData'; export class CfhChatlogData @@ -9,7 +9,7 @@ export class CfhChatlogData private _chatRecordId: number; private _chatRecord: ChatRecordData; - constructor(k:IMessageDataWrapper) + constructor(k: IMessageDataWrapper) { this._issueId = k.readInt(); this._callerUserId = k.readInt(); diff --git a/src/nitro/communication/messages/incoming/moderation/CfhChatlogEvent.ts b/src/nitro/communication/messages/incoming/moderation/CfhChatlogEvent.ts index f6abdf5a..6c063894 100644 --- a/src/nitro/communication/messages/incoming/moderation/CfhChatlogEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/CfhChatlogEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CfhChatlogMessageParser } from '../../parser/moderation/CfhChatlogMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/IssueDeletedMessageEvent.ts b/src/nitro/communication/messages/incoming/moderation/IssueDeletedMessageEvent.ts index a284b936..26cffafe 100644 --- a/src/nitro/communication/messages/incoming/moderation/IssueDeletedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/IssueDeletedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { IssueDeletedMessageParser } from '../../parser/moderation/IssueDeletedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/IssueInfoMessageEvent.ts b/src/nitro/communication/messages/incoming/moderation/IssueInfoMessageEvent.ts index c0333171..6b7c0472 100644 --- a/src/nitro/communication/messages/incoming/moderation/IssueInfoMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/IssueInfoMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { IssueInfoMessageParser } from '../../parser/moderation/IssueInfoMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/IssuePickFailedMessageEvent.ts b/src/nitro/communication/messages/incoming/moderation/IssuePickFailedMessageEvent.ts index 23dfcc91..08b012ae 100644 --- a/src/nitro/communication/messages/incoming/moderation/IssuePickFailedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/IssuePickFailedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { IssuePickFailedMessageParser } from '../../parser/moderation/IssuePickFailedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/ModRoomData.ts b/src/nitro/communication/messages/incoming/moderation/ModRoomData.ts index 9fef6466..494c24a1 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModRoomData.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModRoomData.ts @@ -1,19 +1,18 @@ -import { IDisposable } from '../../../../../core/common/disposable/IDisposable'; -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IDisposable, IMessageDataWrapper } from '../../../../../api'; export class ModRoomData implements IDisposable { - private _exists:boolean; - private _name:string; - private _desc:string; - private _tags:string[]; - private _disposed:boolean; + private _exists: boolean; + private _name: string; + private _desc: string; + private _tags: string[]; + private _disposed: boolean; - constructor(k:IMessageDataWrapper) + constructor(k: IMessageDataWrapper) { this._tags = []; this._exists = k.readBoolean(); - if(!this.exists) + if (!this.exists) { return; } @@ -22,40 +21,40 @@ export class ModRoomData implements IDisposable const tagCount = k.readInt(); - for(let i = 0; i < tagCount; i++) + for (let i = 0; i < tagCount; i++) { this._tags.push(k.readString()); } } - public get name():string + public get name(): string { return this._name; } - public get desc():string + public get desc(): string { return this._desc; } - public get tags():string[] + public get tags(): string[] { return this._tags; } - public get exists():boolean + public get exists(): boolean { return this._exists; } - public get disposed():boolean + public get disposed(): boolean { return this._disposed; } - public dispose():void + public dispose(): void { - if(this._disposed) + if (this._disposed) { return; } diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorActionResultMessageEvent.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorActionResultMessageEvent.ts index 67aecfad..84685f87 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModeratorActionResultMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorActionResultMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ModeratorActionResultMessageParser } from '../../parser/moderation/ModeratorActionResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorCautionEvent.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorCautionEvent.ts index 9b14a0b9..c116e9ec 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModeratorCautionEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorCautionEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ModerationCautionParser } from '../../parser/moderation'; diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorInitMessageEvent.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorInitMessageEvent.ts index 141f13a8..4b5f0d55 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModeratorInitMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorInitMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ModeratorInitMessageParser } from '../../parser/moderation/ModeratorInitMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorMessageEvent.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorMessageEvent.ts index 58103ccf..1cbefc0f 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModeratorMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ModeratorMessageParser } from '../../parser/moderation/ModeratorMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorRoomInfoEvent.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorRoomInfoEvent.ts index b70e209a..83b7f408 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModeratorRoomInfoEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorRoomInfoEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ModeratorRoomInfoMessageParser } from '../../parser/moderation/ModeratorRoomInfoMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorToolPreferencesEvent.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorToolPreferencesEvent.ts index 3dd6f913..19e18085 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModeratorToolPreferencesEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorToolPreferencesEvent.ts @@ -1,5 +1,5 @@ import { ModeratorToolPreferencesMessageParser } from '../..'; -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; export class ModeratorToolPreferencesEvent extends MessageEvent implements IMessageEvent diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoData.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoData.ts index 83d20d82..b69d7d47 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoData.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class ModeratorUserInfoData { @@ -41,7 +41,7 @@ export class ModeratorUserInfoData this._identityRelatedBanCount = wrapper.readInt(); this._primaryEmailAddress = wrapper.readString(); this._userClassification = wrapper.readString(); - if(wrapper.bytesAvailable) + if (wrapper.bytesAvailable) { this._lastSanctionTime = wrapper.readString(); this._sanctionAgeHours = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoEvent.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoEvent.ts index 2da99427..7acb4602 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ModeratorUserInfoMessageParser } from '../../parser/moderation/ModeratorUserInfoMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/RoomChatlogEvent.ts b/src/nitro/communication/messages/incoming/moderation/RoomChatlogEvent.ts index 791a2b30..953ef352 100644 --- a/src/nitro/communication/messages/incoming/moderation/RoomChatlogEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/RoomChatlogEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomChatlogMessageParser } from '../../parser/moderation/RoomChatlogMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/RoomModerationData.ts b/src/nitro/communication/messages/incoming/moderation/RoomModerationData.ts index 1a7950c5..7692d854 100644 --- a/src/nitro/communication/messages/incoming/moderation/RoomModerationData.ts +++ b/src/nitro/communication/messages/incoming/moderation/RoomModerationData.ts @@ -1,18 +1,17 @@ -import { IDisposable } from '../../../../../core/common/disposable/IDisposable'; -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IDisposable, IMessageDataWrapper } from '../../../../../api'; import { ModRoomData } from './ModRoomData'; export class RoomModerationData implements IDisposable { - private _flatId:number; - private _userCount:number; - private _ownerInRoom:boolean; - private _ownerId:number; - private _ownerName:string; - private _room:ModRoomData; - private _disposed:boolean; + private _flatId: number; + private _userCount: number; + private _ownerInRoom: boolean; + private _ownerId: number; + private _ownerName: string; + private _room: ModRoomData; + private _disposed: boolean; - constructor(k:IMessageDataWrapper) + constructor(k: IMessageDataWrapper) { this._flatId = k.readInt(); this._userCount = k.readInt(); @@ -22,49 +21,49 @@ export class RoomModerationData implements IDisposable this._room = new ModRoomData(k); } - public get flatId():number + public get flatId(): number { return this._flatId; } - public get userCount():number + public get userCount(): number { return this._userCount; } - public get ownerInRoom():boolean + public get ownerInRoom(): boolean { return this._ownerInRoom; } - public get ownerId():number + public get ownerId(): number { return this._ownerId; } - public get ownerName():string + public get ownerName(): string { return this._ownerName; } - public get room():ModRoomData + public get room(): ModRoomData { return this._room; } - public get disposed():boolean + public get disposed(): boolean { return this._disposed; } - public dispose():void + public dispose(): void { - if(this._disposed) + if (this._disposed) { return; } this._disposed = true; - if(this._room != null) + if (this._room != null) { this._room.dispose(); this._room = null; diff --git a/src/nitro/communication/messages/incoming/moderation/RoomVisitData.ts b/src/nitro/communication/messages/incoming/moderation/RoomVisitData.ts index f1026f8a..f97d792d 100644 --- a/src/nitro/communication/messages/incoming/moderation/RoomVisitData.ts +++ b/src/nitro/communication/messages/incoming/moderation/RoomVisitData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class RoomVisitData { @@ -7,7 +7,7 @@ export class RoomVisitData private _enterHour: number; private _enterMinute: number; - constructor(k:IMessageDataWrapper) + constructor(k: IMessageDataWrapper) { this._roomId = k.readInt(); this._roomName = k.readString(); diff --git a/src/nitro/communication/messages/incoming/moderation/RoomVisitsData.ts b/src/nitro/communication/messages/incoming/moderation/RoomVisitsData.ts index cc72cb10..d1df7320 100644 --- a/src/nitro/communication/messages/incoming/moderation/RoomVisitsData.ts +++ b/src/nitro/communication/messages/incoming/moderation/RoomVisitsData.ts @@ -1,20 +1,20 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { RoomVisitData } from './RoomVisitData'; export class RoomVisitsData { private _userId: number; private _userName: string; - private _rooms:RoomVisitData[]; + private _rooms: RoomVisitData[]; - constructor(k:IMessageDataWrapper) + constructor(k: IMessageDataWrapper) { this._rooms = []; this._userId = k.readInt(); this._userName = k.readString(); const _local_2 = k.readInt(); let _local_3 = 0; - while(_local_3 < _local_2) + while (_local_3 < _local_2) { this._rooms.push(new RoomVisitData(k)); _local_3++; @@ -31,7 +31,7 @@ export class RoomVisitsData return this._userName; } - public get rooms():RoomVisitData[] + public get rooms(): RoomVisitData[] { return this._rooms; } diff --git a/src/nitro/communication/messages/incoming/moderation/RoomVisitsEvent.ts b/src/nitro/communication/messages/incoming/moderation/RoomVisitsEvent.ts index 29ff7201..7634ac06 100644 --- a/src/nitro/communication/messages/incoming/moderation/RoomVisitsEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/RoomVisitsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomVisitsMessageParser } from '../../parser/moderation/RoomVisitsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/moderation/UserBannedMessageEvent.ts b/src/nitro/communication/messages/incoming/moderation/UserBannedMessageEvent.ts index e30f5cd7..f815a2bf 100644 --- a/src/nitro/communication/messages/incoming/moderation/UserBannedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/UserBannedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UserBannedMessageParser } from '../../parser/moderation'; diff --git a/src/nitro/communication/messages/incoming/moderation/UserChatlogEvent.ts b/src/nitro/communication/messages/incoming/moderation/UserChatlogEvent.ts index 2413b2e7..a9ce8efe 100644 --- a/src/nitro/communication/messages/incoming/moderation/UserChatlogEvent.ts +++ b/src/nitro/communication/messages/incoming/moderation/UserChatlogEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UserChatlogMessageParser } from '../../parser/moderation/UserChatlogMessageParser'; diff --git a/src/nitro/communication/messages/incoming/mysterybox/MysteryBoxKeysEvent.ts b/src/nitro/communication/messages/incoming/mysterybox/MysteryBoxKeysEvent.ts index e14442bc..deb2bf87 100644 --- a/src/nitro/communication/messages/incoming/mysterybox/MysteryBoxKeysEvent.ts +++ b/src/nitro/communication/messages/incoming/mysterybox/MysteryBoxKeysEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MysteryBoxKeysParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEvent.ts b/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEvent.ts index df5bc54e..f93f2487 100644 --- a/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CanCreateRoomMessageParser } from '../../parser/navigator/CanCreateRoomMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEventEvent.ts b/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEventEvent.ts index 8ba7b352..640762d3 100644 --- a/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEventEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/CanCreateRoomEventEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CanCreateRoomEventParser } from '../../parser/navigator/CanCreateRoomEventParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/CategoriesWithVisitorCountEvent.ts b/src/nitro/communication/messages/incoming/navigator/CategoriesWithVisitorCountEvent.ts index 4c8be049..7067825f 100644 --- a/src/nitro/communication/messages/incoming/navigator/CategoriesWithVisitorCountEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/CategoriesWithVisitorCountEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CategoriesWithVisitorCountParser } from '../../parser/navigator/CategoriesWithVisitorCountParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/CompetitionRoomsDataMessageEvent.ts b/src/nitro/communication/messages/incoming/navigator/CompetitionRoomsDataMessageEvent.ts index 09328563..b01a183a 100644 --- a/src/nitro/communication/messages/incoming/navigator/CompetitionRoomsDataMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/CompetitionRoomsDataMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CompetitionRoomsDataMessageParser } from '../../parser/navigator/CompetitionRoomsDataMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/ConvertedRoomIdEvent.ts b/src/nitro/communication/messages/incoming/navigator/ConvertedRoomIdEvent.ts index 7acb8c2e..b4ae67b1 100644 --- a/src/nitro/communication/messages/incoming/navigator/ConvertedRoomIdEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/ConvertedRoomIdEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ConvertedRoomIdMessageParser } from '../../parser/navigator/ConvertedRoomIdMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/DoorbellMessageEvent.ts b/src/nitro/communication/messages/incoming/navigator/DoorbellMessageEvent.ts index ae5629cf..073c559b 100644 --- a/src/nitro/communication/messages/incoming/navigator/DoorbellMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/DoorbellMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { DoorbellMessageParser } from '../../parser/navigator/DoorbellMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/FavouriteChangedEvent.ts b/src/nitro/communication/messages/incoming/navigator/FavouriteChangedEvent.ts index 271abb37..43163d2f 100644 --- a/src/nitro/communication/messages/incoming/navigator/FavouriteChangedEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/FavouriteChangedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FavouriteChangedMessageParser } from '../../parser/navigator/FavouriteChangedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/FavouritesEvent.ts b/src/nitro/communication/messages/incoming/navigator/FavouritesEvent.ts index 99bc50c4..a4d69df8 100644 --- a/src/nitro/communication/messages/incoming/navigator/FavouritesEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/FavouritesEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FavouritesMessageParser } from '../../parser/navigator/FavouritesMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent.ts b/src/nitro/communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent.ts index 090f314c..2fc26f4a 100644 --- a/src/nitro/communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FlatAccessDeniedMessageParser } from '../../parser/navigator/FlatAccessDeniedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/FlatCreatedEvent.ts b/src/nitro/communication/messages/incoming/navigator/FlatCreatedEvent.ts index a37585a1..805994ec 100644 --- a/src/nitro/communication/messages/incoming/navigator/FlatCreatedEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/FlatCreatedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FlatCreatedMessageParser } from '../../parser/navigator/FlatCreatedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/GetGuestRoomResultEvent.ts b/src/nitro/communication/messages/incoming/navigator/GetGuestRoomResultEvent.ts index 214af93d..c33c1384 100644 --- a/src/nitro/communication/messages/incoming/navigator/GetGuestRoomResultEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/GetGuestRoomResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GetGuestRoomResultMessageParser } from '../../parser/navigator/GetGuestRoomResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/GuestRoomSearchResultEvent.ts b/src/nitro/communication/messages/incoming/navigator/GuestRoomSearchResultEvent.ts index e1c4b0b2..01fbcf2d 100644 --- a/src/nitro/communication/messages/incoming/navigator/GuestRoomSearchResultEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/GuestRoomSearchResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuestRoomSearchResultMessageParser } from '../../parser/navigator/GuestRoomSearchResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorCollapsedEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorCollapsedEvent.ts index a26e0de2..d13149d3 100644 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorCollapsedEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/NavigatorCollapsedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NavigatorCollapsedParser } from '../../parser/navigator/NavigatorCollapsedParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorHomeRoomEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorHomeRoomEvent.ts index 932c57d5..440456e5 100644 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorHomeRoomEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/NavigatorHomeRoomEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NavigatorHomeRoomParser } from '../../parser/navigator/NavigatorHomeRoomParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorLiftedEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorLiftedEvent.ts index 4ec1f8e0..842737e9 100644 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorLiftedEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/NavigatorLiftedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NavigatorLiftedParser } from '../../parser/navigator/NavigatorLiftedParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorMetadataEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorMetadataEvent.ts index c4fe9c05..a25edec1 100644 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorMetadataEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/NavigatorMetadataEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NavigatorMetadataParser } from '../../parser/navigator/NavigatorMetadataParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorOpenRoomCreatorEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorOpenRoomCreatorEvent.ts index ae203f0d..4e138171 100644 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorOpenRoomCreatorEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/NavigatorOpenRoomCreatorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NavigatorOpenRoomCreatorParser } from '../../parser/navigator/NavigatorOpenRoomCreatorParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorSearchEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorSearchEvent.ts index a6e877eb..98e855f0 100644 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorSearchEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/NavigatorSearchEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NavigatorSearchParser } from '../../parser/navigator/NavigatorSearchParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorSearchesEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorSearchesEvent.ts index 102e7d11..6e6c13a1 100644 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorSearchesEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/NavigatorSearchesEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NavigatorSearchesParser } from '../../parser/navigator/NavigatorSearchesParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/NavigatorSettingsEvent.ts b/src/nitro/communication/messages/incoming/navigator/NavigatorSettingsEvent.ts index 253667cb..bfef4202 100644 --- a/src/nitro/communication/messages/incoming/navigator/NavigatorSettingsEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/NavigatorSettingsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NavigatorSettingsParser } from '../../parser/navigator/NavigatorSettingsParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/RoomEventCancelEvent.ts b/src/nitro/communication/messages/incoming/navigator/RoomEventCancelEvent.ts index da2a3ac7..ffce09ba 100644 --- a/src/nitro/communication/messages/incoming/navigator/RoomEventCancelEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/RoomEventCancelEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomEventCancelMessageParser } from '../../parser/navigator/RoomEventCancelMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/RoomEventEvent.ts b/src/nitro/communication/messages/incoming/navigator/RoomEventEvent.ts index f8a543d2..30b45e3e 100644 --- a/src/nitro/communication/messages/incoming/navigator/RoomEventEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/RoomEventEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomEventMessageParser } from '../../parser/navigator/RoomEventMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/RoomSettingsUpdatedEvent.ts b/src/nitro/communication/messages/incoming/navigator/RoomSettingsUpdatedEvent.ts index 4a1dfdb4..9c56a7fc 100644 --- a/src/nitro/communication/messages/incoming/navigator/RoomSettingsUpdatedEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/RoomSettingsUpdatedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomSettingsUpdatedParser } from '../../parser/navigator/RoomSettingsUpdatedParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/RoomThumbnailUpdateResultEvent.ts b/src/nitro/communication/messages/incoming/navigator/RoomThumbnailUpdateResultEvent.ts index 8631f984..2068c703 100644 --- a/src/nitro/communication/messages/incoming/navigator/RoomThumbnailUpdateResultEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/RoomThumbnailUpdateResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomThumbnailUpdateResultMessageParser } from '../../parser/navigator/RoomThumbnailUpdateResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/UserEventCatsEvent.ts b/src/nitro/communication/messages/incoming/navigator/UserEventCatsEvent.ts index b05f026d..20ad89ba 100644 --- a/src/nitro/communication/messages/incoming/navigator/UserEventCatsEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/UserEventCatsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UserEventCatsMessageParser } from '../../parser/navigator/UserEventCatsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/navigator/UserFlatCatsEvent.ts b/src/nitro/communication/messages/incoming/navigator/UserFlatCatsEvent.ts index 205653fc..02855b93 100644 --- a/src/nitro/communication/messages/incoming/navigator/UserFlatCatsEvent.ts +++ b/src/nitro/communication/messages/incoming/navigator/UserFlatCatsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UserFlatCatsMessageParser } from '../../parser/navigator/UserFlatCatsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/notifications/AchievementLevelUpData.ts b/src/nitro/communication/messages/incoming/notifications/AchievementLevelUpData.ts index 0a7706ab..46be6264 100644 --- a/src/nitro/communication/messages/incoming/notifications/AchievementLevelUpData.ts +++ b/src/nitro/communication/messages/incoming/notifications/AchievementLevelUpData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class AchievementLevelUpData { diff --git a/src/nitro/communication/messages/incoming/notifications/AchievementNotificationMessageEvent.ts b/src/nitro/communication/messages/incoming/notifications/AchievementNotificationMessageEvent.ts index c30d245a..4684a838 100644 --- a/src/nitro/communication/messages/incoming/notifications/AchievementNotificationMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/AchievementNotificationMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { AchievementNotificationMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/notifications/ActivityPointNotificationMessageEvent.ts b/src/nitro/communication/messages/incoming/notifications/ActivityPointNotificationMessageEvent.ts index 867192e7..29863e05 100644 --- a/src/nitro/communication/messages/incoming/notifications/ActivityPointNotificationMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/ActivityPointNotificationMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ActivityPointNotificationParser } from '../../parser/notifications/ActivityPointNotificationParser'; diff --git a/src/nitro/communication/messages/incoming/notifications/BotErrorEvent.ts b/src/nitro/communication/messages/incoming/notifications/BotErrorEvent.ts index 579c71f2..582698d8 100644 --- a/src/nitro/communication/messages/incoming/notifications/BotErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/BotErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BotErrorEventParser } from '../../parser/notifications/BotErrorEventParser'; diff --git a/src/nitro/communication/messages/incoming/notifications/ClubGiftNotificationEvent.ts b/src/nitro/communication/messages/incoming/notifications/ClubGiftNotificationEvent.ts index 9323d6c1..448f2319 100644 --- a/src/nitro/communication/messages/incoming/notifications/ClubGiftNotificationEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/ClubGiftNotificationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ClubGiftNotificationParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/notifications/HabboBroadcastMessageEvent.ts b/src/nitro/communication/messages/incoming/notifications/HabboBroadcastMessageEvent.ts index a69ea648..fbd8714e 100644 --- a/src/nitro/communication/messages/incoming/notifications/HabboBroadcastMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/HabboBroadcastMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HabboBroadcastMessageParser } from '../../parser/notifications/HabboBroadcastMessageParser'; diff --git a/src/nitro/communication/messages/incoming/notifications/HotelWillShutdownEvent.ts b/src/nitro/communication/messages/incoming/notifications/HotelWillShutdownEvent.ts index 6cc44385..6363768b 100644 --- a/src/nitro/communication/messages/incoming/notifications/HotelWillShutdownEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/HotelWillShutdownEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HotelWillShutdownParser } from '../../parser/notifications/HotelWillShutdownParser'; diff --git a/src/nitro/communication/messages/incoming/notifications/InfoFeedEnableMessageEvent.ts b/src/nitro/communication/messages/incoming/notifications/InfoFeedEnableMessageEvent.ts index dc30732d..041f3a25 100644 --- a/src/nitro/communication/messages/incoming/notifications/InfoFeedEnableMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/InfoFeedEnableMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { InfoFeedEnableMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/notifications/MOTDNotificationEvent.ts b/src/nitro/communication/messages/incoming/notifications/MOTDNotificationEvent.ts index 58453a47..7843f508 100644 --- a/src/nitro/communication/messages/incoming/notifications/MOTDNotificationEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/MOTDNotificationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MOTDNotificationParser } from '../../parser/notifications/MOTDNotificationParser'; diff --git a/src/nitro/communication/messages/incoming/notifications/NotificationDialogMessageEvent.ts b/src/nitro/communication/messages/incoming/notifications/NotificationDialogMessageEvent.ts index a377eb35..15e52eff 100644 --- a/src/nitro/communication/messages/incoming/notifications/NotificationDialogMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/NotificationDialogMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NotificationDialogMessageParser } from '../../parser/notifications/NotificationDialogMessageParser'; diff --git a/src/nitro/communication/messages/incoming/notifications/PetLevelNotificationEvent.ts b/src/nitro/communication/messages/incoming/notifications/PetLevelNotificationEvent.ts index ae78db32..9d4dc7ff 100644 --- a/src/nitro/communication/messages/incoming/notifications/PetLevelNotificationEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/PetLevelNotificationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PetLevelNotificationParser } from '../../parser/notifications/PetLevelNotificationParser'; diff --git a/src/nitro/communication/messages/incoming/notifications/PetPlacingErrorEvent.ts b/src/nitro/communication/messages/incoming/notifications/PetPlacingErrorEvent.ts index a9291352..0e7f7c76 100644 --- a/src/nitro/communication/messages/incoming/notifications/PetPlacingErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/PetPlacingErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PetPlacingErrorEventParser } from '../../parser/notifications/PetPlacingErrorEventParser'; diff --git a/src/nitro/communication/messages/incoming/notifications/UnseenItemsEvent.ts b/src/nitro/communication/messages/incoming/notifications/UnseenItemsEvent.ts index ef13bcb1..f12f928c 100644 --- a/src/nitro/communication/messages/incoming/notifications/UnseenItemsEvent.ts +++ b/src/nitro/communication/messages/incoming/notifications/UnseenItemsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UnseenItemsParser } from '../../parser/notifications/UnseenItemsParser'; diff --git a/src/nitro/communication/messages/incoming/perk/PerkAllowancesMessageEvent.ts b/src/nitro/communication/messages/incoming/perk/PerkAllowancesMessageEvent.ts index dc117805..dd9099e9 100644 --- a/src/nitro/communication/messages/incoming/perk/PerkAllowancesMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/perk/PerkAllowancesMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PerkAllowancesMessageParser } from './../../parser/perk/PerkAllowancesMessageParser'; diff --git a/src/nitro/communication/messages/incoming/poll/PollContentsEvent.ts b/src/nitro/communication/messages/incoming/poll/PollContentsEvent.ts index b8e70ad9..7972bb60 100644 --- a/src/nitro/communication/messages/incoming/poll/PollContentsEvent.ts +++ b/src/nitro/communication/messages/incoming/poll/PollContentsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PollContentsParser } from '../../parser/poll/PollContentsParser'; diff --git a/src/nitro/communication/messages/incoming/poll/PollErrorEvent.ts b/src/nitro/communication/messages/incoming/poll/PollErrorEvent.ts index b70d82bd..d78e2541 100644 --- a/src/nitro/communication/messages/incoming/poll/PollErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/poll/PollErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PollErrorParser } from '../../parser/poll/PollErrorParser'; diff --git a/src/nitro/communication/messages/incoming/poll/PollOfferEvent.ts b/src/nitro/communication/messages/incoming/poll/PollOfferEvent.ts index e7bdf1b1..4034f1b5 100644 --- a/src/nitro/communication/messages/incoming/poll/PollOfferEvent.ts +++ b/src/nitro/communication/messages/incoming/poll/PollOfferEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PollOfferParser } from '../../parser/poll/PollOfferParser'; diff --git a/src/nitro/communication/messages/incoming/poll/QuestionAnsweredEvent.ts b/src/nitro/communication/messages/incoming/poll/QuestionAnsweredEvent.ts index 1a298384..33839529 100644 --- a/src/nitro/communication/messages/incoming/poll/QuestionAnsweredEvent.ts +++ b/src/nitro/communication/messages/incoming/poll/QuestionAnsweredEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuestionAnsweredParser } from '../../parser/poll/QuestionAnsweredParser'; diff --git a/src/nitro/communication/messages/incoming/poll/QuestionEvent.ts b/src/nitro/communication/messages/incoming/poll/QuestionEvent.ts index 19cedd68..481388d4 100644 --- a/src/nitro/communication/messages/incoming/poll/QuestionEvent.ts +++ b/src/nitro/communication/messages/incoming/poll/QuestionEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuestionParser } from '../../parser/poll/QuestionParser'; diff --git a/src/nitro/communication/messages/incoming/poll/QuestionFinishedEvent.ts b/src/nitro/communication/messages/incoming/poll/QuestionFinishedEvent.ts index 4ccf9c6a..c1218253 100644 --- a/src/nitro/communication/messages/incoming/poll/QuestionFinishedEvent.ts +++ b/src/nitro/communication/messages/incoming/poll/QuestionFinishedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuestionFinishedParser } from '../../parser/poll/QuestionFinishedParser'; diff --git a/src/nitro/communication/messages/incoming/quest/CommunityGoalData.ts b/src/nitro/communication/messages/incoming/quest/CommunityGoalData.ts index ff7276b2..5c6898c8 100644 --- a/src/nitro/communication/messages/incoming/quest/CommunityGoalData.ts +++ b/src/nitro/communication/messages/incoming/quest/CommunityGoalData.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IDisposable } from '../../../../../core/common/disposable/IDisposable'; +import { IDisposable, IMessageDataWrapper } from '../../../../../api'; export class CommunityGoalData implements IDisposable { @@ -28,7 +27,7 @@ export class CommunityGoalData implements IDisposable this._timeRemainingInSeconds = wrapper.readInt(); const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._rewardUserLimits.push(wrapper.readInt()); } diff --git a/src/nitro/communication/messages/incoming/quest/CommunityGoalEarnedPrizesMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/CommunityGoalEarnedPrizesMessageEvent.ts index cba6f877..cbfc5576 100644 --- a/src/nitro/communication/messages/incoming/quest/CommunityGoalEarnedPrizesMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/CommunityGoalEarnedPrizesMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CommunityGoalEarnedPrizesMessageParser } from '../../parser/quest/CommunityGoalEarnedPrizesMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/CommunityGoalHallOfFameData.ts b/src/nitro/communication/messages/incoming/quest/CommunityGoalHallOfFameData.ts index a952cbe3..5c19ed89 100644 --- a/src/nitro/communication/messages/incoming/quest/CommunityGoalHallOfFameData.ts +++ b/src/nitro/communication/messages/incoming/quest/CommunityGoalHallOfFameData.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IDisposable } from '../../../../../core/common/disposable/IDisposable'; +import { IDisposable, IMessageDataWrapper } from '../../../../../api'; import { HallOfFameEntryData } from './HallOfFameEntryData'; export class CommunityGoalHallOfFameData implements IDisposable @@ -14,7 +13,7 @@ export class CommunityGoalHallOfFameData implements IDisposable const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._hof.push(new HallOfFameEntryData(wrapper)); } diff --git a/src/nitro/communication/messages/incoming/quest/CommunityGoalHallOfFameMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/CommunityGoalHallOfFameMessageEvent.ts index f742686b..6b0961fd 100644 --- a/src/nitro/communication/messages/incoming/quest/CommunityGoalHallOfFameMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/CommunityGoalHallOfFameMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CommunityGoalHallOfFameMessageParser } from '../../parser/quest/CommunityGoalHallOfFameMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/CommunityGoalProgressMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/CommunityGoalProgressMessageEvent.ts index 8f9519fc..b8bc2765 100644 --- a/src/nitro/communication/messages/incoming/quest/CommunityGoalProgressMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/CommunityGoalProgressMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { CommunityGoalProgressMessageParser } from '../../parser/quest/CommunityGoalProgressMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/ConcurrentUsersGoalProgressMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/ConcurrentUsersGoalProgressMessageEvent.ts index 79fc4c8f..955c5464 100644 --- a/src/nitro/communication/messages/incoming/quest/ConcurrentUsersGoalProgressMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/ConcurrentUsersGoalProgressMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ConcurrentUsersGoalProgressMessageParser } from '../../parser/quest/ConcurrentUsersGoalProgressMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/EpicPopupMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/EpicPopupMessageEvent.ts index 7080827a..f14c3761 100644 --- a/src/nitro/communication/messages/incoming/quest/EpicPopupMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/EpicPopupMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { EpicPopupMessageParser } from '../../parser/quest/EpicPopupMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/HallOfFameEntryData.ts b/src/nitro/communication/messages/incoming/quest/HallOfFameEntryData.ts index 7a03d668..e80df1ea 100644 --- a/src/nitro/communication/messages/incoming/quest/HallOfFameEntryData.ts +++ b/src/nitro/communication/messages/incoming/quest/HallOfFameEntryData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { ILandingPageUserEntry } from './ILandingPageUserEntry'; export class HallOfFameEntryData implements ILandingPageUserEntry diff --git a/src/nitro/communication/messages/incoming/quest/PrizeData.ts b/src/nitro/communication/messages/incoming/quest/PrizeData.ts index f79efe9c..d3df2cf7 100644 --- a/src/nitro/communication/messages/incoming/quest/PrizeData.ts +++ b/src/nitro/communication/messages/incoming/quest/PrizeData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class PrizeData { diff --git a/src/nitro/communication/messages/incoming/quest/QuestCancelledMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/QuestCancelledMessageEvent.ts index 487ca547..f5672ca3 100644 --- a/src/nitro/communication/messages/incoming/quest/QuestCancelledMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/QuestCancelledMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuestCancelledMessageParser } from '../../parser/quest/QuestCancelledMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/QuestCompletedMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/QuestCompletedMessageEvent.ts index 8dd49e75..224f7e75 100644 --- a/src/nitro/communication/messages/incoming/quest/QuestCompletedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/QuestCompletedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuestCompletedMessageParser } from '../../parser/quest/QuestCompletedMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/QuestDailyMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/QuestDailyMessageEvent.ts index 886c4906..8697e792 100644 --- a/src/nitro/communication/messages/incoming/quest/QuestDailyMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/QuestDailyMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuestDailyMessageParser } from '../../parser/quest/QuestDailyMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/QuestMessageData.ts b/src/nitro/communication/messages/incoming/quest/QuestMessageData.ts index af284557..eced076d 100644 --- a/src/nitro/communication/messages/incoming/quest/QuestMessageData.ts +++ b/src/nitro/communication/messages/incoming/quest/QuestMessageData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class QuestMessageData { @@ -129,7 +129,7 @@ export class QuestMessageData public get waitPeriodSeconds(): number { - if(this._waitPeriodSeconds < 1) + if (this._waitPeriodSeconds < 1) { return 0; } diff --git a/src/nitro/communication/messages/incoming/quest/QuestMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/QuestMessageEvent.ts index a92ecad2..74750371 100644 --- a/src/nitro/communication/messages/incoming/quest/QuestMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/QuestMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuestMessageParser } from '../../parser/quest/QuestMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/QuestsMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/QuestsMessageEvent.ts index ca737872..c8edf80f 100644 --- a/src/nitro/communication/messages/incoming/quest/QuestsMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/QuestsMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { QuestsMessageParser } from '../../parser/quest/QuestsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/quest/SeasonalQuestsMessageEvent.ts b/src/nitro/communication/messages/incoming/quest/SeasonalQuestsMessageEvent.ts index f1de7034..f1487d88 100644 --- a/src/nitro/communication/messages/incoming/quest/SeasonalQuestsMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/quest/SeasonalQuestsMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { SeasonalQuestsParser } from '../../parser/quest/SeasonalQuestsParser'; diff --git a/src/nitro/communication/messages/incoming/room/access/RoomEnterErrorEvent.ts b/src/nitro/communication/messages/incoming/room/access/RoomEnterErrorEvent.ts index 7da823f2..99a6b2e1 100644 --- a/src/nitro/communication/messages/incoming/room/access/RoomEnterErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/room/access/RoomEnterErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { CantConnectMessageParser } from '../../../parser/room/access/CantConnectMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/access/RoomEnterEvent.ts b/src/nitro/communication/messages/incoming/room/access/RoomEnterEvent.ts index 5a56a7d2..1f33def8 100644 --- a/src/nitro/communication/messages/incoming/room/access/RoomEnterEvent.ts +++ b/src/nitro/communication/messages/incoming/room/access/RoomEnterEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomEnterParser } from '../../../parser/room/access/RoomEnterParser'; diff --git a/src/nitro/communication/messages/incoming/room/access/RoomForwardEvent.ts b/src/nitro/communication/messages/incoming/room/access/RoomForwardEvent.ts index f1935296..83689a22 100644 --- a/src/nitro/communication/messages/incoming/room/access/RoomForwardEvent.ts +++ b/src/nitro/communication/messages/incoming/room/access/RoomForwardEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomFowardParser as RoomForwardParser } from '../../../parser/room/access/RoomFowardParser'; diff --git a/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent.ts b/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent.ts index 4cb9a096..e99239ca 100644 --- a/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent.ts +++ b/src/nitro/communication/messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { RoomDoorbellAcceptedParser } from '../../../../parser/room/access/doorbell/RoomDoorbellAcceptedParser'; diff --git a/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsClearEvent.ts b/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsClearEvent.ts index 3056030a..2cc6eb76 100644 --- a/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsClearEvent.ts +++ b/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsClearEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { RoomRightsClearParser } from '../../../../parser/room/access/rights/RoomRightsClearParser'; diff --git a/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsEvent.ts b/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsEvent.ts index b1e10f96..8335aee5 100644 --- a/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsEvent.ts +++ b/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { RoomRightsParser } from '../../../../parser/room/access/rights/RoomRightsParser'; diff --git a/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsOwnerEvent.ts b/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsOwnerEvent.ts index 9c23418d..df7f4f3c 100644 --- a/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsOwnerEvent.ts +++ b/src/nitro/communication/messages/incoming/room/access/rights/RoomRightsOwnerEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { RoomRightsOwnerParser } from '../../../../parser/room/access/rights/RoomRightsOwnerParser'; diff --git a/src/nitro/communication/messages/incoming/room/bots/BotCommandConfigurationEvent.ts b/src/nitro/communication/messages/incoming/room/bots/BotCommandConfigurationEvent.ts index 2dfdee94..43514121 100644 --- a/src/nitro/communication/messages/incoming/room/bots/BotCommandConfigurationEvent.ts +++ b/src/nitro/communication/messages/incoming/room/bots/BotCommandConfigurationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { BotCommandConfigurationParser } from '../../../parser/room/bots/BotCommandConfigurationParser'; diff --git a/src/nitro/communication/messages/incoming/room/data/RoomChatSettingsEvent.ts b/src/nitro/communication/messages/incoming/room/data/RoomChatSettingsEvent.ts index 0a98da7a..1ad8654f 100644 --- a/src/nitro/communication/messages/incoming/room/data/RoomChatSettingsEvent.ts +++ b/src/nitro/communication/messages/incoming/room/data/RoomChatSettingsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomChatSettingsParser } from '../../../parser/room/data/RoomChatSettingsParser'; diff --git a/src/nitro/communication/messages/incoming/room/data/RoomEntryInfoMessageEvent.ts b/src/nitro/communication/messages/incoming/room/data/RoomEntryInfoMessageEvent.ts index bcf5f89a..831b9418 100644 --- a/src/nitro/communication/messages/incoming/room/data/RoomEntryInfoMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/data/RoomEntryInfoMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomEntryInfoMessageParser } from '../../../parser/room/data/RoomEntryInfoMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/data/RoomScoreEvent.ts b/src/nitro/communication/messages/incoming/room/data/RoomScoreEvent.ts index 30d257f4..ad96f97a 100644 --- a/src/nitro/communication/messages/incoming/room/data/RoomScoreEvent.ts +++ b/src/nitro/communication/messages/incoming/room/data/RoomScoreEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomScoreParser } from '../../../parser/room/data/RoomScoreParser'; diff --git a/src/nitro/communication/messages/incoming/room/engine/FavoriteMembershipUpdateMessageEvent.ts b/src/nitro/communication/messages/incoming/room/engine/FavoriteMembershipUpdateMessageEvent.ts index 102a67ce..fa458169 100644 --- a/src/nitro/communication/messages/incoming/room/engine/FavoriteMembershipUpdateMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/engine/FavoriteMembershipUpdateMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FavoriteMembershipUpdateMessageParser } from '../../../parser/room/engine/FavoriteMembershipUpdateMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/engine/ObjectsDataUpdateEvent.ts b/src/nitro/communication/messages/incoming/room/engine/ObjectsDataUpdateEvent.ts index 2a6035a2..f84e7930 100644 --- a/src/nitro/communication/messages/incoming/room/engine/ObjectsDataUpdateEvent.ts +++ b/src/nitro/communication/messages/incoming/room/engine/ObjectsDataUpdateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { ObjectsDataUpdateParser } from '../../../parser/room/engine/ObjectsDataUpdateParser'; diff --git a/src/nitro/communication/messages/incoming/room/engine/ObjectsRollingEvent.ts b/src/nitro/communication/messages/incoming/room/engine/ObjectsRollingEvent.ts index dad9d317..46a4c3de 100644 --- a/src/nitro/communication/messages/incoming/room/engine/ObjectsRollingEvent.ts +++ b/src/nitro/communication/messages/incoming/room/engine/ObjectsRollingEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { ObjectsRollingParser } from '../../../parser/room/engine/ObjectsRollingParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/CustomUserNotificationMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/CustomUserNotificationMessageEvent.ts index d2cedd4a..fac4da63 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/CustomUserNotificationMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/CustomUserNotificationMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { CustomUserNotificationMessageParser } from '../../../parser/room/furniture/CustomUserNotificationMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/DiceValueMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/DiceValueMessageEvent.ts index 1bf71fce..92ce7191 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/DiceValueMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/DiceValueMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { DiceValueMessageParser } from '../../../parser/room/furniture/DiceValueMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/FurnitureAliasesEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/FurnitureAliasesEvent.ts index a4240135..1e1638f2 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/FurnitureAliasesEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/FurnitureAliasesEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FurnitureAliasesParser } from '../../../parser/room/furniture/FurnitureAliasesParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/FurnitureDataEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/FurnitureDataEvent.ts index 8fcdf2ee..1858f210 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/FurnitureDataEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/FurnitureDataEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FurnitureDataParser } from '../../../parser/room/furniture/FurnitureDataParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/FurnitureStackHeightEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/FurnitureStackHeightEvent.ts index fe827ad3..f4b18460 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/FurnitureStackHeightEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/FurnitureStackHeightEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FurnitureStackHeightParser } from '../../../parser/room/furniture/FurnitureStackHeightParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/GroupFurniContextMenuInfoMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/GroupFurniContextMenuInfoMessageEvent.ts index 6dd79a19..0107453c 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/GroupFurniContextMenuInfoMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/GroupFurniContextMenuInfoMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { GroupFurniContextMenuInfoMessageParser } from '../../../parser/room/furniture/GroupFurniContextMenuInfoMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/ItemDataUpdateMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/ItemDataUpdateMessageEvent.ts index e50e0554..213162e9 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/ItemDataUpdateMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/ItemDataUpdateMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { ItemDataUpdateMessageParser } from '../../../parser/room/furniture/ItemDataUpdateMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniFinishedEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniFinishedEvent.ts index a8bdf2a7..5ac69940 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniFinishedEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniFinishedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { LoveLockFurniFinishedParser } from '../../../parser/room/furniture/LoveLockFurniFinishedParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniFriendConfirmedEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniFriendConfirmedEvent.ts index 3e279a31..801b9752 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniFriendConfirmedEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniFriendConfirmedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { LoveLockFurniFriendConfirmedParser } from '../../../parser/room/furniture/LoveLockFurniFriendConfirmedParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniStartEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniStartEvent.ts index 2c6ce083..68edb0ac 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniStartEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/LoveLockFurniStartEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { LoveLockFurniStartParser } from '../../../parser/room/furniture/LoveLockFurniStartParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/OneWayDoorStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/OneWayDoorStatusMessageEvent.ts index 03033c3b..6bdb1385 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/OneWayDoorStatusMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/OneWayDoorStatusMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { OneWayDoorStatusMessageParser } from '../../../parser/room/furniture/OneWayDoorStatusMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/RequestSpamWallPostItMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/RequestSpamWallPostItMessageEvent.ts index 110603aa..d634bc38 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/RequestSpamWallPostItMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/RequestSpamWallPostItMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RequestSpamWallPostItMessageParser } from '../../../parser/room/furniture/RequestSpamWallPostItMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/RoomDimmerPresetsMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/RoomDimmerPresetsMessageEvent.ts index db8df12b..a18dab09 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/RoomDimmerPresetsMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/RoomDimmerPresetsMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomDimmerPresetsMessageParser } from '../../../parser/room/furniture/RoomDimmerPresetsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorAddEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorAddEvent.ts index 129b57e3..30d4d36a 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorAddEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorAddEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { FurnitureFloorAddParser } from '../../../../parser/room/furniture/floor/FurnitureFloorAddParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorEvent.ts index 73e46045..a4c023bb 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { FurnitureFloorParser } from '../../../../parser/room/furniture/floor/FurnitureFloorParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorRemoveEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorRemoveEvent.ts index e21ae529..534f1a02 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorRemoveEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorRemoveEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { FurnitureFloorRemoveParser } from '../../../../parser/room/furniture/floor/FurnitureFloorRemoveParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorUpdateEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorUpdateEvent.ts index 6519dd10..d88d9775 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorUpdateEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/floor/FurnitureFloorUpdateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { FurnitureFloorUpdateParser } from '../../../../parser/room/furniture/floor/FurnitureFloorUpdateParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallAddEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallAddEvent.ts index 29c4c65d..f24144ee 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallAddEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallAddEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { FurnitureWallAddParser } from '../../../../parser/room/furniture/wall/FurnitureWallAddParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallEvent.ts index 8fbfcbfb..a5f3efed 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { FurnitureWallParser } from '../../../../parser/room/furniture/wall/FurnitureWallParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallRemoveEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallRemoveEvent.ts index eb37586d..1e11f5bb 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallRemoveEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallRemoveEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { FurnitureWallRemoveParser } from '../../../../parser/room/furniture/wall/FurnitureWallRemoveParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallUpdateEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallUpdateEvent.ts index 804e543d..d68b23c5 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallUpdateEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/wall/FurnitureWallUpdateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { FurnitureWallUpdateParser } from '../../../../parser/room/furniture/wall/FurnitureWallUpdateParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeControlVideoMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeControlVideoMessageEvent.ts index 3c9103b0..bdb4c5fc 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeControlVideoMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeControlVideoMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { YoutubeControlVideoMessageParser } from '../../../../parser/room/furniture/youtube/YoutubeControlVideoMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeDisplayPlaylistsEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeDisplayPlaylistsEvent.ts index 975e7ea8..bd0a0b3b 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeDisplayPlaylistsEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeDisplayPlaylistsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { YoutubeDisplayPlaylistsMessageParser } from '../../../../parser/room/furniture/youtube/YoutubeDisplayPlaylistsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeDisplayVideoMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeDisplayVideoMessageEvent.ts index 800fe638..bb74a36d 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeDisplayVideoMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/youtube/YoutubeDisplayVideoMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { YoutubeDisplayVideoMessageParser } from '../../../../parser/room/furniture/youtube/YoutubeDisplayVideoMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/mapping/FloorHeightMapEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/FloorHeightMapEvent.ts index 3d063798..009e4a39 100644 --- a/src/nitro/communication/messages/incoming/room/mapping/FloorHeightMapEvent.ts +++ b/src/nitro/communication/messages/incoming/room/mapping/FloorHeightMapEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { FloorHeightMapMessageParser } from '../../../parser/room/mapping/FloorHeightMapMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/mapping/RoomEntryTileMessageEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/RoomEntryTileMessageEvent.ts index 2e8edb9b..23834e69 100644 --- a/src/nitro/communication/messages/incoming/room/mapping/RoomEntryTileMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/mapping/RoomEntryTileMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomEntryTileMessageParser } from '../../../parser/room/mapping/RoomEntryTileMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/mapping/RoomHeightMapEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/RoomHeightMapEvent.ts index 43c3610c..6483908d 100644 --- a/src/nitro/communication/messages/incoming/room/mapping/RoomHeightMapEvent.ts +++ b/src/nitro/communication/messages/incoming/room/mapping/RoomHeightMapEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomHeightMapParser } from '../../../parser/room/mapping/RoomHeightMapParser'; diff --git a/src/nitro/communication/messages/incoming/room/mapping/RoomHeightMapUpdateEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/RoomHeightMapUpdateEvent.ts index bce5f62d..309c1417 100644 --- a/src/nitro/communication/messages/incoming/room/mapping/RoomHeightMapUpdateEvent.ts +++ b/src/nitro/communication/messages/incoming/room/mapping/RoomHeightMapUpdateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomHeightMapUpdateParser } from '../../../parser/room/mapping/RoomHeightMapUpdateParser'; diff --git a/src/nitro/communication/messages/incoming/room/mapping/RoomOccupiedTilesMessageEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/RoomOccupiedTilesMessageEvent.ts index c37a591b..f14c5a80 100644 --- a/src/nitro/communication/messages/incoming/room/mapping/RoomOccupiedTilesMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/mapping/RoomOccupiedTilesMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomOccupiedTilesMessageParser } from '../../../parser/room/mapping/RoomOccupiedTilesMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/mapping/RoomPaintEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/RoomPaintEvent.ts index d798a7e4..378ddd1b 100644 --- a/src/nitro/communication/messages/incoming/room/mapping/RoomPaintEvent.ts +++ b/src/nitro/communication/messages/incoming/room/mapping/RoomPaintEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomPaintParser } from '../../../parser/room/mapping/RoomPaintParser'; diff --git a/src/nitro/communication/messages/incoming/room/mapping/RoomReadyMessageEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/RoomReadyMessageEvent.ts index cad05381..30120df2 100644 --- a/src/nitro/communication/messages/incoming/room/mapping/RoomReadyMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/mapping/RoomReadyMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomReadyMessageParser } from '../../../parser/room/mapping/RoomReadyMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/mapping/RoomVisualizationSettingsEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/RoomVisualizationSettingsEvent.ts index 82e7b4cf..620a3737 100644 --- a/src/nitro/communication/messages/incoming/room/mapping/RoomVisualizationSettingsEvent.ts +++ b/src/nitro/communication/messages/incoming/room/mapping/RoomVisualizationSettingsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomVisualizationSettingsParser } from '../../../parser/room/mapping/RoomVisualizationSettingsParser'; diff --git a/src/nitro/communication/messages/incoming/room/pet/BreedingPetInfo.ts b/src/nitro/communication/messages/incoming/room/pet/BreedingPetInfo.ts index becbdc98..107194b9 100644 --- a/src/nitro/communication/messages/incoming/room/pet/BreedingPetInfo.ts +++ b/src/nitro/communication/messages/incoming/room/pet/BreedingPetInfo.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; export class BreedingPetInfo { @@ -10,7 +10,7 @@ export class BreedingPetInfo constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._webId = wrapper.readInt(); this._name = wrapper.readString(); @@ -19,7 +19,7 @@ export class BreedingPetInfo this._owner = wrapper.readString(); } - public dispose():void + public dispose(): void { this._webId = 0; this._name = ''; diff --git a/src/nitro/communication/messages/incoming/room/pet/PetExperienceEvent.ts b/src/nitro/communication/messages/incoming/room/pet/PetExperienceEvent.ts index cc598ae8..97795e67 100644 --- a/src/nitro/communication/messages/incoming/room/pet/PetExperienceEvent.ts +++ b/src/nitro/communication/messages/incoming/room/pet/PetExperienceEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { PetExperienceParser } from '../../../parser'; diff --git a/src/nitro/communication/messages/incoming/room/pet/PetFigureUpdateEvent.ts b/src/nitro/communication/messages/incoming/room/pet/PetFigureUpdateEvent.ts index ab03250c..438fe860 100644 --- a/src/nitro/communication/messages/incoming/room/pet/PetFigureUpdateEvent.ts +++ b/src/nitro/communication/messages/incoming/room/pet/PetFigureUpdateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { PetFigureUpdateParser } from '../../../parser/room/pet/PetFigureUpdateParser'; diff --git a/src/nitro/communication/messages/incoming/room/pet/PetInfoEvent.ts b/src/nitro/communication/messages/incoming/room/pet/PetInfoEvent.ts index 3372412a..e7f52347 100644 --- a/src/nitro/communication/messages/incoming/room/pet/PetInfoEvent.ts +++ b/src/nitro/communication/messages/incoming/room/pet/PetInfoEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { PetInfoParser } from '../../../parser/room/pet/PetInfoParser'; diff --git a/src/nitro/communication/messages/incoming/room/pet/PetStatusUpdateEvent.ts b/src/nitro/communication/messages/incoming/room/pet/PetStatusUpdateEvent.ts index bd3d5f1f..b86fc8b8 100644 --- a/src/nitro/communication/messages/incoming/room/pet/PetStatusUpdateEvent.ts +++ b/src/nitro/communication/messages/incoming/room/pet/PetStatusUpdateEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { PetStatusUpdateParser } from '../../../parser/room/pet/PetStatusUpdateParser'; diff --git a/src/nitro/communication/messages/incoming/room/pet/RarityCategoryData.ts b/src/nitro/communication/messages/incoming/room/pet/RarityCategoryData.ts index bb5895fd..577603e4 100644 --- a/src/nitro/communication/messages/incoming/room/pet/RarityCategoryData.ts +++ b/src/nitro/communication/messages/incoming/room/pet/RarityCategoryData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; export class RarityCategoryData { @@ -7,14 +7,14 @@ export class RarityCategoryData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._chance = wrapper.readInt(); this._breeds = []; let totalCount = wrapper.readInt(); - while(totalCount > 0) + while (totalCount > 0) { this._breeds.push(wrapper.readInt()); @@ -22,7 +22,7 @@ export class RarityCategoryData } } - public dispose():void + public dispose(): void { this._chance = -1; this._breeds = []; diff --git a/src/nitro/communication/messages/incoming/room/session/YouArePlayingGameEvent.ts b/src/nitro/communication/messages/incoming/room/session/YouArePlayingGameEvent.ts index 89b4aec1..c28b71b8 100644 --- a/src/nitro/communication/messages/incoming/room/session/YouArePlayingGameEvent.ts +++ b/src/nitro/communication/messages/incoming/room/session/YouArePlayingGameEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { YouArePlayingGameParser } from '../../../parser/room/session/YouArePlayingGameParser'; diff --git a/src/nitro/communication/messages/incoming/room/session/YouAreSpectatorMessageEvent.ts b/src/nitro/communication/messages/incoming/room/session/YouAreSpectatorMessageEvent.ts index 0e7256ff..93ebb26e 100644 --- a/src/nitro/communication/messages/incoming/room/session/YouAreSpectatorMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/session/YouAreSpectatorMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { YouAreSpectatorMessageParser } from '../../../parser/room/session/YouAreSpectatorMessageParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitDanceEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitDanceEvent.ts index 69b470e3..960f92bc 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitDanceEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitDanceEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitDanceParser } from '../../../parser/room/unit/RoomUnitDanceParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitEffectEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitEffectEvent.ts index e6c7ad89..088d2736 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitEffectEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitEffectEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitEffectParser } from '../../../parser/room/unit/RoomUnitEffectParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitEvent.ts index f0362ee9..7ac70065 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitParser } from '../../../parser/room/unit/RoomUnitParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitExpressionEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitExpressionEvent.ts index 4e5cf15f..6595fcfb 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitExpressionEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitExpressionEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitExpressionParser } from '../../../parser/room/unit/RoomUnitExpressionParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitHandItemEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitHandItemEvent.ts index 5e6aa573..1a8c4ae6 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitHandItemEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitHandItemEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitHandItemParser } from '../../../parser/room/unit/RoomUnitHandItemParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitHandItemReceivedEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitHandItemReceivedEvent.ts index 3a0e88a8..6747c09e 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitHandItemReceivedEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitHandItemReceivedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitHandItemReceivedParser } from '../../../parser/room/unit/RoomUnitHandItemReceivedParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitIdleEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitIdleEvent.ts index 1eb473e2..0f8a6c54 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitIdleEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitIdleEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitIdleParser } from '../../../parser/room/unit/RoomUnitIdleParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitInfoEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitInfoEvent.ts index da538ba7..bf688db8 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitInfoEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitInfoEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitInfoParser } from '../../../parser/room/unit/RoomUnitInfoParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitNumberEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitNumberEvent.ts index 4076979c..ae50b10c 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitNumberEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitNumberEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitNumberParser } from '../../../parser/room/unit/RoomUnitNumberParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitRemoveEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitRemoveEvent.ts index 6f3f25c6..ece05166 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitRemoveEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitRemoveEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitRemoveParser } from '../../../parser/room/unit/RoomUnitRemoveParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/RoomUnitStatusEvent.ts b/src/nitro/communication/messages/incoming/room/unit/RoomUnitStatusEvent.ts index 1f93cc03..61dcd8b0 100644 --- a/src/nitro/communication/messages/incoming/room/unit/RoomUnitStatusEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/RoomUnitStatusEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitStatusParser } from '../../../parser/room/unit/RoomUnitStatusParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/chat/FloodControlEvent.ts b/src/nitro/communication/messages/incoming/room/unit/chat/FloodControlEvent.ts index 54d61dd7..14b9ac1b 100644 --- a/src/nitro/communication/messages/incoming/room/unit/chat/FloodControlEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/chat/FloodControlEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { FloodControlParser } from '../../../../parser/room/unit/chat/FloodControlParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/chat/RemainingMuteEvent.ts b/src/nitro/communication/messages/incoming/room/unit/chat/RemainingMuteEvent.ts index 94eb5106..9c235495 100644 --- a/src/nitro/communication/messages/incoming/room/unit/chat/RemainingMuteEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/chat/RemainingMuteEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { RemainingMuteParser } from '../../../../parser/room/unit/chat/RemainingMuteParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatEvent.ts b/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatEvent.ts index b1743fa2..dad35b24 100644 --- a/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitChatParser } from '../../../../parser/room/unit/chat/RoomUnitChatParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatShoutEvent.ts b/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatShoutEvent.ts index 7b6ccb13..240a6342 100644 --- a/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatShoutEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatShoutEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitChatParser } from '../../../../parser/room/unit/chat/RoomUnitChatParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatWhisperEvent.ts b/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatWhisperEvent.ts index cf3450ac..4f16a104 100644 --- a/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatWhisperEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitChatWhisperEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitChatParser } from '../../../../parser/room/unit/chat/RoomUnitChatParser'; diff --git a/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitTypingEvent.ts b/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitTypingEvent.ts index c1f00a7e..8413ada1 100644 --- a/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitTypingEvent.ts +++ b/src/nitro/communication/messages/incoming/room/unit/chat/RoomUnitTypingEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { RoomUnitTypingParser } from '../../../../parser/room/unit/chat/RoomUnitTypingParser'; diff --git a/src/nitro/communication/messages/incoming/roomevents/ConditionDefinition.ts b/src/nitro/communication/messages/incoming/roomevents/ConditionDefinition.ts index b4519271..a4a67acc 100644 --- a/src/nitro/communication/messages/incoming/roomevents/ConditionDefinition.ts +++ b/src/nitro/communication/messages/incoming/roomevents/ConditionDefinition.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { Triggerable } from './Triggerable'; export class ConditionDefinition extends Triggerable diff --git a/src/nitro/communication/messages/incoming/roomevents/TriggerDefinition.ts b/src/nitro/communication/messages/incoming/roomevents/TriggerDefinition.ts index 5f69f072..77fac6f0 100644 --- a/src/nitro/communication/messages/incoming/roomevents/TriggerDefinition.ts +++ b/src/nitro/communication/messages/incoming/roomevents/TriggerDefinition.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { Triggerable } from './Triggerable'; export class TriggerDefinition extends Triggerable @@ -15,7 +15,7 @@ export class TriggerDefinition extends Triggerable let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._conflictingActions.push(wrapper.readInt()); diff --git a/src/nitro/communication/messages/incoming/roomevents/Triggerable.ts b/src/nitro/communication/messages/incoming/roomevents/Triggerable.ts index 81fb04ad..47bebf07 100644 --- a/src/nitro/communication/messages/incoming/roomevents/Triggerable.ts +++ b/src/nitro/communication/messages/incoming/roomevents/Triggerable.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class Triggerable { @@ -20,7 +20,7 @@ export class Triggerable let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._stuffIds.push(wrapper.readInt()); @@ -33,7 +33,7 @@ export class Triggerable count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._intParams.push(wrapper.readInt()); diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredActionDefinition.ts b/src/nitro/communication/messages/incoming/roomevents/WiredActionDefinition.ts index 545e591b..d1668dd3 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredActionDefinition.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredActionDefinition.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { Triggerable } from './Triggerable'; export class WiredActionDefinition extends Triggerable @@ -17,7 +17,7 @@ export class WiredActionDefinition extends Triggerable let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._conflictingTriggers.push(wrapper.readInt()); diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredFurniActionEvent.ts b/src/nitro/communication/messages/incoming/roomevents/WiredFurniActionEvent.ts index 765a0707..7490f4eb 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredFurniActionEvent.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredFurniActionEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { WiredFurniActionParser } from '../../parser/roomevents/WiredFurniActionParser'; diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredFurniConditionEvent.ts b/src/nitro/communication/messages/incoming/roomevents/WiredFurniConditionEvent.ts index 7d19f9e3..16c0f3b0 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredFurniConditionEvent.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredFurniConditionEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { WiredFurniConditionParser } from '../../parser/roomevents/WiredFurniConditionParser'; diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredFurniTriggerEvent.ts b/src/nitro/communication/messages/incoming/roomevents/WiredFurniTriggerEvent.ts index 419aa09c..1228d945 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredFurniTriggerEvent.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredFurniTriggerEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { WiredFurniTriggerParser } from '../../parser/roomevents/WiredFurniTriggerParser'; diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredOpenEvent.ts b/src/nitro/communication/messages/incoming/roomevents/WiredOpenEvent.ts index c91a6946..e75f4ed6 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredOpenEvent.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredOpenEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { WiredOpenParser } from '../../parser/roomevents/WiredOpenParser'; diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredRewardResultMessageEvent.ts b/src/nitro/communication/messages/incoming/roomevents/WiredRewardResultMessageEvent.ts index 0d880587..e1e7251b 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredRewardResultMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredRewardResultMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { WiredRewardResultMessageParser } from '../../parser/roomevents/WiredRewardResultMessageParser'; diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredSaveSuccessEvent.ts b/src/nitro/communication/messages/incoming/roomevents/WiredSaveSuccessEvent.ts index dfb44495..91b9af63 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredSaveSuccessEvent.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredSaveSuccessEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { WiredSaveSuccessParser } from '../../parser/roomevents/WiredSaveSuccessParser'; diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredValidationErrorEvent.ts b/src/nitro/communication/messages/incoming/roomevents/WiredValidationErrorEvent.ts index 5af743a3..187a8ba4 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredValidationErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredValidationErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { WiredValidationErrorParser } from '../../parser/roomevents/WiredValidationErrorParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/BannedUserData.ts b/src/nitro/communication/messages/incoming/roomsettings/BannedUserData.ts index 3edac276..7713d280 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/BannedUserData.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/BannedUserData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IFlatUser } from './IFlatUser'; export class BannedUserData implements IFlatUser diff --git a/src/nitro/communication/messages/incoming/roomsettings/BannedUsersFromRoomEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/BannedUsersFromRoomEvent.ts index b71da6c2..ab553aeb 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/BannedUsersFromRoomEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/BannedUsersFromRoomEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { BannedUsersFromRoomParser } from '../../parser/roomsettings/BannedUsersFromRoomParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/FlatControllerAddedEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/FlatControllerAddedEvent.ts index 2d44c0b1..ad02eb83 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/FlatControllerAddedEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/FlatControllerAddedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FlatControllerAddedParser } from '../../parser/roomsettings/FlatControllerAddedParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/FlatControllerData.ts b/src/nitro/communication/messages/incoming/roomsettings/FlatControllerData.ts index f8555693..c7f4ae88 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/FlatControllerData.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/FlatControllerData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IFlatUser } from './IFlatUser'; export class FlatControllerData implements IFlatUser diff --git a/src/nitro/communication/messages/incoming/roomsettings/FlatControllerRemovedEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/FlatControllerRemovedEvent.ts index 359bd0f6..c98c6370 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/FlatControllerRemovedEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/FlatControllerRemovedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FlatControllerRemovedParser } from '../../parser/roomsettings/FlatControllerRemovedParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/FlatControllersEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/FlatControllersEvent.ts index d557e6ef..cb721ce0 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/FlatControllersEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/FlatControllersEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { FlatControllersParser } from '../../parser/roomsettings/FlatControllersParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/MuteAllInRoomEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/MuteAllInRoomEvent.ts index fe4b1b95..ee638f92 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/MuteAllInRoomEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/MuteAllInRoomEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MuteAllInRoomParser } from '../../parser/roomsettings/MuteAllInRoomParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/NoSuchFlatEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/NoSuchFlatEvent.ts index 7200dc9f..7e1b2242 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/NoSuchFlatEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/NoSuchFlatEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NoSuchFlatParser } from '../../parser/roomsettings/NoSuchFlatParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/RoomChatSettings.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomChatSettings.ts index 7954621b..6e69d61a 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/RoomChatSettings.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomChatSettings.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class RoomChatSettings { @@ -22,7 +22,7 @@ export class RoomChatSettings constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._mode = wrapper.readInt(); this._weight = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/roomsettings/RoomModerationSettings.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomModerationSettings.ts index e2cde802..5514376a 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/RoomModerationSettings.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomModerationSettings.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class RoomModerationSettings { diff --git a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsDataEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsDataEvent.ts index 50486457..3b8fa1fd 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsDataEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsDataEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomSettingsDataParser } from '../../parser/roomsettings/RoomSettingsDataParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsErrorEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsErrorEvent.ts index b99ef07a..895aec8b 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomSettingsErrorParser } from '../../parser/roomsettings/RoomSettingsErrorParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSaveErrorEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSaveErrorEvent.ts index 948eb238..f5527599 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSaveErrorEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSaveErrorEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomSettingsSaveErrorParser } from '../../parser/roomsettings/RoomSettingsSaveErrorParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSavedEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSavedEvent.ts index 42eb4fd9..59bb5568 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSavedEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/RoomSettingsSavedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RoomSettingsSavedParser } from '../../parser/roomsettings/RoomSettingsSavedParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/ShowEnforceRoomCategoryDialogEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/ShowEnforceRoomCategoryDialogEvent.ts index a6cd16cf..5aef9bf7 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/ShowEnforceRoomCategoryDialogEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/ShowEnforceRoomCategoryDialogEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ShowEnforceRoomCategoryDialogParser } from '../../parser/roomsettings/ShowEnforceRoomCategoryDialogParser'; diff --git a/src/nitro/communication/messages/incoming/roomsettings/UserUnbannedFromRoomEvent.ts b/src/nitro/communication/messages/incoming/roomsettings/UserUnbannedFromRoomEvent.ts index ec9a4c14..b9ec74f5 100644 --- a/src/nitro/communication/messages/incoming/roomsettings/UserUnbannedFromRoomEvent.ts +++ b/src/nitro/communication/messages/incoming/roomsettings/UserUnbannedFromRoomEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UserUnbannedFromRoomParser } from '../../parser/roomsettings/UserUnbannedFromRoomParser'; diff --git a/src/nitro/communication/messages/incoming/security/AuthenticatedEvent.ts b/src/nitro/communication/messages/incoming/security/AuthenticatedEvent.ts index c5788020..8fed92df 100644 --- a/src/nitro/communication/messages/incoming/security/AuthenticatedEvent.ts +++ b/src/nitro/communication/messages/incoming/security/AuthenticatedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { AuthenticatedParser } from '../../parser/security/AuthenticatedParser'; diff --git a/src/nitro/communication/messages/incoming/sound/JukeboxPlayListFullMessageEvent.ts b/src/nitro/communication/messages/incoming/sound/JukeboxPlayListFullMessageEvent.ts index fcfdf849..b0d4acc1 100644 --- a/src/nitro/communication/messages/incoming/sound/JukeboxPlayListFullMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/sound/JukeboxPlayListFullMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { JukeboxPlayListFullMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/sound/JukeboxSongDisksMessageEvent.ts b/src/nitro/communication/messages/incoming/sound/JukeboxSongDisksMessageEvent.ts index 48ace66a..d3aa85a7 100644 --- a/src/nitro/communication/messages/incoming/sound/JukeboxSongDisksMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/sound/JukeboxSongDisksMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { JukeboxSongDisksMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/sound/NowPlayingMessageEvent.ts b/src/nitro/communication/messages/incoming/sound/NowPlayingMessageEvent.ts index ae016990..47f1ccc4 100644 --- a/src/nitro/communication/messages/incoming/sound/NowPlayingMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/sound/NowPlayingMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { NowPlayingMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/sound/OfficialSongIdMessageEvent.ts b/src/nitro/communication/messages/incoming/sound/OfficialSongIdMessageEvent.ts index 883f53c0..cbc43d54 100644 --- a/src/nitro/communication/messages/incoming/sound/OfficialSongIdMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/sound/OfficialSongIdMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { OfficialSongIdMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/sound/PlayListMessageEvent.ts b/src/nitro/communication/messages/incoming/sound/PlayListMessageEvent.ts index 21d35432..c1a64899 100644 --- a/src/nitro/communication/messages/incoming/sound/PlayListMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/sound/PlayListMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PlayListMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/sound/PlayListSongAddedMessageEvent.ts b/src/nitro/communication/messages/incoming/sound/PlayListSongAddedMessageEvent.ts index dea1784d..4274c821 100644 --- a/src/nitro/communication/messages/incoming/sound/PlayListSongAddedMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/sound/PlayListSongAddedMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PlayListSongAddedMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/sound/TraxSongInfoMessageEvent.ts b/src/nitro/communication/messages/incoming/sound/TraxSongInfoMessageEvent.ts index 8685aa8e..b7330522 100644 --- a/src/nitro/communication/messages/incoming/sound/TraxSongInfoMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/sound/TraxSongInfoMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { TraxSongInfoMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/sound/UserSongDisksInventoryMessageEvent.ts b/src/nitro/communication/messages/incoming/sound/UserSongDisksInventoryMessageEvent.ts index 6a58eae0..decd802f 100644 --- a/src/nitro/communication/messages/incoming/sound/UserSongDisksInventoryMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/sound/UserSongDisksInventoryMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { UserSongDisksInventoryMessageParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/talent/TalentTrackMessageEvent.ts b/src/nitro/communication/messages/incoming/talent/TalentTrackMessageEvent.ts index 7fd14982..697f136a 100644 --- a/src/nitro/communication/messages/incoming/talent/TalentTrackMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/talent/TalentTrackMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { TalentTrackParser } from '../../parser/talent/TalentTrackParser'; diff --git a/src/nitro/communication/messages/incoming/user/ApproveNameMessageEvent.ts b/src/nitro/communication/messages/incoming/user/ApproveNameMessageEvent.ts index fe4d86ba..5df53dd4 100644 --- a/src/nitro/communication/messages/incoming/user/ApproveNameMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/user/ApproveNameMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ApproveNameResultParser } from '../../parser'; diff --git a/src/nitro/communication/messages/incoming/user/GuildMembershipsMessageEvent.ts b/src/nitro/communication/messages/incoming/user/GuildMembershipsMessageEvent.ts index 78b92971..8e21012c 100644 --- a/src/nitro/communication/messages/incoming/user/GuildMembershipsMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/user/GuildMembershipsMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { GuildMembershipsMessageParser } from '../../parser/user/GuildMembershipsMessageParser'; diff --git a/src/nitro/communication/messages/incoming/user/HabboGroupBadgesMessageEvent.ts b/src/nitro/communication/messages/incoming/user/HabboGroupBadgesMessageEvent.ts index 65bbcf29..f81156a9 100644 --- a/src/nitro/communication/messages/incoming/user/HabboGroupBadgesMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/user/HabboGroupBadgesMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { HabboGroupBadgesMessageParser } from '../../parser/user/HabboGroupBadgesMessageParser'; diff --git a/src/nitro/communication/messages/incoming/user/IgnoreResultEvent.ts b/src/nitro/communication/messages/incoming/user/IgnoreResultEvent.ts index 2b700fdd..a7cc4a63 100644 --- a/src/nitro/communication/messages/incoming/user/IgnoreResultEvent.ts +++ b/src/nitro/communication/messages/incoming/user/IgnoreResultEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { IgnoreResultParser } from '../../parser/user/IgnoreResultParser'; diff --git a/src/nitro/communication/messages/incoming/user/IgnoredUsersEvent.ts b/src/nitro/communication/messages/incoming/user/IgnoredUsersEvent.ts index d8ade5c9..eff6e216 100644 --- a/src/nitro/communication/messages/incoming/user/IgnoredUsersEvent.ts +++ b/src/nitro/communication/messages/incoming/user/IgnoredUsersEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { IgnoredUsersParser } from '../../parser/user/IgnoredUsersParser'; diff --git a/src/nitro/communication/messages/incoming/user/InClientLinkEvent.ts b/src/nitro/communication/messages/incoming/user/InClientLinkEvent.ts index 4a99a899..0cb93973 100644 --- a/src/nitro/communication/messages/incoming/user/InClientLinkEvent.ts +++ b/src/nitro/communication/messages/incoming/user/InClientLinkEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { InClientLinkParser } from '../../parser/user/InClientLinkParser'; diff --git a/src/nitro/communication/messages/incoming/user/PetRespectNoficationEvent.ts b/src/nitro/communication/messages/incoming/user/PetRespectNoficationEvent.ts index e785dd7a..d633dee9 100644 --- a/src/nitro/communication/messages/incoming/user/PetRespectNoficationEvent.ts +++ b/src/nitro/communication/messages/incoming/user/PetRespectNoficationEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { PetRespectNotificationParser } from '../../parser/user/PetRespectNotificationParser'; diff --git a/src/nitro/communication/messages/incoming/user/PetSupplementedNotificationEvent.ts b/src/nitro/communication/messages/incoming/user/PetSupplementedNotificationEvent.ts index c953cbe5..5b7d6311 100644 --- a/src/nitro/communication/messages/incoming/user/PetSupplementedNotificationEvent.ts +++ b/src/nitro/communication/messages/incoming/user/PetSupplementedNotificationEvent.ts @@ -1,5 +1,5 @@ import { PetSupplementedNotificationParser } from '../..'; -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; export class PetSupplementedNotificationEvent extends MessageEvent implements IMessageEvent diff --git a/src/nitro/communication/messages/incoming/user/RespectReceivedEvent.ts b/src/nitro/communication/messages/incoming/user/RespectReceivedEvent.ts index f9765451..00dc830d 100644 --- a/src/nitro/communication/messages/incoming/user/RespectReceivedEvent.ts +++ b/src/nitro/communication/messages/incoming/user/RespectReceivedEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { RespectReceivedParser } from '../../parser/user/RespectReceivedParser'; diff --git a/src/nitro/communication/messages/incoming/user/ScrKickbackData.ts b/src/nitro/communication/messages/incoming/user/ScrKickbackData.ts index 8464d85d..c5df5447 100644 --- a/src/nitro/communication/messages/incoming/user/ScrKickbackData.ts +++ b/src/nitro/communication/messages/incoming/user/ScrKickbackData.ts @@ -1,16 +1,16 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; export class ScrKickbackData { - private _currentHcStreak:number; - private _firstSubscriptionDate:string; - private _kickbackPercentage:number; - private _totalCreditsMissed:number; - private _totalCreditsRewarded:number; - private _totalCreditsSpent:number; - private _creditRewardForStreakBonus:number; - private _creditRewardForMonthlySpent:number; - private _timeUntilPayday:number; + private _currentHcStreak: number; + private _firstSubscriptionDate: string; + private _kickbackPercentage: number; + private _totalCreditsMissed: number; + private _totalCreditsRewarded: number; + private _totalCreditsSpent: number; + private _creditRewardForStreakBonus: number; + private _creditRewardForMonthlySpent: number; + private _timeUntilPayday: number; constructor(k: IMessageDataWrapper) { @@ -25,47 +25,47 @@ export class ScrKickbackData this._timeUntilPayday = k.readInt(); } - public get currentHcStreak():number + public get currentHcStreak(): number { return this._currentHcStreak; } - public get firstSubscriptionDate():string + public get firstSubscriptionDate(): string { return this._firstSubscriptionDate; } - public get kickbackPercentage():number + public get kickbackPercentage(): number { return this._kickbackPercentage; } - public get totalCreditsMissed():number + public get totalCreditsMissed(): number { return this._totalCreditsMissed; } - public get totalCreditsRewarded():number + public get totalCreditsRewarded(): number { return this._totalCreditsRewarded; } - public get totalCreditsSpent():number + public get totalCreditsSpent(): number { return this._totalCreditsSpent; } - public get creditRewardForStreakBonus():number + public get creditRewardForStreakBonus(): number { return this._creditRewardForStreakBonus; } - public get creditRewardForMonthlySpent():number + public get creditRewardForMonthlySpent(): number { return this._creditRewardForMonthlySpent; } - public get timeUntilPayday():number + public get timeUntilPayday(): number { return this._timeUntilPayday; } diff --git a/src/nitro/communication/messages/incoming/user/ScrSendKickbackInfoMessageEvent.ts b/src/nitro/communication/messages/incoming/user/ScrSendKickbackInfoMessageEvent.ts index 592e6cfd..1f1a298b 100644 --- a/src/nitro/communication/messages/incoming/user/ScrSendKickbackInfoMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/user/ScrSendKickbackInfoMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../api'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { ScrSendKickbackInfoMessageParser } from '../../parser/user/ScrSendKickbackInfoMessageParser'; diff --git a/src/nitro/communication/messages/incoming/user/access/UserPermissionsEvent.ts b/src/nitro/communication/messages/incoming/user/access/UserPermissionsEvent.ts index 28c1f273..c757c022 100644 --- a/src/nitro/communication/messages/incoming/user/access/UserPermissionsEvent.ts +++ b/src/nitro/communication/messages/incoming/user/access/UserPermissionsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { UserPermissionsParser } from '../../../parser/user/access/UserPermissionsParser'; diff --git a/src/nitro/communication/messages/incoming/user/data/RelationshipStatusInfoEvent.ts b/src/nitro/communication/messages/incoming/user/data/RelationshipStatusInfoEvent.ts index 513ac49f..fd977953 100644 --- a/src/nitro/communication/messages/incoming/user/data/RelationshipStatusInfoEvent.ts +++ b/src/nitro/communication/messages/incoming/user/data/RelationshipStatusInfoEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RelationshipStatusInfoMessageParser } from '../../../parser/user/data/RelationshipStatusInfoMessageParser'; diff --git a/src/nitro/communication/messages/incoming/user/data/UserCurrentBadgesEvent.ts b/src/nitro/communication/messages/incoming/user/data/UserCurrentBadgesEvent.ts index 9c509cc7..2c17c56e 100644 --- a/src/nitro/communication/messages/incoming/user/data/UserCurrentBadgesEvent.ts +++ b/src/nitro/communication/messages/incoming/user/data/UserCurrentBadgesEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { UserCurrentBadgesParser } from '../../../parser/user/data/UserCurrentBadgesParser'; diff --git a/src/nitro/communication/messages/incoming/user/data/UserInfoEvent.ts b/src/nitro/communication/messages/incoming/user/data/UserInfoEvent.ts index ecf6ba17..3205e818 100644 --- a/src/nitro/communication/messages/incoming/user/data/UserInfoEvent.ts +++ b/src/nitro/communication/messages/incoming/user/data/UserInfoEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { UserInfoParser } from '../../../parser/user/data/UserInfoParser'; diff --git a/src/nitro/communication/messages/incoming/user/data/UserNameChangeMessageEvent.ts b/src/nitro/communication/messages/incoming/user/data/UserNameChangeMessageEvent.ts index 87952401..a7a20913 100644 --- a/src/nitro/communication/messages/incoming/user/data/UserNameChangeMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/user/data/UserNameChangeMessageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { UserNameChangeMessageParser } from '../../../parser/user/data/UserNameChangeMessageParser'; diff --git a/src/nitro/communication/messages/incoming/user/data/UserProfileEvent.ts b/src/nitro/communication/messages/incoming/user/data/UserProfileEvent.ts index 4b76cff7..c568c7c9 100644 --- a/src/nitro/communication/messages/incoming/user/data/UserProfileEvent.ts +++ b/src/nitro/communication/messages/incoming/user/data/UserProfileEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { UserProfileParser } from '../../../parser/user/data/UserProfileParser'; diff --git a/src/nitro/communication/messages/incoming/user/data/UserSettingsEvent.ts b/src/nitro/communication/messages/incoming/user/data/UserSettingsEvent.ts index 488df993..bcdcc642 100644 --- a/src/nitro/communication/messages/incoming/user/data/UserSettingsEvent.ts +++ b/src/nitro/communication/messages/incoming/user/data/UserSettingsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { UserSettingsParser } from '../../../parser/user/data/UserSettingsParser'; diff --git a/src/nitro/communication/messages/incoming/user/inventory/currency/UserCreditsEvent.ts b/src/nitro/communication/messages/incoming/user/inventory/currency/UserCreditsEvent.ts index abcd697d..c858b849 100644 --- a/src/nitro/communication/messages/incoming/user/inventory/currency/UserCreditsEvent.ts +++ b/src/nitro/communication/messages/incoming/user/inventory/currency/UserCreditsEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { UserCreditsParser } from '../../../../parser/user/inventory/currency/UserCreditsParser'; diff --git a/src/nitro/communication/messages/incoming/user/inventory/currency/UserCurrencyEvent.ts b/src/nitro/communication/messages/incoming/user/inventory/currency/UserCurrencyEvent.ts index 33335727..d5add8b3 100644 --- a/src/nitro/communication/messages/incoming/user/inventory/currency/UserCurrencyEvent.ts +++ b/src/nitro/communication/messages/incoming/user/inventory/currency/UserCurrencyEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { UserCurrencyParser } from '../../../../parser/user/inventory/currency/UserCurrencyParser'; diff --git a/src/nitro/communication/messages/incoming/user/inventory/subscription/UserSubscriptionEvent.ts b/src/nitro/communication/messages/incoming/user/inventory/subscription/UserSubscriptionEvent.ts index af5d67c7..a1dc6c18 100644 --- a/src/nitro/communication/messages/incoming/user/inventory/subscription/UserSubscriptionEvent.ts +++ b/src/nitro/communication/messages/incoming/user/inventory/subscription/UserSubscriptionEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../../api'; import { MessageEvent } from '../../../../../../../core/communication/messages/MessageEvent'; import { UserSubscriptionParser } from '../../../../parser/user/inventory/subscription/UserSubscriptionParser'; diff --git a/src/nitro/communication/messages/incoming/user/wardrobe/UserWardrobePageEvent.ts b/src/nitro/communication/messages/incoming/user/wardrobe/UserWardrobePageEvent.ts index d0d87747..39e60d34 100644 --- a/src/nitro/communication/messages/incoming/user/wardrobe/UserWardrobePageEvent.ts +++ b/src/nitro/communication/messages/incoming/user/wardrobe/UserWardrobePageEvent.ts @@ -1,4 +1,4 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IMessageEvent } from '../../../../../../api'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { UserWardrobePageParser } from '../../../parser/user/wardrobe/UserWardrobePageParser'; diff --git a/src/nitro/communication/messages/outgoing/advertisement/GetInterstitialMessageComposer.ts b/src/nitro/communication/messages/outgoing/advertisement/GetInterstitialMessageComposer.ts index b47e69dc..1891b751 100644 --- a/src/nitro/communication/messages/outgoing/advertisement/GetInterstitialMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/advertisement/GetInterstitialMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetInterstitialMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/advertisement/InterstitialShownMessageComposer.ts b/src/nitro/communication/messages/outgoing/advertisement/InterstitialShownMessageComposer.ts index c4d886ee..d2ee6f2c 100644 --- a/src/nitro/communication/messages/outgoing/advertisement/InterstitialShownMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/advertisement/InterstitialShownMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class InterstitialShownMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/advertisement/RequestAchievementsMessageComposer.ts b/src/nitro/communication/messages/outgoing/advertisement/RequestAchievementsMessageComposer.ts index a0aaeb13..4abb88b1 100644 --- a/src/nitro/communication/messages/outgoing/advertisement/RequestAchievementsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/advertisement/RequestAchievementsMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class RequestAchievementsMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/avatar/ChangeUserNameMessageComposer.ts b/src/nitro/communication/messages/outgoing/avatar/ChangeUserNameMessageComposer.ts index 97055ddd..a441b7e3 100644 --- a/src/nitro/communication/messages/outgoing/avatar/ChangeUserNameMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/avatar/ChangeUserNameMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class ChangeUserNameMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class ChangeUserNameMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class CheckUserNameMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetWardrobeMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class SaveWardrobeOutfitMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/camera/PublishPhotoMessageComposer.ts b/src/nitro/communication/messages/outgoing/camera/PublishPhotoMessageComposer.ts index 0a833389..a4f485a5 100644 --- a/src/nitro/communication/messages/outgoing/camera/PublishPhotoMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/camera/PublishPhotoMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class PublishPhotoMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/camera/PurchasePhotoMessageComposer.ts b/src/nitro/communication/messages/outgoing/camera/PurchasePhotoMessageComposer.ts index 5ec1db40..96caeeb9 100644 --- a/src/nitro/communication/messages/outgoing/camera/PurchasePhotoMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/camera/PurchasePhotoMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class PurchasePhotoMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/camera/RenderRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/camera/RenderRoomMessageComposer.ts index 14bbc2aa..e9e081e9 100644 --- a/src/nitro/communication/messages/outgoing/camera/RenderRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/camera/RenderRoomMessageComposer.ts @@ -1,12 +1,12 @@ import { RenderTexture } from '@pixi/core'; -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; import { TextureUtils } from '../../../../../room'; export class RenderRoomMessageComposer implements IMessageComposer> { private _data: any; - constructor(k:any = '', _arg_2: string = '', _arg_3: string = '', _arg_4: number = -1, _arg_5: number = -1) + constructor(k: any = '', _arg_2: string = '', _arg_3: string = '', _arg_4: number = -1, _arg_5: number = -1) { this._data = []; } @@ -21,11 +21,11 @@ export class RenderRoomMessageComposer implements IMessageComposer c.charCodeAt(0)); @@ -33,7 +33,7 @@ export class RenderRoomMessageComposer implements IMessageComposer c.charCodeAt(0)); diff --git a/src/nitro/communication/messages/outgoing/camera/RequestCameraConfigurationComposer.ts b/src/nitro/communication/messages/outgoing/camera/RequestCameraConfigurationComposer.ts index a15f4139..3d33db97 100644 --- a/src/nitro/communication/messages/outgoing/camera/RequestCameraConfigurationComposer.ts +++ b/src/nitro/communication/messages/outgoing/camera/RequestCameraConfigurationComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RequestCameraConfigurationComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/campaign/OpenCampaignCalendarDoorAsStaffComposer.ts b/src/nitro/communication/messages/outgoing/campaign/OpenCampaignCalendarDoorAsStaffComposer.ts index d07748a6..357c9f9b 100644 --- a/src/nitro/communication/messages/outgoing/campaign/OpenCampaignCalendarDoorAsStaffComposer.ts +++ b/src/nitro/communication/messages/outgoing/campaign/OpenCampaignCalendarDoorAsStaffComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class OpenCampaignCalendarDoorAsStaffComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class OpenCampaignCalendarDoorAsStaffComposer implements IMessageComposer constructor(k: string, _arg_2: number) { - this._data = [ k, _arg_2 ]; + this._data = [k, _arg_2]; } dispose(): void diff --git a/src/nitro/communication/messages/outgoing/campaign/OpenCampaignCalendarDoorComposer.ts b/src/nitro/communication/messages/outgoing/campaign/OpenCampaignCalendarDoorComposer.ts index 3f798bf6..52d0dcba 100644 --- a/src/nitro/communication/messages/outgoing/campaign/OpenCampaignCalendarDoorComposer.ts +++ b/src/nitro/communication/messages/outgoing/campaign/OpenCampaignCalendarDoorComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class OpenCampaignCalendarDoorComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class OpenCampaignCalendarDoorComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/BuildersClubPlaceWallItemMessageComposer.ts b/src/nitro/communication/messages/outgoing/catalog/BuildersClubPlaceWallItemMessageComposer.ts index 16438448..c78e82a9 100644 --- a/src/nitro/communication/messages/outgoing/catalog/BuildersClubPlaceWallItemMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/BuildersClubPlaceWallItemMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class BuildersClubPlaceWallItemMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/BuildersClubQueryFurniCountMessageComposer.ts b/src/nitro/communication/messages/outgoing/catalog/BuildersClubQueryFurniCountMessageComposer.ts index 88777421..32d86198 100644 --- a/src/nitro/communication/messages/outgoing/catalog/BuildersClubQueryFurniCountMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/BuildersClubQueryFurniCountMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class BuildersClubQueryFurniCountMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetBonusRareInfoMessageComposer.ts b/src/nitro/communication/messages/outgoing/catalog/GetBonusRareInfoMessageComposer.ts index b79525a4..b337eb57 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetBonusRareInfoMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetBonusRareInfoMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetBonusRareInfoMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetBundleDiscountRulesetComposer.ts b/src/nitro/communication/messages/outgoing/catalog/GetBundleDiscountRulesetComposer.ts index 2f05460a..01e9ee10 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetBundleDiscountRulesetComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetBundleDiscountRulesetComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetBundleDiscountRulesetComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetCatalogIndexComposer.ts b/src/nitro/communication/messages/outgoing/catalog/GetCatalogIndexComposer.ts index 326dd5a7..b81e4e5d 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetCatalogIndexComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetCatalogIndexComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCatalogIndexComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetCatalogIndexComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetCatalogPageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetCatalogPageExpirationComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetClubGiftInfo.ts b/src/nitro/communication/messages/outgoing/catalog/GetClubGiftInfo.ts index e0bf9576..884b772d 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetClubGiftInfo.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetClubGiftInfo.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetClubGiftInfo implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetClubGiftInfo implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetClubOffersMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetDirectClubBuyAvailableComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetHabboBasicMembershipExtendOfferComposer.ts b/src/nitro/communication/messages/outgoing/catalog/GetHabboBasicMembershipExtendOfferComposer.ts index e9e76f7e..68fb03c9 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetHabboBasicMembershipExtendOfferComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetHabboBasicMembershipExtendOfferComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetHabboBasicMembershipExtendOfferComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetHabboClubExtendOfferMessageComposer.ts b/src/nitro/communication/messages/outgoing/catalog/GetHabboClubExtendOfferMessageComposer.ts index 4739e484..e3f11b86 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetHabboClubExtendOfferMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetHabboClubExtendOfferMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetHabboClubExtendOfferMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetIsOfferGiftableComposer.ts b/src/nitro/communication/messages/outgoing/catalog/GetIsOfferGiftableComposer.ts index 12645a68..0c89c56c 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetIsOfferGiftableComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetIsOfferGiftableComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetIsOfferGiftableComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetIsOfferGiftableComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetNextTargetedOfferComposer.ts b/src/nitro/communication/messages/outgoing/catalog/GetNextTargetedOfferComposer.ts index ab6e79b7..8bcd9571 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetNextTargetedOfferComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetNextTargetedOfferComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetNextTargetedOfferComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetNextTargetedOfferComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetProductOfferComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetSeasonalCalendarDailyOfferComposer.ts b/src/nitro/communication/messages/outgoing/catalog/GetSeasonalCalendarDailyOfferComposer.ts index 556a1c5b..e504752d 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetSeasonalCalendarDailyOfferComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetSeasonalCalendarDailyOfferComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetSeasonalCalendarDailyOfferComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/GetSellablePetPalettesComposer.ts b/src/nitro/communication/messages/outgoing/catalog/GetSellablePetPalettesComposer.ts index 224d4685..1abf0a7e 100644 --- a/src/nitro/communication/messages/outgoing/catalog/GetSellablePetPalettesComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/GetSellablePetPalettesComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetSellablePetPalettesComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetSellablePetPalettesComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/MarkCatalogNewAdditionsPageOpenedComposer.ts b/src/nitro/communication/messages/outgoing/catalog/MarkCatalogNewAdditionsPageOpenedComposer.ts index 6fd06477..4c6d3e18 100644 --- a/src/nitro/communication/messages/outgoing/catalog/MarkCatalogNewAdditionsPageOpenedComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/MarkCatalogNewAdditionsPageOpenedComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class MarkCatalogNewAdditionsPageOpenedComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/PurchaseBasicMembershipExtensionComposer.ts b/src/nitro/communication/messages/outgoing/catalog/PurchaseBasicMembershipExtensionComposer.ts index e356f0b0..0af86b6f 100644 --- a/src/nitro/communication/messages/outgoing/catalog/PurchaseBasicMembershipExtensionComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/PurchaseBasicMembershipExtensionComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class PurchaseBasicMembershipExtensionComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PurchaseBasicMembershipExtensionComposer implements IMessageCompose constructor(k: number) { - this._data = [ k ]; + this._data = [k]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/catalog/PurchaseFromCatalogAsGiftComposer.ts b/src/nitro/communication/messages/outgoing/catalog/PurchaseFromCatalogAsGiftComposer.ts index e9489d00..89bbee10 100644 --- a/src/nitro/communication/messages/outgoing/catalog/PurchaseFromCatalogAsGiftComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/PurchaseFromCatalogAsGiftComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class PurchaseFromCatalogAsGiftComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/PurchaseFromCatalogComposer.ts b/src/nitro/communication/messages/outgoing/catalog/PurchaseFromCatalogComposer.ts index 847a9116..4aaa1645 100644 --- a/src/nitro/communication/messages/outgoing/catalog/PurchaseFromCatalogComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/PurchaseFromCatalogComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class PurchaseFromCatalogComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PurchaseFromCatalogComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PurchaseRoomAdMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PurchaseTargetedOfferComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PurchaseVipMembershipExtensionComposer implements IMessageComposer< constructor(k: number) { - this._data = [ k ]; + this._data = [k]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/catalog/RedeemVoucherMessageComposer.ts b/src/nitro/communication/messages/outgoing/catalog/RedeemVoucherMessageComposer.ts index a34ccefb..c6d09a3a 100644 --- a/src/nitro/communication/messages/outgoing/catalog/RedeemVoucherMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/RedeemVoucherMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RedeemVoucherMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RedeemVoucherMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/catalog/SelectClubGiftComposer.ts b/src/nitro/communication/messages/outgoing/catalog/SelectClubGiftComposer.ts index 3b2c13be..cc13dad3 100644 --- a/src/nitro/communication/messages/outgoing/catalog/SelectClubGiftComposer.ts +++ b/src/nitro/communication/messages/outgoing/catalog/SelectClubGiftComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class SelectClubGiftComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class SelectClubGiftComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class SetTargetedOfferStateComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class ShopTargetedOfferViewedComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string, _arg_2:number) + constructor(k: string, _arg_2: number) { - this._data = [ k, _arg_2 ]; + this._data = [k, _arg_2]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/competition/ForwardToASubmittableRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/competition/ForwardToASubmittableRoomMessageComposer.ts index 495eb00c..b1d7e15e 100644 --- a/src/nitro/communication/messages/outgoing/competition/ForwardToASubmittableRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/competition/ForwardToASubmittableRoomMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class ForwardToASubmittableRoomMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/competition/ForwardToRandomCompetitionRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/competition/ForwardToRandomCompetitionRoomMessageComposer.ts index 02a51fb7..55140f88 100644 --- a/src/nitro/communication/messages/outgoing/competition/ForwardToRandomCompetitionRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/competition/ForwardToRandomCompetitionRoomMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class ForwardToRandomCompetitionRoomMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class ForwardToRandomCompetitionRoomMessageComposer implements IMessageCo constructor(k: string) { - this._data = [ k]; + this._data = [k]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/competition/GetCurrentTimingCodeMessageComposer.ts b/src/nitro/communication/messages/outgoing/competition/GetCurrentTimingCodeMessageComposer.ts index 390a9c66..2239a7a1 100644 --- a/src/nitro/communication/messages/outgoing/competition/GetCurrentTimingCodeMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/competition/GetCurrentTimingCodeMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetCurrentTimingCodeMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetCurrentTimingCodeMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetIsUserPartOfCompetitionMessageComposer implements IMessageCompos constructor(k: string) { - this._data = [ k ]; + this._data = [k]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/competition/SubmitRoomToCompetitionMessageComposer.ts b/src/nitro/communication/messages/outgoing/competition/SubmitRoomToCompetitionMessageComposer.ts index a968cbc5..ed023e13 100644 --- a/src/nitro/communication/messages/outgoing/competition/SubmitRoomToCompetitionMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/competition/SubmitRoomToCompetitionMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class SubmitRoomToCompetitionMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/crafting/CraftComposer.ts b/src/nitro/communication/messages/outgoing/crafting/CraftComposer.ts index 413de50b..c81f4f78 100644 --- a/src/nitro/communication/messages/outgoing/crafting/CraftComposer.ts +++ b/src/nitro/communication/messages/outgoing/crafting/CraftComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CraftComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/crafting/CraftSecretComposer.ts b/src/nitro/communication/messages/outgoing/crafting/CraftSecretComposer.ts index 5172cb76..b1314b0e 100644 --- a/src/nitro/communication/messages/outgoing/crafting/CraftSecretComposer.ts +++ b/src/nitro/communication/messages/outgoing/crafting/CraftSecretComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CraftSecretComposer implements IMessageComposer { diff --git a/src/nitro/communication/messages/outgoing/crafting/GetCraftableProductsComposer.ts b/src/nitro/communication/messages/outgoing/crafting/GetCraftableProductsComposer.ts index 2f850965..8a68b50f 100644 --- a/src/nitro/communication/messages/outgoing/crafting/GetCraftableProductsComposer.ts +++ b/src/nitro/communication/messages/outgoing/crafting/GetCraftableProductsComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCraftableProductsComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/crafting/GetCraftingRecipeComposer.ts b/src/nitro/communication/messages/outgoing/crafting/GetCraftingRecipeComposer.ts index 1a080ed0..321e923d 100644 --- a/src/nitro/communication/messages/outgoing/crafting/GetCraftingRecipeComposer.ts +++ b/src/nitro/communication/messages/outgoing/crafting/GetCraftingRecipeComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCraftingRecipeComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/crafting/GetCraftingRecipesAvailableComposer.ts b/src/nitro/communication/messages/outgoing/crafting/GetCraftingRecipesAvailableComposer.ts index 7e6256fa..2c6a739e 100644 --- a/src/nitro/communication/messages/outgoing/crafting/GetCraftingRecipesAvailableComposer.ts +++ b/src/nitro/communication/messages/outgoing/crafting/GetCraftingRecipesAvailableComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCraftingRecipesAvailableComposer implements IMessageComposer { diff --git a/src/nitro/communication/messages/outgoing/desktop/DesktopViewComposer.ts b/src/nitro/communication/messages/outgoing/desktop/DesktopViewComposer.ts index 77998d48..6ee27c80 100644 --- a/src/nitro/communication/messages/outgoing/desktop/DesktopViewComposer.ts +++ b/src/nitro/communication/messages/outgoing/desktop/DesktopViewComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class DesktopViewComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class DesktopViewComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FriendFurniConfirmLockMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class AcceptFriendMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class DeclineFriendMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/friendlist/FollowFriendMessageComposer.ts b/src/nitro/communication/messages/outgoing/friendlist/FollowFriendMessageComposer.ts index 0185cc6d..cfd195af 100644 --- a/src/nitro/communication/messages/outgoing/friendlist/FollowFriendMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/friendlist/FollowFriendMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class FollowFriendMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FollowFriendMessageComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class FriendListUpdateComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class GetFriendRequestsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class HabboSearchComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class MessengerInitComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RemoveFriendComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RequestFriendComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class SendMessageComposer implements IMessageComposer { @@ -6,7 +6,7 @@ export class SendRoomInviteComposer implements IMessageComposer constructor(message: string, userIds: number[]) { - this._data = [ userIds.length, ...userIds, message ]; + this._data = [userIds.length, ...userIds, message]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/friendlist/SetRelationshipStatusComposer.ts b/src/nitro/communication/messages/outgoing/friendlist/SetRelationshipStatusComposer.ts index 14e83b95..00f731c7 100644 --- a/src/nitro/communication/messages/outgoing/friendlist/SetRelationshipStatusComposer.ts +++ b/src/nitro/communication/messages/outgoing/friendlist/SetRelationshipStatusComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class SetRelationshipStatusComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class SetRelationshipStatusComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class VisitUserComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetResolutionAchievementsMessageComposer implements IMessageCompose constructor(objectId: number, achievementId: number) { - this._data = [ objectId, achievementId ]; + this._data = [objectId, achievementId]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/gifts/GetGiftMessageComposer.ts b/src/nitro/communication/messages/outgoing/gifts/GetGiftMessageComposer.ts index 3406922c..666589c2 100644 --- a/src/nitro/communication/messages/outgoing/gifts/GetGiftMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/gifts/GetGiftMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetGiftMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/gifts/ResetPhoneNumberStateMessageComposer.ts b/src/nitro/communication/messages/outgoing/gifts/ResetPhoneNumberStateMessageComposer.ts index 4c435155..2bfd0a9f 100644 --- a/src/nitro/communication/messages/outgoing/gifts/ResetPhoneNumberStateMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/gifts/ResetPhoneNumberStateMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class ResetPhoneNumberStateMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/gifts/SetPhoneNumberVerificationStatusMessageComposer.ts b/src/nitro/communication/messages/outgoing/gifts/SetPhoneNumberVerificationStatusMessageComposer.ts index ec15217d..7498f6ca 100644 --- a/src/nitro/communication/messages/outgoing/gifts/SetPhoneNumberVerificationStatusMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/gifts/SetPhoneNumberVerificationStatusMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class SetPhoneNumberVerificationStatusMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/gifts/TryPhoneNumberMessageComposer.ts b/src/nitro/communication/messages/outgoing/gifts/TryPhoneNumberMessageComposer.ts index 46285297..dfac3671 100644 --- a/src/nitro/communication/messages/outgoing/gifts/TryPhoneNumberMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/gifts/TryPhoneNumberMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class TryPhoneNumberMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class TryPhoneNumberMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class VerifyCodeMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupAdminGiveComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupAdminTakeComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/group/GroupBuyComposer.ts b/src/nitro/communication/messages/outgoing/group/GroupBuyComposer.ts index f15c5360..09648c34 100644 --- a/src/nitro/communication/messages/outgoing/group/GroupBuyComposer.ts +++ b/src/nitro/communication/messages/outgoing/group/GroupBuyComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GroupBuyComposer implements IMessageComposer { @@ -6,7 +6,7 @@ export class GroupBuyComposer implements IMessageComposer constructor(name: string, description: string, roomId: number, colorA: number, colorB: number, badge: number[]) { - this._data = [ name, description, roomId, colorA, colorB, badge.length, ...badge ]; + this._data = [name, description, roomId, colorA, colorB, badge.length, ...badge]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/group/GroupBuyDataComposer.ts b/src/nitro/communication/messages/outgoing/group/GroupBuyDataComposer.ts index 99db1c84..e6beed9e 100644 --- a/src/nitro/communication/messages/outgoing/group/GroupBuyDataComposer.ts +++ b/src/nitro/communication/messages/outgoing/group/GroupBuyDataComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GroupBuyDataComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/group/GroupConfirmRemoveMemberComposer.ts b/src/nitro/communication/messages/outgoing/group/GroupConfirmRemoveMemberComposer.ts index 6cacfa10..a72a9868 100644 --- a/src/nitro/communication/messages/outgoing/group/GroupConfirmRemoveMemberComposer.ts +++ b/src/nitro/communication/messages/outgoing/group/GroupConfirmRemoveMemberComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GroupConfirmRemoveMemberComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupConfirmRemoveMemberComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupDeleteComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupFavoriteComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupInformationComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupJoinComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupMembersComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupMembershipAcceptComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupMembershipDeclineComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupRemoveMemberComposer implements IMessageComposer { @@ -6,7 +6,7 @@ export class GroupSaveBadgeComposer implements IMessageComposer constructor(groupId: number, badge: number[]) { - this._data = [ groupId, badge.length, ...badge ]; + this._data = [groupId, badge.length, ...badge]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/group/GroupSaveColorsComposer.ts b/src/nitro/communication/messages/outgoing/group/GroupSaveColorsComposer.ts index 45879c81..b8440019 100644 --- a/src/nitro/communication/messages/outgoing/group/GroupSaveColorsComposer.ts +++ b/src/nitro/communication/messages/outgoing/group/GroupSaveColorsComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GroupSaveColorsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupSaveColorsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupSaveInformationComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupSavePreferencesComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupSettingsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GroupUnfavoriteComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/groupforums/ModerateThreadMessageComposer.ts b/src/nitro/communication/messages/outgoing/groupforums/ModerateThreadMessageComposer.ts index c1b20ce6..8e982d64 100644 --- a/src/nitro/communication/messages/outgoing/groupforums/ModerateThreadMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/groupforums/ModerateThreadMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class ModerateThreadMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number, _arg_3:number) + constructor(k: number, _arg_2: number, _arg_3: number) { this._data = [k, _arg_2, _arg_3]; } diff --git a/src/nitro/communication/messages/outgoing/groupforums/PostMessageMessageComposer.ts b/src/nitro/communication/messages/outgoing/groupforums/PostMessageMessageComposer.ts index 4f7dd9ae..88c5514a 100644 --- a/src/nitro/communication/messages/outgoing/groupforums/PostMessageMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/groupforums/PostMessageMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class PostMessageMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number, _arg_3:string, _arg_4:string) + constructor(k: number, _arg_2: number, _arg_3: string, _arg_4: string) { this._data = [k, _arg_2, _arg_3, _arg_4]; } diff --git a/src/nitro/communication/messages/outgoing/groupforums/UpdateForumReadMarkerMessageComposer.ts b/src/nitro/communication/messages/outgoing/groupforums/UpdateForumReadMarkerMessageComposer.ts index b54ad930..438ff4bf 100644 --- a/src/nitro/communication/messages/outgoing/groupforums/UpdateForumReadMarkerMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/groupforums/UpdateForumReadMarkerMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class UpdateForumReadMarkerMessageComposer implements IMessageComposer { @@ -7,7 +7,7 @@ export class UpdateForumReadMarkerMessageComposer implements IMessageComposer + data.forEach(entry => { this._data.push(entry.k); this._data.push(entry._arg_2); @@ -28,6 +28,6 @@ export class UpdateForumReadMarkerMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number, _arg_3:number, _arg_4:number, _arg_5:number) + constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: number, _arg_5: number) { this._data = [k, _arg_2, _arg_3, _arg_4, _arg_5]; } diff --git a/src/nitro/communication/messages/outgoing/groupforums/UpdateThreadMessageComposer.ts b/src/nitro/communication/messages/outgoing/groupforums/UpdateThreadMessageComposer.ts index b96196dd..b7f59edb 100644 --- a/src/nitro/communication/messages/outgoing/groupforums/UpdateThreadMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/groupforums/UpdateThreadMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class UpdateThreadMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number, _arg_3:boolean, _arg_4:boolean) + constructor(k: number, _arg_2: number, _arg_3: boolean, _arg_4: boolean) { this._data = [k, _arg_2, _arg_4, _arg_3]; } diff --git a/src/nitro/communication/messages/outgoing/handshake/AuthenticationMessageComposer.ts b/src/nitro/communication/messages/outgoing/handshake/AuthenticationMessageComposer.ts index d52d6cc5..45402d7a 100644 --- a/src/nitro/communication/messages/outgoing/handshake/AuthenticationMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/handshake/AuthenticationMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class AuthenticationMessageComposer implements IMessageComposer { @@ -9,11 +9,11 @@ export class AuthenticationMessageComposer implements IMessageComposer { this._type = type; - if(keys.length !== values.length) return; + if (keys.length !== values.length) return; this._data = []; - for(let i = 0; i < keys.length; i++) + for (let i = 0; i < keys.length; i++) { this._data.push(keys[i]); this._data.push(values[i]); diff --git a/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts b/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts index 41bdd43c..e766098d 100644 --- a/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/handshake/ClientHelloMessageComposer.ts @@ -1,7 +1,7 @@ +import { IMessageComposer } from '../../../../../api'; +import { ClientDeviceCategoryEnum } from '../../../../../api/communication/enums/ClientDeviceCategoryEnum'; +import { ClientPlatformEnum } from '../../../../../api/communication/enums/ClientPlatformEnum'; import { NitroVersion } from '../../../../../core'; -import { ClientDeviceCategoryEnum } from '../../../../../core/communication/connections/enums/ClientDeviceCategoryEnum'; -import { ClientPlatformEnum } from '../../../../../core/communication/connections/enums/ClientPlatformEnum'; -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; export class ClientHelloMessageComposer implements IMessageComposer> { @@ -9,7 +9,7 @@ export class ClientHelloMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/handshake/PongMessageComposer.ts b/src/nitro/communication/messages/outgoing/handshake/PongMessageComposer.ts index 18d89613..703665d0 100644 --- a/src/nitro/communication/messages/outgoing/handshake/PongMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/handshake/PongMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class PongMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/handshake/SSOTicketMessageComposer.ts b/src/nitro/communication/messages/outgoing/handshake/SSOTicketMessageComposer.ts index df8536c6..f2c3cd3d 100644 --- a/src/nitro/communication/messages/outgoing/handshake/SSOTicketMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/handshake/SSOTicketMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class SSOTicketMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class SSOTicketMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number, _arg_3:number, _arg_4:number, _arg_5:string) + constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: number, _arg_5: string) { this._data = [k, _arg_2, _arg_3, _arg_4, _arg_5]; } diff --git a/src/nitro/communication/messages/outgoing/help/CallForHelpFromForumThreadMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/CallForHelpFromForumThreadMessageComposer.ts index 5b19eee4..89d734b6 100644 --- a/src/nitro/communication/messages/outgoing/help/CallForHelpFromForumThreadMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/CallForHelpFromForumThreadMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CallForHelpFromForumThreadMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number, _arg_3:number, _arg_4:string) + constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: string) { this._data = [k, _arg_2, _arg_3, _arg_4]; } diff --git a/src/nitro/communication/messages/outgoing/help/CallForHelpFromIMMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/CallForHelpFromIMMessageComposer.ts index 6016ff90..5c40fc5e 100644 --- a/src/nitro/communication/messages/outgoing/help/CallForHelpFromIMMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/CallForHelpFromIMMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CallForHelpFromIMMessageComposer implements IMessageComposer { private _data: any; - constructor(message:string, topicId:number, reportedUserId:number, chatEntries:(string|number)[]) + constructor(message: string, topicId: number, reportedUserId: number, chatEntries: (string | number)[]) { this._data = [message, topicId, reportedUserId, chatEntries.length / 2, ...chatEntries]; } diff --git a/src/nitro/communication/messages/outgoing/help/CallForHelpFromPhotoMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/CallForHelpFromPhotoMessageComposer.ts index f907f692..15b717f1 100644 --- a/src/nitro/communication/messages/outgoing/help/CallForHelpFromPhotoMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/CallForHelpFromPhotoMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CallForHelpFromPhotoMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string, _arg_2:number, _arg_3:number, _arg_4:number, _arg_5:number) + constructor(k: string, _arg_2: number, _arg_3: number, _arg_4: number, _arg_5: number) { this._data = [k, _arg_2, _arg_3, _arg_4, _arg_5]; } diff --git a/src/nitro/communication/messages/outgoing/help/CallForHelpFromSelfieMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/CallForHelpFromSelfieMessageComposer.ts index a7e49327..a5bf88a6 100644 --- a/src/nitro/communication/messages/outgoing/help/CallForHelpFromSelfieMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/CallForHelpFromSelfieMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CallForHelpFromSelfieMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string, _arg_2:number, _arg_3:number, _arg_4:string, _arg_5:number) + constructor(k: string, _arg_2: number, _arg_3: number, _arg_4: string, _arg_5: number) { this._data = [k, _arg_2, _arg_3, _arg_4, _arg_5]; } diff --git a/src/nitro/communication/messages/outgoing/help/CallForHelpMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/CallForHelpMessageComposer.ts index eaf20e1b..a3af9c54 100644 --- a/src/nitro/communication/messages/outgoing/help/CallForHelpMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/CallForHelpMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CallForHelpMessageComposer implements IMessageComposer { private _data: any; - constructor(message:string, topicIndex:number, reportedUserId:number, reportedRoomId:number, chatEntries:(string|number)[]) + constructor(message: string, topicIndex: number, reportedUserId: number, reportedRoomId: number, chatEntries: (string | number)[]) { this._data = [message, topicIndex, reportedUserId, reportedRoomId, chatEntries.length / 2, ...chatEntries]; } diff --git a/src/nitro/communication/messages/outgoing/help/ChatReviewGuideDecidesOnOfferMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/ChatReviewGuideDecidesOnOfferMessageComposer.ts index 89fb523e..bf80e198 100644 --- a/src/nitro/communication/messages/outgoing/help/ChatReviewGuideDecidesOnOfferMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/ChatReviewGuideDecidesOnOfferMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ChatReviewGuideDecidesOnOfferMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:boolean) + constructor(k: boolean) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/help/ChatReviewGuideDetachedMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/ChatReviewGuideDetachedMessageComposer.ts index 9717dfe9..a01a6f11 100644 --- a/src/nitro/communication/messages/outgoing/help/ChatReviewGuideDetachedMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/ChatReviewGuideDetachedMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ChatReviewGuideDetachedMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/help/ChatReviewGuideVoteMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/ChatReviewGuideVoteMessageComposer.ts index 1ba5ae7b..b3ee2e37 100644 --- a/src/nitro/communication/messages/outgoing/help/ChatReviewGuideVoteMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/ChatReviewGuideVoteMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ChatReviewGuideVoteMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number) + constructor(k: number) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/help/ChatReviewSessionCreateMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/ChatReviewSessionCreateMessageComposer.ts index a00b8a95..4f7b624a 100644 --- a/src/nitro/communication/messages/outgoing/help/ChatReviewSessionCreateMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/ChatReviewSessionCreateMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ChatReviewSessionCreateMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number) + constructor(k: number, _arg_2: number) { this._data = [k, _arg_2]; } diff --git a/src/nitro/communication/messages/outgoing/help/DeletePendingCallsForHelpMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/DeletePendingCallsForHelpMessageComposer.ts index ad520572..34d5ab01 100644 --- a/src/nitro/communication/messages/outgoing/help/DeletePendingCallsForHelpMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/DeletePendingCallsForHelpMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class DeletePendingCallsForHelpMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/help/GetCfhStatusMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GetCfhStatusMessageComposer.ts index 29928871..5c75c2e1 100644 --- a/src/nitro/communication/messages/outgoing/help/GetCfhStatusMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GetCfhStatusMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCfhStatusMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:boolean) + constructor(k: boolean) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/help/GetFaqCategoryMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GetFaqCategoryMessageComposer.ts index 1679d5ec..d69a9d0c 100644 --- a/src/nitro/communication/messages/outgoing/help/GetFaqCategoryMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GetFaqCategoryMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetFaqCategoryMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(categoryId:number) + constructor(categoryId: number) { this._data = [categoryId]; } diff --git a/src/nitro/communication/messages/outgoing/help/GetFaqTextMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GetFaqTextMessageComposer.ts index 3a0b850c..ba67a666 100644 --- a/src/nitro/communication/messages/outgoing/help/GetFaqTextMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GetFaqTextMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetFaqTextMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(questionId:number) + constructor(questionId: number) { this._data = [questionId]; } diff --git a/src/nitro/communication/messages/outgoing/help/GetGuideReportingStatusMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GetGuideReportingStatusMessageComposer.ts index a2183636..e39266fa 100644 --- a/src/nitro/communication/messages/outgoing/help/GetGuideReportingStatusMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GetGuideReportingStatusMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetGuideReportingStatusMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/help/GetPendingCallsForHelpMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GetPendingCallsForHelpMessageComposer.ts index c08a4a2b..0055af0d 100644 --- a/src/nitro/communication/messages/outgoing/help/GetPendingCallsForHelpMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GetPendingCallsForHelpMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetPendingCallsForHelpMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/help/GetQuizQuestionsComposer.ts b/src/nitro/communication/messages/outgoing/help/GetQuizQuestionsComposer.ts index 4bb85a3f..32de4865 100644 --- a/src/nitro/communication/messages/outgoing/help/GetQuizQuestionsComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GetQuizQuestionsComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetQuizQuestionsComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string) + constructor(k: string) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionCreateMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionCreateMessageComposer.ts index 21f5233b..a39f725a 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionCreateMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionCreateMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionCreateMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:string) + constructor(k: number, _arg_2: string) { this._data = [k, _arg_2]; } diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionFeedbackMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionFeedbackMessageComposer.ts index 37f06331..6be380a1 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionFeedbackMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionFeedbackMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionFeedbackMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:boolean) + constructor(k: boolean) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionGetRequesterRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionGetRequesterRoomMessageComposer.ts index 2246034a..a1e67ca1 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionGetRequesterRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionGetRequesterRoomMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionGetRequesterRoomMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionGuideDecidesMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionGuideDecidesMessageComposer.ts index f78403dc..e8f4cdf6 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionGuideDecidesMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionGuideDecidesMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionGuideDecidesMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:boolean) + constructor(k: boolean) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionInviteRequesterMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionInviteRequesterMessageComposer.ts index 143a3aba..306327e6 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionInviteRequesterMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionInviteRequesterMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionInviteRequesterMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionIsTypingMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionIsTypingMessageComposer.ts index 3bfcc871..e68e0572 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionIsTypingMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionIsTypingMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionIsTypingMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:boolean) + constructor(k: boolean) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionMessageMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionMessageMessageComposer.ts index fbb761b0..e0b3e17d 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionMessageMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionMessageMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionMessageMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string) + constructor(k: string) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionOnDutyUpdateMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionOnDutyUpdateMessageComposer.ts index d171b14f..60486639 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionOnDutyUpdateMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionOnDutyUpdateMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionOnDutyUpdateMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:boolean, _arg_2:boolean, _arg_3:boolean, _arg_4:boolean) + constructor(k: boolean, _arg_2: boolean, _arg_3: boolean, _arg_4: boolean) { this._data = [k, _arg_2, _arg_3, _arg_4]; } diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionReportMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionReportMessageComposer.ts index 86e47cd3..65d83442 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionReportMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionReportMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionReportMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string) + constructor(k: string) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionRequesterCancelsMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionRequesterCancelsMessageComposer.ts index c0ce2530..d9739927 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionRequesterCancelsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionRequesterCancelsMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionRequesterCancelsMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/help/GuideSessionResolvedMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/GuideSessionResolvedMessageComposer.ts index a868f874..23ceaa80 100644 --- a/src/nitro/communication/messages/outgoing/help/GuideSessionResolvedMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/GuideSessionResolvedMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuideSessionResolvedMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/help/PostQuizAnswersComposer.ts b/src/nitro/communication/messages/outgoing/help/PostQuizAnswersComposer.ts index 62b308dc..d55b622b 100644 --- a/src/nitro/communication/messages/outgoing/help/PostQuizAnswersComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/PostQuizAnswersComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class PostQuizAnswersComposer implements IMessageComposer { private _data: any; - constructor(quizCode:string, answerIds:number[]) + constructor(quizCode: string, answerIds: number[]) { this._data = [quizCode, answerIds.length, ...answerIds]; } diff --git a/src/nitro/communication/messages/outgoing/help/SearchFaqsMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/SearchFaqsMessageComposer.ts index cdfe8a73..902b79b0 100644 --- a/src/nitro/communication/messages/outgoing/help/SearchFaqsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/help/SearchFaqsMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class SearchFaqsMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string) + constructor(k: string) { this._data = [k]; } diff --git a/src/nitro/communication/messages/outgoing/inventory/badges/RequestBadgesComposer.ts b/src/nitro/communication/messages/outgoing/inventory/badges/RequestBadgesComposer.ts index 8dc95eb3..37c8837e 100644 --- a/src/nitro/communication/messages/outgoing/inventory/badges/RequestBadgesComposer.ts +++ b/src/nitro/communication/messages/outgoing/inventory/badges/RequestBadgesComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class RequestBadgesComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/inventory/badges/SetActivatedBadgesComposer.ts b/src/nitro/communication/messages/outgoing/inventory/badges/SetActivatedBadgesComposer.ts index 48cad882..a8a459fc 100644 --- a/src/nitro/communication/messages/outgoing/inventory/badges/SetActivatedBadgesComposer.ts +++ b/src/nitro/communication/messages/outgoing/inventory/badges/SetActivatedBadgesComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class SetActivatedBadgesComposer implements IMessageComposer { @@ -8,9 +8,9 @@ export class SetActivatedBadgesComposer implements IMessageComposer { const data = []; - for(let i = 0; i < this._badges.length; i++) + for (let i = 0; i < this._badges.length; i++) { - if(i <= this._badges.length) + if (i <= this._badges.length) { data.push(i + 1); data.push(this._badges[i]); diff --git a/src/nitro/communication/messages/outgoing/inventory/bots/GetBotInventoryComposer.ts b/src/nitro/communication/messages/outgoing/inventory/bots/GetBotInventoryComposer.ts index 48a6767f..e67a64c9 100644 --- a/src/nitro/communication/messages/outgoing/inventory/bots/GetBotInventoryComposer.ts +++ b/src/nitro/communication/messages/outgoing/inventory/bots/GetBotInventoryComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class GetBotInventoryComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class GetBotInventoryComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class FurnitureList2Composer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class FurnitureListComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/inventory/trading/TradingAcceptComposer.ts b/src/nitro/communication/messages/outgoing/inventory/trading/TradingAcceptComposer.ts index 0dfbe6b5..88b15306 100644 --- a/src/nitro/communication/messages/outgoing/inventory/trading/TradingAcceptComposer.ts +++ b/src/nitro/communication/messages/outgoing/inventory/trading/TradingAcceptComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class TradingAcceptComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class TradingAcceptComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class TradingCancelComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class TradingCloseComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class TradingConfirmationComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class TradingListAddItemComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class TradingListAddItemsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class TradingListItemRemoveComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class TradingOpenComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class TradingUnacceptComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UnseenResetCategoryComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UnseenResetItemsComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/landingview/votes/CommunityGoalVoteMessageComposer.ts b/src/nitro/communication/messages/outgoing/landingview/votes/CommunityGoalVoteMessageComposer.ts index 30371ddc..eb578e70 100644 --- a/src/nitro/communication/messages/outgoing/landingview/votes/CommunityGoalVoteMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/landingview/votes/CommunityGoalVoteMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class CommunityGoalVoteMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/marketplace/BuyMarketplaceOfferMessageComposer.ts b/src/nitro/communication/messages/outgoing/marketplace/BuyMarketplaceOfferMessageComposer.ts index 1a10dad2..f71a50f6 100644 --- a/src/nitro/communication/messages/outgoing/marketplace/BuyMarketplaceOfferMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/marketplace/BuyMarketplaceOfferMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class BuyMarketplaceOfferMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class BuyMarketplaceOfferMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/marketplace/CancelMarketplaceOfferMessageComposer.ts b/src/nitro/communication/messages/outgoing/marketplace/CancelMarketplaceOfferMessageComposer.ts index 33a44323..8a61947c 100644 --- a/src/nitro/communication/messages/outgoing/marketplace/CancelMarketplaceOfferMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/marketplace/CancelMarketplaceOfferMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CancelMarketplaceOfferMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class CancelMarketplaceOfferMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/marketplace/GetMarketplaceConfigurationMessageComposer.ts b/src/nitro/communication/messages/outgoing/marketplace/GetMarketplaceConfigurationMessageComposer.ts index 93175ac7..ca8b768f 100644 --- a/src/nitro/communication/messages/outgoing/marketplace/GetMarketplaceConfigurationMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/marketplace/GetMarketplaceConfigurationMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetMarketplaceConfigurationMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetMarketplaceConfigurationMessageComposer implements IMessageCompo constructor() { - this._data = [ ]; + this._data = []; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/marketplace/GetMarketplaceItemStatsComposer.ts b/src/nitro/communication/messages/outgoing/marketplace/GetMarketplaceItemStatsComposer.ts index de65d31d..32594948 100644 --- a/src/nitro/communication/messages/outgoing/marketplace/GetMarketplaceItemStatsComposer.ts +++ b/src/nitro/communication/messages/outgoing/marketplace/GetMarketplaceItemStatsComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetMarketplaceItemStatsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetMarketplaceItemStatsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetMarketplaceOffersMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetMarketplaceOwnOffersMessageComposer implements IMessageComposer< constructor() { - this._data = [ ]; + this._data = []; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/marketplace/MakeOfferMessageComposer.ts b/src/nitro/communication/messages/outgoing/marketplace/MakeOfferMessageComposer.ts index 584ce49f..06226e81 100644 --- a/src/nitro/communication/messages/outgoing/marketplace/MakeOfferMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/marketplace/MakeOfferMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class MakeOfferMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/marketplace/RedeemMarketplaceOfferCreditsMessageComposer.ts b/src/nitro/communication/messages/outgoing/marketplace/RedeemMarketplaceOfferCreditsMessageComposer.ts index c1187531..af07b64b 100644 --- a/src/nitro/communication/messages/outgoing/marketplace/RedeemMarketplaceOfferCreditsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/marketplace/RedeemMarketplaceOfferCreditsMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RedeemMarketplaceOfferCreditsMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RedeemMarketplaceOfferCreditsMessageComposer implements IMessageCom constructor() { - this._data = [ ]; + this._data = []; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/moderation/CloseIssueDefaultActionMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/CloseIssueDefaultActionMessageComposer.ts index 33f481e5..781c4f8d 100644 --- a/src/nitro/communication/messages/outgoing/moderation/CloseIssueDefaultActionMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/CloseIssueDefaultActionMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CloseIssueDefaultActionMessageComposer implements IMessageComposer { @@ -6,7 +6,7 @@ export class CloseIssueDefaultActionMessageComposer implements IMessageComposer< constructor(k: number, issueIds: number[], _arg_2: number) { - this._data = [ k, issueIds.length, ...issueIds, _arg_2 ]; + this._data = [k, issueIds.length, ...issueIds, _arg_2]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/moderation/CloseIssuesMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/CloseIssuesMessageComposer.ts index d1261740..d647baed 100644 --- a/src/nitro/communication/messages/outgoing/moderation/CloseIssuesMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/CloseIssuesMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CloseIssuesMessageComposer implements IMessageComposer { @@ -10,7 +10,7 @@ export class CloseIssuesMessageComposer implements IMessageComposer constructor(issueIds: number[], resolutionType: number) { - this._data = [ resolutionType, issueIds.length, ...issueIds]; + this._data = [resolutionType, issueIds.length, ...issueIds]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/moderation/DefaultSanctionMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/DefaultSanctionMessageComposer.ts index dee107e6..9a811b67 100644 --- a/src/nitro/communication/messages/outgoing/moderation/DefaultSanctionMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/DefaultSanctionMessageComposer.ts @@ -1,14 +1,14 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; import { ModBanMessageComposer } from './ModBanMessageComposer'; export class DefaultSanctionMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number, _arg_3:string, _arg_4:number = -1) + constructor(k: number, _arg_2: number, _arg_3: string, _arg_4: number = -1) { this._data = [k, _arg_2, _arg_3]; - if(_arg_4 != ModBanMessageComposer.NO_ISSUE_ID) + if (_arg_4 != ModBanMessageComposer.NO_ISSUE_ID) { this._data.push(_arg_4); } diff --git a/src/nitro/communication/messages/outgoing/moderation/GetCfhChatlogMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/GetCfhChatlogMessageComposer.ts index 5e2ad992..b486c7f8 100644 --- a/src/nitro/communication/messages/outgoing/moderation/GetCfhChatlogMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/GetCfhChatlogMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCfhChatlogMessageComposer implements IMessageComposer> diff --git a/src/nitro/communication/messages/outgoing/moderation/GetModeratorRoomInfoMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/GetModeratorRoomInfoMessageComposer.ts index e6d04fb4..524660ce 100644 --- a/src/nitro/communication/messages/outgoing/moderation/GetModeratorRoomInfoMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/GetModeratorRoomInfoMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetModeratorRoomInfoMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetModeratorRoomInfoMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetModeratorUserInfoMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetRoomChatlogMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetRoomVisitsMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetUserChatlogMessageComposer implements IMessageComposer> @@ -8,7 +8,7 @@ export class ModAlertMessageComposer implements IMessageComposer> { @@ -9,7 +9,7 @@ export class ModBanMessageComposer implements IMessageComposer> { @@ -9,7 +9,7 @@ export class ModKickMessageComposer implements IMessageComposer @@ -12,7 +12,7 @@ export class ModMessageMessageComposer implements IMessageComposer this._data.push(''); this._data.push(''); this._data.push(arg3); - if(arg4 != ModBanMessageComposer.NO_ISSUE_ID) + if (arg4 != ModBanMessageComposer.NO_ISSUE_ID) { this._data.push(arg4); } diff --git a/src/nitro/communication/messages/outgoing/moderation/ModMuteMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/ModMuteMessageComposer.ts index b60c1b0a..7807dcae 100644 --- a/src/nitro/communication/messages/outgoing/moderation/ModMuteMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/ModMuteMessageComposer.ts @@ -1,5 +1,5 @@ import { ModBanMessageComposer } from '.'; -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ModMuteMessageComposer implements IMessageComposer> { @@ -8,7 +8,7 @@ export class ModMuteMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number, _arg_3:number, _arg_4:number) + constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: number) { this._data = [k, _arg_2, _arg_3, _arg_4]; } diff --git a/src/nitro/communication/messages/outgoing/moderation/ModToolSanctionComposer.ts b/src/nitro/communication/messages/outgoing/moderation/ModToolSanctionComposer.ts index efc2d781..81965c39 100644 --- a/src/nitro/communication/messages/outgoing/moderation/ModToolSanctionComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/ModToolSanctionComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ModToolSanctionComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number, _arg_3:number) + constructor(k: number, _arg_2: number, _arg_3: number) { this._data = [k, _arg_2, _arg_3]; } diff --git a/src/nitro/communication/messages/outgoing/moderation/ModTradingLockMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/ModTradingLockMessageComposer.ts index 12ecfd43..d9a79cac 100644 --- a/src/nitro/communication/messages/outgoing/moderation/ModTradingLockMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/ModTradingLockMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; import { ModBanMessageComposer } from './ModBanMessageComposer'; export class ModTradingLockMessageComposer implements IMessageComposer> @@ -7,9 +7,9 @@ export class ModTradingLockMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class ModerateRoomMessageComposer implements IMessageComposer { diff --git a/src/nitro/communication/messages/outgoing/moderation/PickIssuesMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/PickIssuesMessageComposer.ts index a05955e0..7c880457 100644 --- a/src/nitro/communication/messages/outgoing/moderation/PickIssuesMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/PickIssuesMessageComposer.ts @@ -1,10 +1,10 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class PickIssuesMessageComposer implements IMessageComposer { private _data: any; - constructor(issueIds:number[], retryEnabled:boolean, retryCount:number, message:string) + constructor(issueIds: number[], retryEnabled: boolean, retryCount: number, message: string) { this._data = [issueIds.length, ...issueIds, retryEnabled, retryCount, message]; } diff --git a/src/nitro/communication/messages/outgoing/moderation/ReleaseIssuesMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/ReleaseIssuesMessageComposer.ts index a6f3c92a..7ab553b9 100644 --- a/src/nitro/communication/messages/outgoing/moderation/ReleaseIssuesMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/ReleaseIssuesMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ReleaseIssuesMessageComposer implements IMessageComposer { diff --git a/src/nitro/communication/messages/outgoing/navigator/AddFavouriteRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/AddFavouriteRoomMessageComposer.ts index fff0cf7f..7a438b3c 100644 --- a/src/nitro/communication/messages/outgoing/navigator/AddFavouriteRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/AddFavouriteRoomMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class AddFavouriteRoomMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class AddFavouriteRoomMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/CancelEventMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/CancelEventMessageComposer.ts index 5721b49c..527d86c1 100644 --- a/src/nitro/communication/messages/outgoing/navigator/CancelEventMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/CancelEventMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CancelEventMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class CancelEventMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:number) + constructor(k: number, _arg_2: number) { this._data = [k, _arg_2]; } diff --git a/src/nitro/communication/messages/outgoing/navigator/ConvertGlobalRoomIdComposer.ts b/src/nitro/communication/messages/outgoing/navigator/ConvertGlobalRoomIdComposer.ts index 393bffe2..2025788d 100644 --- a/src/nitro/communication/messages/outgoing/navigator/ConvertGlobalRoomIdComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/ConvertGlobalRoomIdComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ConvertGlobalRoomIdMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class ConvertGlobalRoomIdMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class CreateFlatMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class DeleteFavouriteRoomMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:string, _arg_3:string) + constructor(k: number, _arg_2: string, _arg_3: string) { - this._data = [ k, _arg_2, _arg_3 ]; + this._data = [k, _arg_2, _arg_3]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts index edbc7dd1..4ddba7c2 100644 --- a/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts @@ -1,12 +1,12 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ForwardToARandomPromotedRoomMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string) + constructor(k: string) { - this._data = [ k ]; + this._data = [k]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts index 168d4264..f86eb05e 100644 --- a/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts @@ -1,12 +1,12 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ForwardToSomeRoomMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string) + constructor(k: string) { - this._data = [ k ]; + this._data = [k]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/GetCategoriesWithUserCountMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetCategoriesWithUserCountMessageComposer.ts index cd7aa76f..512c8aaa 100644 --- a/src/nitro/communication/messages/outgoing/navigator/GetCategoriesWithUserCountMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/GetCategoriesWithUserCountMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCategoriesWithUserCountMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/GetGuestRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetGuestRoomMessageComposer.ts index cd738f42..439097c1 100644 --- a/src/nitro/communication/messages/outgoing/navigator/GetGuestRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/GetGuestRoomMessageComposer.ts @@ -1,12 +1,12 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; -export class GetGuestRoomMessageComposer implements IMessageComposer<[ number, number, number ]> +export class GetGuestRoomMessageComposer implements IMessageComposer<[number, number, number]> { - private _data: [ number, number, number ]; + private _data: [number, number, number]; constructor(roomId: number, enterRoom: boolean, forwardRoom: boolean) { - this._data = [ roomId, (enterRoom ? 1 : 0), (forwardRoom ? 1 : 0) ]; + this._data = [roomId, (enterRoom ? 1 : 0), (forwardRoom ? 1 : 0)]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts index cb7e2dba..661e67cc 100644 --- a/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetOfficialRoomsMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetOfficialRoomsMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/GetUserEventCatsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetUserEventCatsMessageComposer.ts index 8b689388..06a88069 100644 --- a/src/nitro/communication/messages/outgoing/navigator/GetUserEventCatsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/GetUserEventCatsMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetUserEventCatsMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/GetUserFlatCatsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetUserFlatCatsMessageComposer.ts index f9165523..8a020c3a 100644 --- a/src/nitro/communication/messages/outgoing/navigator/GetUserFlatCatsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/GetUserFlatCatsMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetUserFlatCatsMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts index fbf55d28..cff4a232 100644 --- a/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GuildBaseSearchMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GuildBaseSearchMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/MyFrequentRoomHistorySearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyFrequentRoomHistorySearchMessageComposer.ts index 68ab11b6..362ec958 100644 --- a/src/nitro/communication/messages/outgoing/navigator/MyFrequentRoomHistorySearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/MyFrequentRoomHistorySearchMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class MyFrequentRoomHistorySearchMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/MyFriendsRoomsSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyFriendsRoomsSearchMessageComposer.ts index dfcf9d27..1ba68efa 100644 --- a/src/nitro/communication/messages/outgoing/navigator/MyFriendsRoomsSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/MyFriendsRoomsSearchMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class MyFriendsRoomsSearchMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/MyGuildBasesSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyGuildBasesSearchMessageComposer.ts index 723cf7db..6b9e8823 100644 --- a/src/nitro/communication/messages/outgoing/navigator/MyGuildBasesSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/MyGuildBasesSearchMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class MyGuildBasesSearchMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/MyRecommendedRoomsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyRecommendedRoomsMessageComposer.ts index 6d571789..ffea2a56 100644 --- a/src/nitro/communication/messages/outgoing/navigator/MyRecommendedRoomsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/MyRecommendedRoomsMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class MyRecommendedRoomsMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/MyRoomHistorySearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyRoomHistorySearchMessageComposer.ts index a01ef2c9..fe552810 100644 --- a/src/nitro/communication/messages/outgoing/navigator/MyRoomHistorySearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/MyRoomHistorySearchMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class MyRoomHistorySearchMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/MyRoomRightsSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyRoomRightsSearchMessageComposer.ts index fbb5b57c..d97db35e 100644 --- a/src/nitro/communication/messages/outgoing/navigator/MyRoomRightsSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/MyRoomRightsSearchMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class MyRoomRightsSearchMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/MyRoomsSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/MyRoomsSearchMessageComposer.ts index 62b2ea25..8c5f91f7 100644 --- a/src/nitro/communication/messages/outgoing/navigator/MyRoomsSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/MyRoomsSearchMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class MyRoomsSearchMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoryListModeComposer.ts b/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoryListModeComposer.ts index 297d199b..5b539d19 100644 --- a/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoryListModeComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoryListModeComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class NavigatorCategoryListModeComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class NavigatorCategoryListModeComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class NavigatorInitComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class NavigatorSearchCloseComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class NavigatorSearchComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class NavigatorSearchOpenComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class NavigatorSearchSaveComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class NavigatorSettingsSaveComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:string, _arg_2:number) + constructor(k: string, _arg_2: number) { - this._data = [ k, _arg_2 ]; + this._data = [k, _arg_2]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts index 01e29c09..173610b4 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RateFlatMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RateFlatMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RemoveOwnRoomRightsRoomMessageComposer implements IMessageComposer< constructor(roomId: number) { - this._data = [ roomId ]; + this._data = [roomId]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts index eb95aef4..3aee5676 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts @@ -1,12 +1,12 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RoomAdEventTabAdClickedComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(k:number, _arg_2:string, _arg_3:number) + constructor(k: number, _arg_2: string, _arg_3: number) { - this._data = [ k, _arg_2, _arg_3 ]; + this._data = [k, _arg_2, _arg_3]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabViewedComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabViewedComposer.ts index beae56d4..1ce7ebc9 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabViewedComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabViewedComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RoomAdEventTabViewedComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts index 9b983107..6d6534ec 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RoomAdSearchMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomAdSearchMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomTextSearchMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts index 2ce8b9df..c4ddee54 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RoomsWithHighestScoreSearchMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomsWithHighestScoreSearchMessageComposer implements IMessageCompo constructor(k: number) { - this._data = [ k ]; + this._data = [k]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts index 81efad20..26d50b02 100644 --- a/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class SetRoomSessionTagsMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class SetRoomSessionTagsMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class ToggleStaffPickMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UpdateHomeRoomMessageComposer implements IMessageComposer> { private _data: ConstructorParameters; - constructor(flatId:number, bgImgId:number, frontImgId:number, objCount:number) + constructor(flatId: number, bgImgId: number, frontImgId: number, objCount: number) { - this._data = [ flatId, bgImgId, frontImgId, objCount ]; + this._data = [flatId, bgImgId, frontImgId, objCount]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/pet/PetMountComposer.ts b/src/nitro/communication/messages/outgoing/pet/PetMountComposer.ts index 65d0e3e3..27d1b16f 100644 --- a/src/nitro/communication/messages/outgoing/pet/PetMountComposer.ts +++ b/src/nitro/communication/messages/outgoing/pet/PetMountComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class PetMountComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PetMountComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PetRespectComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PetSupplementComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RemovePetSaddleComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RequestPetInfoComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class TogglePetBreedingComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class TogglePetRidingComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UsePetProductComposer implements IMessageComposer { private _data: any; - constructor(pollId:number, questionId:number, answers:string[]) + constructor(pollId: number, questionId: number, answers: string[]) { - this._data = [ pollId, questionId, answers.length, ...answers ]; + this._data = [pollId, questionId, answers.length, ...answers]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/poll/PollRejectComposer.ts b/src/nitro/communication/messages/outgoing/poll/PollRejectComposer.ts index 1e26b5db..4fc7a57a 100644 --- a/src/nitro/communication/messages/outgoing/poll/PollRejectComposer.ts +++ b/src/nitro/communication/messages/outgoing/poll/PollRejectComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class PollRejectComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PollRejectComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PollStartComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/ActivateQuestMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/ActivateQuestMessageComposer.ts index 4f32084b..907ac6f8 100644 --- a/src/nitro/communication/messages/outgoing/quest/ActivateQuestMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/ActivateQuestMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ActivateQuestMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/CancelQuestMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/CancelQuestMessageComposer.ts index aa476bb7..86ee8b80 100644 --- a/src/nitro/communication/messages/outgoing/quest/CancelQuestMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/CancelQuestMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class CancelQuestMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/FriendRequestQuestCompleteMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/FriendRequestQuestCompleteMessageComposer.ts index 04bf304a..29ac2aa5 100644 --- a/src/nitro/communication/messages/outgoing/quest/FriendRequestQuestCompleteMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/FriendRequestQuestCompleteMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class FriendRequestQuestCompleteMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalEarnedPrizesMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalEarnedPrizesMessageComposer.ts index 55173c0a..4cbe7a4c 100644 --- a/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalEarnedPrizesMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalEarnedPrizesMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCommunityGoalEarnedPrizesMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalHallOfFameMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalHallOfFameMessageComposer.ts index 24bee431..aef7191d 100644 --- a/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalHallOfFameMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalHallOfFameMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCommunityGoalHallOfFameMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalProgressMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalProgressMessageComposer.ts index 4aebb2c0..7c3e9ff3 100644 --- a/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalProgressMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/GetCommunityGoalProgressMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetCommunityGoalProgressMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/GetConcurrentUsersGoalProgressMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/GetConcurrentUsersGoalProgressMessageComposer.ts index e27990e7..9d1da70f 100644 --- a/src/nitro/communication/messages/outgoing/quest/GetConcurrentUsersGoalProgressMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/GetConcurrentUsersGoalProgressMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetConcurrentUsersGoalProgressMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/GetConcurrentUsersRewardMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/GetConcurrentUsersRewardMessageComposer.ts index a92d5efb..a293e00f 100644 --- a/src/nitro/communication/messages/outgoing/quest/GetConcurrentUsersRewardMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/GetConcurrentUsersRewardMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetConcurrentUsersRewardMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/GetDailyQuestMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/GetDailyQuestMessageComposer.ts index 750c771b..de6e7dba 100644 --- a/src/nitro/communication/messages/outgoing/quest/GetDailyQuestMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/GetDailyQuestMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetDailyQuestMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/GetQuestsMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/GetQuestsMessageComposer.ts index b9254d17..6bc8447f 100644 --- a/src/nitro/communication/messages/outgoing/quest/GetQuestsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/GetQuestsMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetQuestsMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/GetSeasonalQuestsOnlyMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/GetSeasonalQuestsOnlyMessageComposer.ts index 76421d31..0ca5e35d 100644 --- a/src/nitro/communication/messages/outgoing/quest/GetSeasonalQuestsOnlyMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/GetSeasonalQuestsOnlyMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetSeasonalQuestsOnlyMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/OpenQuestTrackerMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/OpenQuestTrackerMessageComposer.ts index 173c8383..86585797 100644 --- a/src/nitro/communication/messages/outgoing/quest/OpenQuestTrackerMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/OpenQuestTrackerMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class OpenQuestTrackerMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/RedeemCommunityGoalPrizeMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/RedeemCommunityGoalPrizeMessageComposer.ts index 5e5e8489..a53e472a 100644 --- a/src/nitro/communication/messages/outgoing/quest/RedeemCommunityGoalPrizeMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/RedeemCommunityGoalPrizeMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RedeemCommunityGoalPrizeMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/RejectQuestMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/RejectQuestMessageComposer.ts index 9ef293b3..0505b859 100644 --- a/src/nitro/communication/messages/outgoing/quest/RejectQuestMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/RejectQuestMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RejectQuestMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/quest/StartCampaignMessageComposer.ts b/src/nitro/communication/messages/outgoing/quest/StartCampaignMessageComposer.ts index 90be304e..9fc9ba1b 100644 --- a/src/nitro/communication/messages/outgoing/quest/StartCampaignMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/quest/StartCampaignMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class StartCampaignMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/RedeemItemClothingComposer.ts b/src/nitro/communication/messages/outgoing/room/RedeemItemClothingComposer.ts index 2aa3f80c..124a0cd0 100644 --- a/src/nitro/communication/messages/outgoing/room/RedeemItemClothingComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/RedeemItemClothingComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class RedeemItemClothingComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RedeemItemClothingComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomDoorbellAccessComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomEnterComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RemoveAllRightsMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomAmbassadorAlertComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomBanUserComposer implements IMessageComposer +export class RoomDeleteComposer implements IMessageComposer<[number]> { - private _data: [ number ]; + private _data: [number]; constructor(roomId: number) { - this._data = [ roomId ]; + this._data = [roomId]; } public getMessageArray() @@ -18,4 +18,4 @@ export class RoomDeleteComposer implements IMessageComposer<[ number ]> { return; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/outgoing/room/action/RoomGiveRightsComposer.ts b/src/nitro/communication/messages/outgoing/room/action/RoomGiveRightsComposer.ts index 64a765bc..fc19a8d9 100644 --- a/src/nitro/communication/messages/outgoing/room/action/RoomGiveRightsComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/action/RoomGiveRightsComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class RoomGiveRightsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomGiveRightsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomKickUserComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomMuteUserComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomTakeRightsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnbanUserComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RequestBotCommandConfigurationComposer implements IMessageComposer< constructor(botId: number, skillId: number) { - this._data = [ botId, skillId ]; + this._data = [botId, skillId]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/room/data/RoomBannedUsersComposer.ts b/src/nitro/communication/messages/outgoing/room/data/RoomBannedUsersComposer.ts index 1a6e3d55..d381321d 100644 --- a/src/nitro/communication/messages/outgoing/room/data/RoomBannedUsersComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/data/RoomBannedUsersComposer.ts @@ -1,12 +1,12 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; -export class RoomBannedUsersComposer implements IMessageComposer<[ number ]> +export class RoomBannedUsersComposer implements IMessageComposer<[number]> { - private _data: [ number ]; + private _data: [number]; constructor(roomId: number) { - this._data = [ roomId ]; + this._data = [roomId]; } public getMessageArray() @@ -18,4 +18,4 @@ export class RoomBannedUsersComposer implements IMessageComposer<[ number ]> { return; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/outgoing/room/data/RoomSettingsComposer.ts b/src/nitro/communication/messages/outgoing/room/data/RoomSettingsComposer.ts index 8a5b9bd2..2d4e46aa 100644 --- a/src/nitro/communication/messages/outgoing/room/data/RoomSettingsComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/data/RoomSettingsComposer.ts @@ -1,12 +1,12 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; -export class RoomSettingsComposer implements IMessageComposer<[ number ]> +export class RoomSettingsComposer implements IMessageComposer<[number]> { - private _data: [ number ]; + private _data: [number]; constructor(roomId: number) { - this._data = [ roomId ]; + this._data = [roomId]; } public getMessageArray() @@ -18,4 +18,4 @@ export class RoomSettingsComposer implements IMessageComposer<[ number ]> { return; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/outgoing/room/data/RoomUsersWithRightsComposer.ts b/src/nitro/communication/messages/outgoing/room/data/RoomUsersWithRightsComposer.ts index 534ee327..b221a034 100644 --- a/src/nitro/communication/messages/outgoing/room/data/RoomUsersWithRightsComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/data/RoomUsersWithRightsComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class RoomUsersWithRightsComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUsersWithRightsComposer implements IMessageComposer - > + implements + IMessageComposer< + ConstructorParameters + > { private _data: ConstructorParameters; diff --git a/src/nitro/communication/messages/outgoing/room/engine/BotPlaceComposer.ts b/src/nitro/communication/messages/outgoing/room/engine/BotPlaceComposer.ts index c10831bb..20464931 100644 --- a/src/nitro/communication/messages/outgoing/room/engine/BotPlaceComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/engine/BotPlaceComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class BotPlaceComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class BotPlaceComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class BotRemoveComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class BotSkillSaveComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetItemDataComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PetMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PetMoveComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PetPlaceComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class PetRemoveComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RemoveWallItemComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class SetItemDataMessageComposer implements IMessageComposer { @@ -6,9 +6,9 @@ export class SetObjectDataMessageComposer implements IMessageComposer constructor(objectId: number, data: Map) { - this._data = [ objectId, (data.size * 2) ]; + this._data = [objectId, (data.size * 2)]; - for(const [ key, value ] of data.entries()) this._data.push( key, value ); + for (const [key, value] of data.entries()) this._data.push(key, value); } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/room/furniture/AddSpamWallPostItMessageComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/AddSpamWallPostItMessageComposer.ts index c2de432b..4b5c68b8 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/AddSpamWallPostItMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/AddSpamWallPostItMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class AddSpamWallPostItMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/furniture/FurnitureAliasesComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/FurnitureAliasesComposer.ts index e9830306..aeb14623 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/FurnitureAliasesComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/FurnitureAliasesComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class FurnitureAliasesComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class FurnitureAliasesComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureGroupInfoComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurniturePickupComposer implements IMessageComposer @@ -22,12 +22,12 @@ export class FurniturePlaceComposer implements IMessageComposer public getMessageArray() { - switch(this._category) + switch (this._category) { case RoomObjectCategory.FLOOR: - return [ `${ this._itemId } ${ this._x } ${ this._y } ${ this._direction }` ]; + return [`${this._itemId} ${this._x} ${this._y} ${this._direction}`]; case RoomObjectCategory.WALL: - return [ `${ this._itemId } ${ this._wallLocation } ` ]; + return [`${this._itemId} ${this._wallLocation} `]; default: return []; } @@ -37,4 +37,4 @@ export class FurniturePlaceComposer implements IMessageComposer { return; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/outgoing/room/furniture/FurniturePlacePaintComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/FurniturePlacePaintComposer.ts index 81cfd23f..fd97060a 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/FurniturePlacePaintComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/FurniturePlacePaintComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class FurniturePlacePaintComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurniturePlacePaintComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurniturePostItPlaceComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/furniture/dimmer/MoodlightSettingsSaveComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/dimmer/MoodlightSettingsSaveComposer.ts index a8f52044..02f8527b 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/dimmer/MoodlightSettingsSaveComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/dimmer/MoodlightSettingsSaveComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../../api'; export class MoodlightSettingsSaveComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/furniture/dimmer/MoodlightTogggleStateComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/dimmer/MoodlightTogggleStateComposer.ts index 908f2086..2f381c2a 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/dimmer/MoodlightTogggleStateComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/dimmer/MoodlightTogggleStateComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../../api'; export class MoodlightTogggleStateComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/furniture/floor/FurnitureFloorUpdateComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/floor/FurnitureFloorUpdateComposer.ts index e5ca5b83..e51aac25 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/floor/FurnitureFloorUpdateComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/floor/FurnitureFloorUpdateComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../../api'; export class FurnitureFloorUpdateComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureFloorUpdateComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureColorWheelComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureDiceActivateComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureDiceDeactivateComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureExchangeComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureMultiStateComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureOneWayDoorComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureRandomStateComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureStackHeightComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureWallMultiStateComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureMannequinSaveLookComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureMannequinSaveNameComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/furniture/toner/ApplyTonerComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/toner/ApplyTonerComposer.ts index a30f26fa..084b000c 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/toner/ApplyTonerComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/toner/ApplyTonerComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../../api'; export class ApplyTonerComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/furniture/wall/FurnitureWallUpdateComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/wall/FurnitureWallUpdateComposer.ts index 5e3a91d5..99414f5a 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/wall/FurnitureWallUpdateComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/wall/FurnitureWallUpdateComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../../api'; export class FurnitureWallUpdateComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class FurnitureWallUpdateComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/furniture/youtube/GetYoutubeDisplayStatusMessageComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/youtube/GetYoutubeDisplayStatusMessageComposer.ts index 3ff94292..d4a0cc6e 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/youtube/GetYoutubeDisplayStatusMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/youtube/GetYoutubeDisplayStatusMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../../core'; +import { IMessageComposer } from '../../../../../../../api'; export class GetYoutubeDisplayStatusMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetYoutubeDisplayStatusMessageComposer implements IMessageComposer< constructor(k: number) { - this._data = [ k ]; + this._data = [k]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/room/layout/GetOccupiedTilesMessageComposer.ts b/src/nitro/communication/messages/outgoing/room/layout/GetOccupiedTilesMessageComposer.ts index fa1983b5..b3821d46 100644 --- a/src/nitro/communication/messages/outgoing/room/layout/GetOccupiedTilesMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/layout/GetOccupiedTilesMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class GetOccupiedTilesMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/layout/GetRoomEntryDataMessageComposer.ts b/src/nitro/communication/messages/outgoing/room/layout/GetRoomEntryDataMessageComposer.ts index c2f98d0d..c99ecf45 100644 --- a/src/nitro/communication/messages/outgoing/room/layout/GetRoomEntryDataMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/layout/GetRoomEntryDataMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class GetRoomEntryDataMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/layout/GetRoomEntryTileMessageComposer.ts b/src/nitro/communication/messages/outgoing/room/layout/GetRoomEntryTileMessageComposer.ts index d06e22e8..ad2ed723 100644 --- a/src/nitro/communication/messages/outgoing/room/layout/GetRoomEntryTileMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/layout/GetRoomEntryTileMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class GetRoomEntryTileMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/layout/UpdateFloorPropertiesMessageComposer.ts b/src/nitro/communication/messages/outgoing/room/layout/UpdateFloorPropertiesMessageComposer.ts index 583c205c..14227093 100644 --- a/src/nitro/communication/messages/outgoing/room/layout/UpdateFloorPropertiesMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/layout/UpdateFloorPropertiesMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class UpdateFloorPropertiesMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/room/session/GoToFlatMessageComposer.ts b/src/nitro/communication/messages/outgoing/room/session/GoToFlatMessageComposer.ts index 5fda5db4..d810baac 100644 --- a/src/nitro/communication/messages/outgoing/room/session/GoToFlatMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/session/GoToFlatMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class GoToFlatMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GoToFlatMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitActionComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitDanceComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitDropHandItemComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitGiveHandItemComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitGiveHandItemPetComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitLookComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitPostureComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitSignComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitWalkComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitChatComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitChatShoutComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RoomUnitChatStyleComposer implements IMessageComposer +export class RoomUnitChatWhisperComposer implements IMessageComposer<[string, number]> { - private _data: [ string, number ]; + private _data: [string, number]; constructor(recipientName: string, message: string, styleId: number) { - this._data = [ (recipientName + ' ' + message), styleId ]; + this._data = [(recipientName + ' ' + message), styleId]; } public getMessageArray() @@ -18,4 +18,4 @@ export class RoomUnitChatWhisperComposer implements IMessageComposer<[ string, n { return; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/outgoing/room/unit/chat/RoomUnitTypingStartComposer.ts b/src/nitro/communication/messages/outgoing/room/unit/chat/RoomUnitTypingStartComposer.ts index 5a1fffc4..010b4b80 100644 --- a/src/nitro/communication/messages/outgoing/room/unit/chat/RoomUnitTypingStartComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/unit/chat/RoomUnitTypingStartComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../../api'; export class RoomUnitTypingStartComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class RoomUnitTypingStartComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class RoomUnitTypingStopComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class ApplySnapshotMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class OpenMessageComposer implements IMessageComposer { @@ -6,7 +6,7 @@ export class RoomMuteComposer implements IMessageComposer constructor() { - this._data = [ ]; + this._data = []; } public getMessageArray() @@ -18,4 +18,4 @@ export class RoomMuteComposer implements IMessageComposer { return; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/outgoing/roomevents/UpdateActionMessageComposer.ts b/src/nitro/communication/messages/outgoing/roomevents/UpdateActionMessageComposer.ts index ca888957..1e93ff50 100644 --- a/src/nitro/communication/messages/outgoing/roomevents/UpdateActionMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/roomevents/UpdateActionMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class UpdateActionMessageComposer implements IMessageComposer { @@ -6,7 +6,7 @@ export class UpdateActionMessageComposer implements IMessageComposer constructor(id: number, ints: number[], string: string, stuffs: number[], delay: number, selectionCode: number) { - this._data = [ id, ints.length, ...ints, string, stuffs.length, ...stuffs, delay, selectionCode ]; + this._data = [id, ints.length, ...ints, string, stuffs.length, ...stuffs, delay, selectionCode]; } public getMessageArray() @@ -18,4 +18,4 @@ export class UpdateActionMessageComposer implements IMessageComposer { return; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/outgoing/roomevents/UpdateConditionMessageComposer.ts b/src/nitro/communication/messages/outgoing/roomevents/UpdateConditionMessageComposer.ts index c7a3c1a6..03b65f91 100644 --- a/src/nitro/communication/messages/outgoing/roomevents/UpdateConditionMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/roomevents/UpdateConditionMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class UpdateConditionMessageComposer implements IMessageComposer { @@ -6,7 +6,7 @@ export class UpdateConditionMessageComposer implements IMessageComposer { @@ -6,7 +6,7 @@ export class UpdateTriggerMessageComposer implements IMessageComposer constructor(id: number, ints: number[], string: string, stuffs: number[], selectionCode: number) { - this._data = [ id, ints.length, ...ints, string, stuffs.length, ...stuffs, selectionCode ]; + this._data = [id, ints.length, ...ints, string, stuffs.length, ...stuffs, selectionCode]; } public getMessageArray() @@ -18,4 +18,4 @@ export class UpdateTriggerMessageComposer implements IMessageComposer { return; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/outgoing/sound/AddJukeboxDiskComposer.ts b/src/nitro/communication/messages/outgoing/sound/AddJukeboxDiskComposer.ts index 0b5748da..982034a6 100644 --- a/src/nitro/communication/messages/outgoing/sound/AddJukeboxDiskComposer.ts +++ b/src/nitro/communication/messages/outgoing/sound/AddJukeboxDiskComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class AddJukeboxDiskComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/sound/GetJukeboxPlayListMessageComposer.ts b/src/nitro/communication/messages/outgoing/sound/GetJukeboxPlayListMessageComposer.ts index 0f4da65e..ea8f4112 100644 --- a/src/nitro/communication/messages/outgoing/sound/GetJukeboxPlayListMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/sound/GetJukeboxPlayListMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetJukeboxPlayListMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/sound/GetNowPlayingMessageComposer.ts b/src/nitro/communication/messages/outgoing/sound/GetNowPlayingMessageComposer.ts index b13cc0c6..1849b03f 100644 --- a/src/nitro/communication/messages/outgoing/sound/GetNowPlayingMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/sound/GetNowPlayingMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetNowPlayingMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/sound/GetOfficialSongIdMessageComposer.ts b/src/nitro/communication/messages/outgoing/sound/GetOfficialSongIdMessageComposer.ts index c200b8ce..0538ec74 100644 --- a/src/nitro/communication/messages/outgoing/sound/GetOfficialSongIdMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/sound/GetOfficialSongIdMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetOfficialSongIdMessageComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetOfficialSongIdMessageComposer implements IMessageComposer> { - private _data: ConstructorParameters< typeof GetSongInfoMessageComposer>; + private _data: ConstructorParameters; constructor(...args: number[]) { diff --git a/src/nitro/communication/messages/outgoing/sound/GetSoundMachinePlayListMessageComposer.ts b/src/nitro/communication/messages/outgoing/sound/GetSoundMachinePlayListMessageComposer.ts index 2a161a40..6d97352e 100644 --- a/src/nitro/communication/messages/outgoing/sound/GetSoundMachinePlayListMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/sound/GetSoundMachinePlayListMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetSoundMachinePlayListMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/sound/GetSoundSettingsComposer.ts b/src/nitro/communication/messages/outgoing/sound/GetSoundSettingsComposer.ts index 2c12f089..06558458 100644 --- a/src/nitro/communication/messages/outgoing/sound/GetSoundSettingsComposer.ts +++ b/src/nitro/communication/messages/outgoing/sound/GetSoundSettingsComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetSoundSettingsComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/sound/GetUserSongDisksMessageComposer.ts b/src/nitro/communication/messages/outgoing/sound/GetUserSongDisksMessageComposer.ts index 6a809d5f..84bda043 100644 --- a/src/nitro/communication/messages/outgoing/sound/GetUserSongDisksMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/sound/GetUserSongDisksMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class GetUserSongDisksMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/sound/RemoveJukeboxDiskComposer.ts b/src/nitro/communication/messages/outgoing/sound/RemoveJukeboxDiskComposer.ts index e679deae..7148578b 100644 --- a/src/nitro/communication/messages/outgoing/sound/RemoveJukeboxDiskComposer.ts +++ b/src/nitro/communication/messages/outgoing/sound/RemoveJukeboxDiskComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core'; +import { IMessageComposer } from '../../../../../api'; export class RemoveJukeboxDiskComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class RemoveJukeboxDiskComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class TalentTrackComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class ApproveNameMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/user/GetHabboGroupBadgesMessageComposer.ts b/src/nitro/communication/messages/outgoing/user/GetHabboGroupBadgesMessageComposer.ts index e9c12ddc..c76639f2 100644 --- a/src/nitro/communication/messages/outgoing/user/GetHabboGroupBadgesMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/user/GetHabboGroupBadgesMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class GetHabboGroupBadgesMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/user/ScrGetKickbackInfoMessageComposer.ts b/src/nitro/communication/messages/outgoing/user/ScrGetKickbackInfoMessageComposer.ts index ae9dd871..2a3d7a2b 100644 --- a/src/nitro/communication/messages/outgoing/user/ScrGetKickbackInfoMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/user/ScrGetKickbackInfoMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class ScrGetKickbackInfoMessageComposer implements IMessageComposer> { diff --git a/src/nitro/communication/messages/outgoing/user/UserRespectComposer.ts b/src/nitro/communication/messages/outgoing/user/UserRespectComposer.ts index e2945f61..a0f66a48 100644 --- a/src/nitro/communication/messages/outgoing/user/UserRespectComposer.ts +++ b/src/nitro/communication/messages/outgoing/user/UserRespectComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../api'; export class UserRespectComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserRespectComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetExtendedProfileByNameMessageComposer implements IMessageComposer constructor(username: string) { - this._data = [ username ]; + this._data = [username]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/user/data/GetIgnoredUsersComposer.ts b/src/nitro/communication/messages/outgoing/user/data/GetIgnoredUsersComposer.ts index ce386734..e07bc6bf 100644 --- a/src/nitro/communication/messages/outgoing/user/data/GetIgnoredUsersComposer.ts +++ b/src/nitro/communication/messages/outgoing/user/data/GetIgnoredUsersComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; +import { IMessageComposer } from '../../../../../../api'; export class GetIgnoredUsersComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class GetIgnoredUsersComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class IgnoreUserComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class IgnoreUserIdComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UnignoreUserComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserCurrentBadgesComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserFigureComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserMottoComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserProfileComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserRelationshipsComposer implements IMessageComposer> { @@ -18,4 +18,4 @@ export class UserCurrencyComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserSubscriptionComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserSettingsCameraFollowComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserSettingsOldChatComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserSettingsRoomInvitesComposer implements IMessageComposer> { @@ -6,7 +6,7 @@ export class UserSettingsSoundComposer implements IMessageComposer 0); this._minutesUntilChange = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/availability/HotelClosedAndOpensMessageParser.ts b/src/nitro/communication/messages/parser/availability/HotelClosedAndOpensMessageParser.ts index af3ffa9f..d761d239 100644 --- a/src/nitro/communication/messages/parser/availability/HotelClosedAndOpensMessageParser.ts +++ b/src/nitro/communication/messages/parser/availability/HotelClosedAndOpensMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class HotelClosedAndOpensMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class HotelClosedAndOpensMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._openHour = wrapper.readInt(); this._openMinute = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/availability/HotelClosesAndWillOpenAtMessageParser.ts b/src/nitro/communication/messages/parser/availability/HotelClosesAndWillOpenAtMessageParser.ts index 7013e448..3c47665d 100644 --- a/src/nitro/communication/messages/parser/availability/HotelClosesAndWillOpenAtMessageParser.ts +++ b/src/nitro/communication/messages/parser/availability/HotelClosesAndWillOpenAtMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class HotelClosesAndWillOpenAtMessageParser implements IMessageParser { @@ -17,7 +17,7 @@ export class HotelClosesAndWillOpenAtMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._openHour = wrapper.readInt(); this._openMinute = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/availability/HotelWillCloseInMinutesMessageParser.ts b/src/nitro/communication/messages/parser/availability/HotelWillCloseInMinutesMessageParser.ts index 25b084a0..623414cc 100644 --- a/src/nitro/communication/messages/parser/availability/HotelWillCloseInMinutesMessageParser.ts +++ b/src/nitro/communication/messages/parser/availability/HotelWillCloseInMinutesMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class HotelWillCloseInMinutesMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class HotelWillCloseInMinutesMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._minutes = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/availability/MaintenanceStatusMessageParser.ts b/src/nitro/communication/messages/parser/availability/MaintenanceStatusMessageParser.ts index cb0328a5..98784368 100644 --- a/src/nitro/communication/messages/parser/availability/MaintenanceStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/availability/MaintenanceStatusMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MaintenanceStatusMessageParser implements IMessageParser { @@ -17,12 +17,12 @@ export class MaintenanceStatusMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._isInMaintenance = wrapper.readBoolean(); this._minutesUntilMaintenance = wrapper.readInt(); - if(wrapper.bytesAvailable) + if (wrapper.bytesAvailable) { this._duration = wrapper.readInt(); } diff --git a/src/nitro/communication/messages/parser/avatar/ChangeUserNameResultMessageParser.ts b/src/nitro/communication/messages/parser/avatar/ChangeUserNameResultMessageParser.ts index c9f92cf5..e84334b4 100644 --- a/src/nitro/communication/messages/parser/avatar/ChangeUserNameResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/avatar/ChangeUserNameResultMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ChangeUserNameResultMessageParser implements IMessageParser { @@ -17,14 +17,14 @@ export class ChangeUserNameResultMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._resultCode = wrapper.readInt(); this._name = wrapper.readString(); let totalSuggestions = wrapper.readInt(); - while(totalSuggestions > 0) + while (totalSuggestions > 0) { this._nameSuggestions.push(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/avatar/CheckUserNameResultMessageParser.ts b/src/nitro/communication/messages/parser/avatar/CheckUserNameResultMessageParser.ts index f762ae78..fa200b0b 100644 --- a/src/nitro/communication/messages/parser/avatar/CheckUserNameResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/avatar/CheckUserNameResultMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CheckUserNameResultMessageParser implements IMessageParser { @@ -17,14 +17,14 @@ export class CheckUserNameResultMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._resultCode = wrapper.readInt(); this._name = wrapper.readString(); let totalSuggestions = wrapper.readInt(); - while(totalSuggestions > 0) + while (totalSuggestions > 0) { this._nameSuggestions.push(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/avatar/FigureUpdateParser.ts b/src/nitro/communication/messages/parser/avatar/FigureUpdateParser.ts index d9e64413..ae01d152 100644 --- a/src/nitro/communication/messages/parser/avatar/FigureUpdateParser.ts +++ b/src/nitro/communication/messages/parser/avatar/FigureUpdateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FigureUpdateParser implements IMessageParser { @@ -15,12 +15,12 @@ export class FigureUpdateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._figure = wrapper.readString(); this._gender = wrapper.readString(); - if(this._gender) this._gender = this._gender.toUpperCase(); + if (this._gender) this._gender = this._gender.toUpperCase(); return true; } diff --git a/src/nitro/communication/messages/parser/avatar/WardrobeMessageParser.ts b/src/nitro/communication/messages/parser/avatar/WardrobeMessageParser.ts index bf193392..6f287a98 100644 --- a/src/nitro/communication/messages/parser/avatar/WardrobeMessageParser.ts +++ b/src/nitro/communication/messages/parser/avatar/WardrobeMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { OutfitData } from '../../incoming'; export class WardrobeMessageParser implements IMessageParser @@ -16,13 +16,13 @@ export class WardrobeMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._state = wrapper.readInt(); let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._outfits.push(new OutfitData(wrapper)); diff --git a/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts b/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts index 26b1face..02f7db95 100644 --- a/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { BotData } from './BotData'; export class BotAddedToInventoryParser implements IMessageParser @@ -16,7 +16,7 @@ export class BotAddedToInventoryParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._item = new BotData(wrapper); this._openInventory = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/bots/BotData.ts b/src/nitro/communication/messages/parser/bots/BotData.ts index e1f48580..5e519551 100644 --- a/src/nitro/communication/messages/parser/bots/BotData.ts +++ b/src/nitro/communication/messages/parser/bots/BotData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class BotData { @@ -10,7 +10,7 @@ export class BotData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_parser'); + if (!wrapper) throw new Error('invalid_parser'); this._id = wrapper.readInt(); this._name = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/bots/BotInventoryMessageParser.ts b/src/nitro/communication/messages/parser/bots/BotInventoryMessageParser.ts index 7bc3a112..4f9c9e18 100644 --- a/src/nitro/communication/messages/parser/bots/BotInventoryMessageParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotInventoryMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { BotData } from './BotData'; export class BotInventoryMessageParser implements IMessageParser @@ -18,7 +18,7 @@ export class BotInventoryMessageParser implements IMessageParser let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { const data = new BotData(wrapper); diff --git a/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts b/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts index 45690f7b..55b1997f 100644 --- a/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { BotData } from './BotData'; export class BotReceivedMessageParser implements IMessageParser @@ -16,7 +16,7 @@ export class BotReceivedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._boughtAsGift = wrapper.readBoolean(); this._item = new BotData(wrapper); diff --git a/src/nitro/communication/messages/parser/bots/BotRemovedFromInventoryParser.ts b/src/nitro/communication/messages/parser/bots/BotRemovedFromInventoryParser.ts index 29f31e01..fcb10797 100644 --- a/src/nitro/communication/messages/parser/bots/BotRemovedFromInventoryParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotRemovedFromInventoryParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class BotRemovedFromInventoryParser implements IMessageParser { @@ -13,7 +13,7 @@ export class BotRemovedFromInventoryParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/callforhelp/CfhSanctionMessageParser.ts b/src/nitro/communication/messages/parser/callforhelp/CfhSanctionMessageParser.ts index d5fcddad..b7fec6ce 100644 --- a/src/nitro/communication/messages/parser/callforhelp/CfhSanctionMessageParser.ts +++ b/src/nitro/communication/messages/parser/callforhelp/CfhSanctionMessageParser.ts @@ -1,6 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CfhSanctionTypeData } from '../../incoming/callforhelp'; -import { IMessageParser } from './../../../../../core'; export class CfhSanctionMessageParser implements IMessageParser { @@ -19,7 +18,7 @@ export class CfhSanctionMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._issueId = wrapper.readInt(); this._accountId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/callforhelp/CfhTopicsInitMessageParser.ts b/src/nitro/communication/messages/parser/callforhelp/CfhTopicsInitMessageParser.ts index 87884dbc..e6e165ee 100644 --- a/src/nitro/communication/messages/parser/callforhelp/CfhTopicsInitMessageParser.ts +++ b/src/nitro/communication/messages/parser/callforhelp/CfhTopicsInitMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { CallForHelpCategoryData } from '../../incoming/callforhelp/CallForHelpCategoryData'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class CfhTopicsInitMessageParser implements IMessageParser { @@ -15,13 +15,13 @@ export class CfhTopicsInitMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._callForHelpCategories = []; let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._callForHelpCategories.push(new CallForHelpCategoryData(wrapper)); diff --git a/src/nitro/communication/messages/parser/callforhelp/SanctionStatusMessageParser.ts b/src/nitro/communication/messages/parser/callforhelp/SanctionStatusMessageParser.ts index 65eb6cd4..d25c3ed7 100644 --- a/src/nitro/communication/messages/parser/callforhelp/SanctionStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/callforhelp/SanctionStatusMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class SanctionStatusMessageParser implements IMessageParser { @@ -34,7 +34,7 @@ export class SanctionStatusMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._isSanctionNew = wrapper.readBoolean(); this._isSanctionActive = wrapper.readBoolean(); @@ -53,7 +53,7 @@ export class SanctionStatusMessageParser implements IMessageParser this._hasCustomMute = wrapper.readBoolean(); - if(wrapper.bytesAvailable) this._tradeLockExpiryTime = wrapper.readString(); + if (wrapper.bytesAvailable) this._tradeLockExpiryTime = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/camera/CameraPublishStatusMessageParser.ts b/src/nitro/communication/messages/parser/camera/CameraPublishStatusMessageParser.ts index c23ee0f1..5b89f4fb 100644 --- a/src/nitro/communication/messages/parser/camera/CameraPublishStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/camera/CameraPublishStatusMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class CameraPublishStatusMessageParser implements IMessageParser { @@ -18,12 +18,12 @@ export class CameraPublishStatusMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._ok = wrapper.readBoolean(); this._secondsToWait = wrapper.readInt(); - if(this._ok && wrapper.bytesAvailable) this._extraDataId = wrapper.readString(); + if (this._ok && wrapper.bytesAvailable) this._extraDataId = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/camera/CameraPurchaseOKMessageParser.ts b/src/nitro/communication/messages/parser/camera/CameraPurchaseOKMessageParser.ts index fc7c0658..c189cfb8 100644 --- a/src/nitro/communication/messages/parser/camera/CameraPurchaseOKMessageParser.ts +++ b/src/nitro/communication/messages/parser/camera/CameraPurchaseOKMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class CameraPurchaseOKMessageParser implements IMessageParser { @@ -10,7 +10,7 @@ export class CameraPurchaseOKMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/camera/CameraStorageUrlMessageParser.ts b/src/nitro/communication/messages/parser/camera/CameraStorageUrlMessageParser.ts index dd32d742..e66aa413 100644 --- a/src/nitro/communication/messages/parser/camera/CameraStorageUrlMessageParser.ts +++ b/src/nitro/communication/messages/parser/camera/CameraStorageUrlMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class CameraStorageUrlMessageParser implements IMessageParser { @@ -14,7 +14,7 @@ export class CameraStorageUrlMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._url = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/camera/CompetitionStatusMessageParser.ts b/src/nitro/communication/messages/parser/camera/CompetitionStatusMessageParser.ts index 40202c8c..8039cf6f 100644 --- a/src/nitro/communication/messages/parser/camera/CompetitionStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/camera/CompetitionStatusMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class CompetitionStatusMessageParser implements IMessageParser { @@ -16,7 +16,7 @@ export class CompetitionStatusMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._ok = wrapper.readBoolean(); this._errorReason = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/camera/InitCameraMessageParser.ts b/src/nitro/communication/messages/parser/camera/InitCameraMessageParser.ts index 523c76d7..4e3bf31e 100644 --- a/src/nitro/communication/messages/parser/camera/InitCameraMessageParser.ts +++ b/src/nitro/communication/messages/parser/camera/InitCameraMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class InitCameraMessageParser implements IMessageParser { @@ -18,12 +18,12 @@ export class InitCameraMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._creditPrice = wrapper.readInt(); this._ducketPrice = wrapper.readInt(); - if(wrapper.bytesAvailable) this._publishDucketPrice = wrapper.readInt(); + if (wrapper.bytesAvailable) this._publishDucketPrice = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/camera/ThumbnailStatusMessageParser.ts b/src/nitro/communication/messages/parser/camera/ThumbnailStatusMessageParser.ts index ac628b3d..0f61955b 100644 --- a/src/nitro/communication/messages/parser/camera/ThumbnailStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/camera/ThumbnailStatusMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class ThumbnailStatusMessageParser implements IMessageParser { @@ -15,9 +15,9 @@ export class ThumbnailStatusMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; - if(wrapper.bytesAvailable) + if (wrapper.bytesAvailable) { this._ok = wrapper.readBoolean(); this._renderLimitHit = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/campaign/CampaignCalendarData.ts b/src/nitro/communication/messages/parser/campaign/CampaignCalendarData.ts index 3cf16476..cc93af23 100644 --- a/src/nitro/communication/messages/parser/campaign/CampaignCalendarData.ts +++ b/src/nitro/communication/messages/parser/campaign/CampaignCalendarData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class CampaignCalendarData { @@ -11,7 +11,7 @@ export class CampaignCalendarData public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._campaignName = wrapper.readString(); this._campaignImage = wrapper.readString(); @@ -21,7 +21,7 @@ export class CampaignCalendarData let count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._openedDays.push(wrapper.readInt()); } @@ -30,7 +30,7 @@ export class CampaignCalendarData count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._missedDays.push(wrapper.readInt()); } diff --git a/src/nitro/communication/messages/parser/campaign/CampaignCalendarDataMessageParser.ts b/src/nitro/communication/messages/parser/campaign/CampaignCalendarDataMessageParser.ts index a590bc2d..5a775e9a 100644 --- a/src/nitro/communication/messages/parser/campaign/CampaignCalendarDataMessageParser.ts +++ b/src/nitro/communication/messages/parser/campaign/CampaignCalendarDataMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; import { CampaignCalendarData } from './CampaignCalendarData'; export class CampaignCalendarDataMessageParser implements IMessageParser @@ -15,7 +15,7 @@ export class CampaignCalendarDataMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._calendarData = new CampaignCalendarData(); this._calendarData.parse(wrapper); diff --git a/src/nitro/communication/messages/parser/campaign/CampaignCalendarDoorOpenedMessageParser.ts b/src/nitro/communication/messages/parser/campaign/CampaignCalendarDoorOpenedMessageParser.ts index 0e9ff0d0..e4964544 100644 --- a/src/nitro/communication/messages/parser/campaign/CampaignCalendarDoorOpenedMessageParser.ts +++ b/src/nitro/communication/messages/parser/campaign/CampaignCalendarDoorOpenedMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class CampaignCalendarDoorOpenedMessageParser implements IMessageParser { @@ -20,7 +20,7 @@ export class CampaignCalendarDoorOpenedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._doorOpened = wrapper.readBoolean(); this._productName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/catalog/BonusRareInfoMessageParser.ts b/src/nitro/communication/messages/parser/catalog/BonusRareInfoMessageParser.ts index ac43cfa2..689b9299 100644 --- a/src/nitro/communication/messages/parser/catalog/BonusRareInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/BonusRareInfoMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class BonusRareInfoMessageParser implements IMessageParser { @@ -19,7 +19,7 @@ export class BonusRareInfoMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._productType = wrapper.readString(); this._productClassId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/catalog/BuildersClubFurniCountMessageParser.ts b/src/nitro/communication/messages/parser/catalog/BuildersClubFurniCountMessageParser.ts index a3a0f7a7..18fc6440 100644 --- a/src/nitro/communication/messages/parser/catalog/BuildersClubFurniCountMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/BuildersClubFurniCountMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class BuildersClubFurniCountMessageParser implements IMessageParser { @@ -14,7 +14,7 @@ export class BuildersClubFurniCountMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._furniCount = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/catalog/BuildersClubSubscriptionStatusMessageParser.ts b/src/nitro/communication/messages/parser/catalog/BuildersClubSubscriptionStatusMessageParser.ts index 95a781e6..cd2182a3 100644 --- a/src/nitro/communication/messages/parser/catalog/BuildersClubSubscriptionStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/BuildersClubSubscriptionStatusMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class BuildersClubSubscriptionStatusMessageParser implements IMessageParser { @@ -20,13 +20,13 @@ export class BuildersClubSubscriptionStatusMessageParser implements IMessagePars public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._Str_16456 = wrapper.readInt(); this._Str_12494 = wrapper.readInt(); this._Str_19123 = wrapper.readInt(); - if(wrapper.bytesAvailable) this._Str_17298 = wrapper.readInt(); + if (wrapper.bytesAvailable) this._Str_17298 = wrapper.readInt(); else this._Str_17298 = this._Str_16456; return true; diff --git a/src/nitro/communication/messages/parser/catalog/BundleDiscountRulesetMessageParser.ts b/src/nitro/communication/messages/parser/catalog/BundleDiscountRulesetMessageParser.ts index 9816e6d9..64091212 100644 --- a/src/nitro/communication/messages/parser/catalog/BundleDiscountRulesetMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/BundleDiscountRulesetMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { BundleDiscountRuleset } from '../../incoming'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class BundleDiscountRulesetMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class BundleDiscountRulesetMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._bundleDiscountRuleset = new BundleDiscountRuleset(wrapper); diff --git a/src/nitro/communication/messages/parser/catalog/CatalogIndexMessageParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogIndexMessageParser.ts index f955f9f5..6aca7fb6 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogIndexMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogIndexMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { NodeData } from '../../incoming/catalog/NodeData'; export class CatalogIndexMessageParser implements IMessageParser @@ -16,7 +16,7 @@ export class CatalogIndexMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._root = new NodeData(wrapper); this._newAdditionsAvailable = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/catalog/CatalogPageExpirationParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogPageExpirationParser.ts index 5f1e0970..3144d267 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogPageExpirationParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogPageExpirationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CatalogPageExpirationParser implements IMessageParser { @@ -19,7 +19,7 @@ export class CatalogPageExpirationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._pageId = wrapper.readInt(); this._pageName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/catalog/CatalogPageMessageParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogPageMessageParser.ts index 05d0afe3..95802a25 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogPageMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogPageMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CatalogLocalizationData } from '../../incoming/catalog/CatalogLocalizationData'; import { CatalogPageMessageOfferData } from '../../incoming/catalog/CatalogPageMessageOfferData'; import { FrontPageItem } from '../../incoming/catalog/FrontPageItem'; @@ -30,7 +30,7 @@ export class CatalogPageMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._pageId = wrapper.readInt(); this._catalogType = wrapper.readString(); @@ -39,7 +39,7 @@ export class CatalogPageMessageParser implements IMessageParser let totalOffers = wrapper.readInt(); - while(totalOffers > 0) + while (totalOffers > 0) { this._offers.push(new CatalogPageMessageOfferData(wrapper)); @@ -49,11 +49,11 @@ export class CatalogPageMessageParser implements IMessageParser this._offerId = wrapper.readInt(); this._acceptSeasonCurrencyAsCredits = wrapper.readBoolean(); - if(wrapper.bytesAvailable) + if (wrapper.bytesAvailable) { let totalFrontPageItems = wrapper.readInt(); - while(totalFrontPageItems > 0) + while (totalFrontPageItems > 0) { this._frontPageItems.push(new FrontPageItem(wrapper)); diff --git a/src/nitro/communication/messages/parser/catalog/CatalogPageWithEarliestExpiryMessageParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogPageWithEarliestExpiryMessageParser.ts index d0f2d9a7..bdd8b597 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogPageWithEarliestExpiryMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogPageWithEarliestExpiryMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CatalogPageWithEarliestExpiryMessageParser implements IMessageParser { @@ -17,7 +17,7 @@ export class CatalogPageWithEarliestExpiryMessageParser implements IMessageParse public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._pageName = wrapper.readString(); this._Str_5158 = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/catalog/CatalogPublishedMessageParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogPublishedMessageParser.ts index 20200038..a17a8234 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogPublishedMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogPublishedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CatalogPublishedMessageParser implements IMessageParser { @@ -15,11 +15,11 @@ export class CatalogPublishedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._instantlyRefreshCatalogue = wrapper.readBoolean(); - if(wrapper.bytesAvailable) this._newFurniDataHash = wrapper.readString(); + if (wrapper.bytesAvailable) this._newFurniDataHash = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/catalog/ClubGiftInfoParser.ts b/src/nitro/communication/messages/parser/catalog/ClubGiftInfoParser.ts index bd700f20..aff67226 100644 --- a/src/nitro/communication/messages/parser/catalog/ClubGiftInfoParser.ts +++ b/src/nitro/communication/messages/parser/catalog/ClubGiftInfoParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CatalogPageMessageOfferData } from '../../incoming/catalog/CatalogPageMessageOfferData'; import { ClubGiftData } from '../../incoming/catalog/ClubGiftData'; @@ -7,7 +7,7 @@ export class ClubGiftInfoParser implements IMessageParser private _daysUntilNextGift: number; private _giftsAvailable: number; private _offers: CatalogPageMessageOfferData[]; - private _giftData:Map; + private _giftData: Map; public flush(): boolean { @@ -17,7 +17,7 @@ export class ClubGiftInfoParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._offers = []; this._giftData = new Map(); @@ -26,14 +26,14 @@ export class ClubGiftInfoParser implements IMessageParser const offerCount = wrapper.readInt(); - for(let i = 0; i < offerCount; i ++) + for (let i = 0; i < offerCount; i++) { this._offers.push(new CatalogPageMessageOfferData(wrapper)); } const giftDataCount = wrapper.readInt(); - for(let i = 0; i < giftDataCount; i++) + for (let i = 0; i < giftDataCount; i++) { const item = new ClubGiftData(wrapper); this._giftData.set(item.offerId, item); @@ -64,13 +64,13 @@ export class ClubGiftInfoParser implements IMessageParser public getOfferExtraData(offerId: number): ClubGiftData { - if(!offerId) return null; + if (!offerId) return null; return this._giftData.get(offerId); } - public get giftData():Map + public get giftData(): Map { return this._giftData; } diff --git a/src/nitro/communication/messages/parser/catalog/ClubGiftSelectedParser.ts b/src/nitro/communication/messages/parser/catalog/ClubGiftSelectedParser.ts index 0e684e4f..6f07b627 100644 --- a/src/nitro/communication/messages/parser/catalog/ClubGiftSelectedParser.ts +++ b/src/nitro/communication/messages/parser/catalog/ClubGiftSelectedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CatalogPageMessageProductData } from '../../incoming'; export class ClubGiftSelectedParser implements IMessageParser @@ -16,13 +16,13 @@ export class ClubGiftSelectedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._productCode = wrapper.readString(); let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._products.push(new CatalogPageMessageProductData(wrapper)); diff --git a/src/nitro/communication/messages/parser/catalog/DirectSMSClubBuyAvailableMessageParser.ts b/src/nitro/communication/messages/parser/catalog/DirectSMSClubBuyAvailableMessageParser.ts index 7749b219..963e7bcc 100644 --- a/src/nitro/communication/messages/parser/catalog/DirectSMSClubBuyAvailableMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/DirectSMSClubBuyAvailableMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class DirectSMSClubBuyAvailableMessageParser implements IMessageParser { @@ -19,11 +19,11 @@ export class DirectSMSClubBuyAvailableMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._Str_16515 = wrapper.readString(); - if(this._Str_16515 !== '') this._available = true; + if (this._Str_16515 !== '') this._available = true; this._Str_22121 = wrapper.readString(); this._Str_21897 = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/catalog/GiftReceiverNotFoundParser.ts b/src/nitro/communication/messages/parser/catalog/GiftReceiverNotFoundParser.ts index 6cbdc1dd..63ad5d1f 100644 --- a/src/nitro/communication/messages/parser/catalog/GiftReceiverNotFoundParser.ts +++ b/src/nitro/communication/messages/parser/catalog/GiftReceiverNotFoundParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GiftReceiverNotFoundParser implements IMessageParser { @@ -11,7 +11,7 @@ export class GiftReceiverNotFoundParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/catalog/GiftWrappingConfigurationParser.ts b/src/nitro/communication/messages/parser/catalog/GiftWrappingConfigurationParser.ts index 8b542dde..1758dd97 100644 --- a/src/nitro/communication/messages/parser/catalog/GiftWrappingConfigurationParser.ts +++ b/src/nitro/communication/messages/parser/catalog/GiftWrappingConfigurationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GiftWrappingConfigurationParser implements IMessageParser { @@ -22,7 +22,7 @@ export class GiftWrappingConfigurationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const giftWrappers = []; const boxTypes = []; @@ -36,7 +36,7 @@ export class GiftWrappingConfigurationParser implements IMessageParser let _local_3 = wrapper.readInt(); let i = 0; - while(i < _local_3) + while (i < _local_3) { giftWrappers.push(wrapper.readInt()); i++; @@ -44,7 +44,7 @@ export class GiftWrappingConfigurationParser implements IMessageParser _local_3 = wrapper.readInt(); i = 0; - while(i < _local_3) + while (i < _local_3) { boxTypes.push(wrapper.readInt()); i++; @@ -52,7 +52,7 @@ export class GiftWrappingConfigurationParser implements IMessageParser _local_3 = wrapper.readInt(); i = 0; - while(i < _local_3) + while (i < _local_3) { ribbonTypes.push(wrapper.readInt()); i++; @@ -60,7 +60,7 @@ export class GiftWrappingConfigurationParser implements IMessageParser _local_3 = wrapper.readInt(); i = 0; - while(i < _local_3) + while (i < _local_3) { giftFurnis.push(wrapper.readInt()); i++; diff --git a/src/nitro/communication/messages/parser/catalog/HabboClubExtendOfferMessageParser.ts b/src/nitro/communication/messages/parser/catalog/HabboClubExtendOfferMessageParser.ts index 03fa8c33..d3710b30 100644 --- a/src/nitro/communication/messages/parser/catalog/HabboClubExtendOfferMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/HabboClubExtendOfferMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { ClubOfferExtendedData } from '../../incoming/catalog/ClubOfferExtendedData'; export class HabboClubExtendOfferMessageParser implements IMessageParser @@ -14,7 +14,7 @@ export class HabboClubExtendOfferMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._offer = new ClubOfferExtendedData(wrapper); diff --git a/src/nitro/communication/messages/parser/catalog/HabboClubOffersMessageParser.ts b/src/nitro/communication/messages/parser/catalog/HabboClubOffersMessageParser.ts index df5efda2..fdeac900 100644 --- a/src/nitro/communication/messages/parser/catalog/HabboClubOffersMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/HabboClubOffersMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { ClubOfferData } from '../../incoming/catalog/ClubOfferData'; export class HabboClubOffersMessageParser implements IMessageParser @@ -14,11 +14,11 @@ export class HabboClubOffersMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalOffers = wrapper.readInt(); - while(totalOffers > 0) + while (totalOffers > 0) { this._offers.push(new ClubOfferData(wrapper)); diff --git a/src/nitro/communication/messages/parser/catalog/IsOfferGiftableMessageParser.ts b/src/nitro/communication/messages/parser/catalog/IsOfferGiftableMessageParser.ts index 68a90510..714086c6 100644 --- a/src/nitro/communication/messages/parser/catalog/IsOfferGiftableMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/IsOfferGiftableMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class IsOfferGiftableMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class IsOfferGiftableMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._offerId = wrapper.readInt(); this._Str_21271 = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/catalog/LimitedEditionSoldOutParser.ts b/src/nitro/communication/messages/parser/catalog/LimitedEditionSoldOutParser.ts index 42339760..b865f528 100644 --- a/src/nitro/communication/messages/parser/catalog/LimitedEditionSoldOutParser.ts +++ b/src/nitro/communication/messages/parser/catalog/LimitedEditionSoldOutParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class LimitedEditionSoldOutParser implements IMessageParser { @@ -9,7 +9,7 @@ export class LimitedEditionSoldOutParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/catalog/LimitedOfferAppearingNextMessageParser.ts b/src/nitro/communication/messages/parser/catalog/LimitedOfferAppearingNextMessageParser.ts index 47fbf0b4..030e6b64 100644 --- a/src/nitro/communication/messages/parser/catalog/LimitedOfferAppearingNextMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/LimitedOfferAppearingNextMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class LimitedOfferAppearingNextMessageParser implements IMessageParser { @@ -19,7 +19,7 @@ export class LimitedOfferAppearingNextMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._Str_6800 = wrapper.readInt(); this._pageId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/catalog/NotEnoughBalanceMessageParser.ts b/src/nitro/communication/messages/parser/catalog/NotEnoughBalanceMessageParser.ts index af9764ad..5e2d1a54 100644 --- a/src/nitro/communication/messages/parser/catalog/NotEnoughBalanceMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/NotEnoughBalanceMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NotEnoughBalanceMessageParser implements IMessageParser { @@ -17,12 +17,12 @@ export class NotEnoughBalanceMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._Str_17433 = wrapper.readBoolean(); this._Str_19031 = wrapper.readBoolean(); - if(wrapper.bytesAvailable) this._activityPointType = wrapper.readInt(); + if (wrapper.bytesAvailable) this._activityPointType = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/catalog/ProductOfferMessageParser.ts b/src/nitro/communication/messages/parser/catalog/ProductOfferMessageParser.ts index d7bb9719..a5948bcc 100644 --- a/src/nitro/communication/messages/parser/catalog/ProductOfferMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/ProductOfferMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CatalogPageMessageOfferData } from '../../incoming/catalog/CatalogPageMessageOfferData'; export class ProductOfferMessageParser implements IMessageParser @@ -14,7 +14,7 @@ export class ProductOfferMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._offer = new CatalogPageMessageOfferData(wrapper); diff --git a/src/nitro/communication/messages/parser/catalog/PurchaseErrorMessageParser.ts b/src/nitro/communication/messages/parser/catalog/PurchaseErrorMessageParser.ts index 498e2c7b..a4812523 100644 --- a/src/nitro/communication/messages/parser/catalog/PurchaseErrorMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/PurchaseErrorMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class PurchaseErrorMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class PurchaseErrorMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._code = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/catalog/PurchaseNotAllowedMessageParser.ts b/src/nitro/communication/messages/parser/catalog/PurchaseNotAllowedMessageParser.ts index ee076b8f..671a87f9 100644 --- a/src/nitro/communication/messages/parser/catalog/PurchaseNotAllowedMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/PurchaseNotAllowedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class PurchaseNotAllowedMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class PurchaseNotAllowedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._code = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/catalog/PurchaseOKMessageParser.ts b/src/nitro/communication/messages/parser/catalog/PurchaseOKMessageParser.ts index 2455cfbe..8076dddf 100644 --- a/src/nitro/communication/messages/parser/catalog/PurchaseOKMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/PurchaseOKMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { PurchaseOKMessageOfferData } from '../../incoming/catalog/PurchaseOKMessageOfferData'; export class PurchaseOKMessageParser implements IMessageParser @@ -14,7 +14,7 @@ export class PurchaseOKMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._offer = new PurchaseOKMessageOfferData(wrapper); diff --git a/src/nitro/communication/messages/parser/catalog/RoomAdPurchaseInfoEventParser.ts b/src/nitro/communication/messages/parser/catalog/RoomAdPurchaseInfoEventParser.ts index 5815520d..326ce09b 100644 --- a/src/nitro/communication/messages/parser/catalog/RoomAdPurchaseInfoEventParser.ts +++ b/src/nitro/communication/messages/parser/catalog/RoomAdPurchaseInfoEventParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { RoomEntryData } from '../user'; export class RoomAdPurchaseInfoEventParser implements IMessageParser @@ -16,13 +16,13 @@ export class RoomAdPurchaseInfoEventParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._isVip = wrapper.readBoolean(); let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._rooms.push(new RoomEntryData(wrapper.readInt(), wrapper.readString(), wrapper.readBoolean())); diff --git a/src/nitro/communication/messages/parser/catalog/SeasonalCalendarDailyOfferMessageParser.ts b/src/nitro/communication/messages/parser/catalog/SeasonalCalendarDailyOfferMessageParser.ts index a374d9fb..fe4951ef 100644 --- a/src/nitro/communication/messages/parser/catalog/SeasonalCalendarDailyOfferMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/SeasonalCalendarDailyOfferMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CatalogPageMessageOfferData } from '../../incoming'; export class SeasonalCalendarDailyOfferMessageParser implements IMessageParser @@ -16,7 +16,7 @@ export class SeasonalCalendarDailyOfferMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._pageId = wrapper.readInt(); this._data = new CatalogPageMessageOfferData(wrapper); diff --git a/src/nitro/communication/messages/parser/catalog/SellablePetPaletteData.ts b/src/nitro/communication/messages/parser/catalog/SellablePetPaletteData.ts index 90c4ebf2..f0c59e0f 100644 --- a/src/nitro/communication/messages/parser/catalog/SellablePetPaletteData.ts +++ b/src/nitro/communication/messages/parser/catalog/SellablePetPaletteData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class SellablePetPaletteData { @@ -10,7 +10,7 @@ export class SellablePetPaletteData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -29,7 +29,7 @@ export class SellablePetPaletteData public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._type = wrapper.readInt(); this._breedId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/catalog/SellablePetPalettesParser.ts b/src/nitro/communication/messages/parser/catalog/SellablePetPalettesParser.ts index 2d570d1a..1a9393f3 100644 --- a/src/nitro/communication/messages/parser/catalog/SellablePetPalettesParser.ts +++ b/src/nitro/communication/messages/parser/catalog/SellablePetPalettesParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { SellablePetPaletteData } from './SellablePetPaletteData'; export class SellablePetPalettesParser implements IMessageParser @@ -16,13 +16,13 @@ export class SellablePetPalettesParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._productCode = wrapper.readString(); let totalPalettes = wrapper.readInt(); - while(totalPalettes > 0) + while (totalPalettes > 0) { this._palettes.push(new SellablePetPaletteData(wrapper)); diff --git a/src/nitro/communication/messages/parser/catalog/TargetedOfferNotFoundParser.ts b/src/nitro/communication/messages/parser/catalog/TargetedOfferNotFoundParser.ts index 32a943bc..a4bcb3f4 100644 --- a/src/nitro/communication/messages/parser/catalog/TargetedOfferNotFoundParser.ts +++ b/src/nitro/communication/messages/parser/catalog/TargetedOfferNotFoundParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class TargetedOfferNotFoundParser implements IMessageParser { @@ -9,7 +9,7 @@ export class TargetedOfferNotFoundParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/catalog/TargetedOfferParser.ts b/src/nitro/communication/messages/parser/catalog/TargetedOfferParser.ts index ed73822a..ec756b4a 100644 --- a/src/nitro/communication/messages/parser/catalog/TargetedOfferParser.ts +++ b/src/nitro/communication/messages/parser/catalog/TargetedOfferParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { TargetedOfferData } from '../../incoming/catalog/TargetedOfferData'; export class TargetedOfferParser implements IMessageParser @@ -14,7 +14,7 @@ export class TargetedOfferParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new TargetedOfferData(wrapper); diff --git a/src/nitro/communication/messages/parser/catalog/VoucherRedeemErrorMessageParser.ts b/src/nitro/communication/messages/parser/catalog/VoucherRedeemErrorMessageParser.ts index 39c32e52..b66dc707 100644 --- a/src/nitro/communication/messages/parser/catalog/VoucherRedeemErrorMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/VoucherRedeemErrorMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class VoucherRedeemErrorMessageParser implements IMessageParser { @@ -12,7 +12,7 @@ export class VoucherRedeemErrorMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._errorCode = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/catalog/VoucherRedeemOkMessageParser.ts b/src/nitro/communication/messages/parser/catalog/VoucherRedeemOkMessageParser.ts index bdf52080..25216d1f 100644 --- a/src/nitro/communication/messages/parser/catalog/VoucherRedeemOkMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/VoucherRedeemOkMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class VoucherRedeemOkMessageParser implements IMessageParser { @@ -14,7 +14,7 @@ export class VoucherRedeemOkMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._productDescription = wrapper.readString(); this._productName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/client/ClientPingParser.ts b/src/nitro/communication/messages/parser/client/ClientPingParser.ts index f8920c7c..758445ad 100644 --- a/src/nitro/communication/messages/parser/client/ClientPingParser.ts +++ b/src/nitro/communication/messages/parser/client/ClientPingParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ClientPingParser implements IMessageParser { @@ -9,7 +9,7 @@ export class ClientPingParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/competition/CompetitionEntrySubmitResultMessageParser.ts b/src/nitro/communication/messages/parser/competition/CompetitionEntrySubmitResultMessageParser.ts index b050ff8f..146103ed 100644 --- a/src/nitro/communication/messages/parser/competition/CompetitionEntrySubmitResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/competition/CompetitionEntrySubmitResultMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CompetitionEntrySubmitResultMessageParser implements IMessageParser { @@ -36,7 +36,7 @@ export class CompetitionEntrySubmitResultMessageParser implements IMessageParser let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._requiredFurnis.push(wrapper.readString()); @@ -46,7 +46,7 @@ export class CompetitionEntrySubmitResultMessageParser implements IMessageParser count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._missingFurnis[wrapper.readString()] = ''; diff --git a/src/nitro/communication/messages/parser/competition/CompetitionVotingInfoMessageParser.ts b/src/nitro/communication/messages/parser/competition/CompetitionVotingInfoMessageParser.ts index 0b4f710f..56aaa4a9 100644 --- a/src/nitro/communication/messages/parser/competition/CompetitionVotingInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/competition/CompetitionVotingInfoMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CompetitionVotingInfoResult } from './CompetitionVotingInfoResult'; export class CompetitionVotingInfoMessageParser implements IMessageParser diff --git a/src/nitro/communication/messages/parser/competition/CurrentTimingCodeMessageParser.ts b/src/nitro/communication/messages/parser/competition/CurrentTimingCodeMessageParser.ts index 67dcbc48..1ff30079 100644 --- a/src/nitro/communication/messages/parser/competition/CurrentTimingCodeMessageParser.ts +++ b/src/nitro/communication/messages/parser/competition/CurrentTimingCodeMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CurrentTimingCodeMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/competition/IsUserPartOfCompetitionMessageParser.ts b/src/nitro/communication/messages/parser/competition/IsUserPartOfCompetitionMessageParser.ts index 306082d0..bdaa14a5 100644 --- a/src/nitro/communication/messages/parser/competition/IsUserPartOfCompetitionMessageParser.ts +++ b/src/nitro/communication/messages/parser/competition/IsUserPartOfCompetitionMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class IsUserPartOfCompetitionMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/competition/NoOwnedRoomsAlertMessageParser.ts b/src/nitro/communication/messages/parser/competition/NoOwnedRoomsAlertMessageParser.ts index 317a6367..db00fec8 100644 --- a/src/nitro/communication/messages/parser/competition/NoOwnedRoomsAlertMessageParser.ts +++ b/src/nitro/communication/messages/parser/competition/NoOwnedRoomsAlertMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NoOwnedRoomsAlertMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/competition/SecondsUntilMessageParser.ts b/src/nitro/communication/messages/parser/competition/SecondsUntilMessageParser.ts index ffaec3cd..3ca85985 100644 --- a/src/nitro/communication/messages/parser/competition/SecondsUntilMessageParser.ts +++ b/src/nitro/communication/messages/parser/competition/SecondsUntilMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class SecondsUntilMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/crafting/CraftableProductsMessageParser.ts b/src/nitro/communication/messages/parser/crafting/CraftableProductsMessageParser.ts index 754208b9..c021329f 100644 --- a/src/nitro/communication/messages/parser/crafting/CraftableProductsMessageParser.ts +++ b/src/nitro/communication/messages/parser/crafting/CraftableProductsMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; import { CraftingResultObjectParser } from './CraftingResultObjectParser'; export class CraftableProductsMessageParser implements IMessageParser @@ -22,14 +22,14 @@ export class CraftableProductsMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const craftingResultCount = wrapper.readInt(); - for(let i = 0; i < craftingResultCount; i++) + for (let i = 0; i < craftingResultCount; i++) { this._recipes.push(new CraftingResultObjectParser(wrapper)); } const ingredientCount = wrapper.readInt(); - for(let i = 0; i < ingredientCount; i++) + for (let i = 0; i < ingredientCount; i++) { this._ingredients.push(wrapper.readString()); } diff --git a/src/nitro/communication/messages/parser/crafting/CraftingRecipeIngredientParser.ts b/src/nitro/communication/messages/parser/crafting/CraftingRecipeIngredientParser.ts index 1e90ed8d..90a967c7 100644 --- a/src/nitro/communication/messages/parser/crafting/CraftingRecipeIngredientParser.ts +++ b/src/nitro/communication/messages/parser/crafting/CraftingRecipeIngredientParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class CraftingRecipeIngredientParser { diff --git a/src/nitro/communication/messages/parser/crafting/CraftingRecipeMessageParser.ts b/src/nitro/communication/messages/parser/crafting/CraftingRecipeMessageParser.ts index 6ddf3eb4..d890abce 100644 --- a/src/nitro/communication/messages/parser/crafting/CraftingRecipeMessageParser.ts +++ b/src/nitro/communication/messages/parser/crafting/CraftingRecipeMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; import { CraftingRecipeIngredientParser } from './CraftingRecipeIngredientParser'; export class CraftingRecipeMessageParser implements IMessageParser @@ -13,9 +13,9 @@ export class CraftingRecipeMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const ingredientCount = wrapper.readInt(); - for(let i = 0; i < ingredientCount; i++) + for (let i = 0; i < ingredientCount; i++) { this._ingredients.push(new CraftingRecipeIngredientParser(wrapper)); } diff --git a/src/nitro/communication/messages/parser/crafting/CraftingRecipesAvailableMessageParser.ts b/src/nitro/communication/messages/parser/crafting/CraftingRecipesAvailableMessageParser.ts index 42ae98ed..5601112d 100644 --- a/src/nitro/communication/messages/parser/crafting/CraftingRecipesAvailableMessageParser.ts +++ b/src/nitro/communication/messages/parser/crafting/CraftingRecipesAvailableMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class CraftingRecipesAvailableMessageParser implements IMessageParser { @@ -8,7 +8,7 @@ export class CraftingRecipesAvailableMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._count = wrapper.readInt(); this._hasRecipes = wrapper.readBoolean(); return true; diff --git a/src/nitro/communication/messages/parser/crafting/CraftingResultMessageParser.ts b/src/nitro/communication/messages/parser/crafting/CraftingResultMessageParser.ts index 18a5ccfa..9d53d245 100644 --- a/src/nitro/communication/messages/parser/crafting/CraftingResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/crafting/CraftingResultMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; import { CraftingResultObjectParser } from './CraftingResultObjectParser'; export class CraftingResultMessageParser implements IMessageParser @@ -7,11 +7,11 @@ export class CraftingResultMessageParser implements IMessageParser private _success: boolean; private _result: CraftingResultObjectParser; - public parse(wrapper:IMessageDataWrapper): boolean + public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._success = wrapper.readBoolean(); - if(this._success) + if (this._success) { this._result = new CraftingResultObjectParser(wrapper); } @@ -29,7 +29,7 @@ export class CraftingResultMessageParser implements IMessageParser return this._success; } - public get result():CraftingResultObjectParser + public get result(): CraftingResultObjectParser { return this._result; } diff --git a/src/nitro/communication/messages/parser/crafting/CraftingResultObjectParser.ts b/src/nitro/communication/messages/parser/crafting/CraftingResultObjectParser.ts index 77c980d9..50c149cc 100644 --- a/src/nitro/communication/messages/parser/crafting/CraftingResultObjectParser.ts +++ b/src/nitro/communication/messages/parser/crafting/CraftingResultObjectParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class CraftingResultObjectParser { diff --git a/src/nitro/communication/messages/parser/desktop/DesktopViewParser.ts b/src/nitro/communication/messages/parser/desktop/DesktopViewParser.ts index d30a511d..d46f50e9 100644 --- a/src/nitro/communication/messages/parser/desktop/DesktopViewParser.ts +++ b/src/nitro/communication/messages/parser/desktop/DesktopViewParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class DesktopViewParser implements IMessageParser { @@ -9,7 +9,7 @@ export class DesktopViewParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/AcceptFriendResultParser.ts b/src/nitro/communication/messages/parser/friendlist/AcceptFriendResultParser.ts index 30763b7c..fd8ce60c 100644 --- a/src/nitro/communication/messages/parser/friendlist/AcceptFriendResultParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/AcceptFriendResultParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { AcceptFriendFailerData } from '../../incoming/friendlist/AcceptFriendFailureData'; export class AcceptFriendResultParser implements IMessageParser @@ -14,11 +14,11 @@ export class AcceptFriendResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalFailures = wrapper.readInt(); - while(totalFailures > 0) + while (totalFailures > 0) { this._failuers.push(new AcceptFriendFailerData(wrapper)); diff --git a/src/nitro/communication/messages/parser/friendlist/FindFriendsProcessResultParser.ts b/src/nitro/communication/messages/parser/friendlist/FindFriendsProcessResultParser.ts index 34093733..1cc6ccd8 100644 --- a/src/nitro/communication/messages/parser/friendlist/FindFriendsProcessResultParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FindFriendsProcessResultParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FindFriendsProcessResultParser implements IMessageParser { @@ -13,7 +13,7 @@ export class FindFriendsProcessResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._success = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/friendlist/FollowFriendFailedParser.ts b/src/nitro/communication/messages/parser/friendlist/FollowFriendFailedParser.ts index b6ba356b..99cc2303 100644 --- a/src/nitro/communication/messages/parser/friendlist/FollowFriendFailedParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FollowFriendFailedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FollowFriendFailedParser implements IMessageParser { @@ -13,7 +13,7 @@ export class FollowFriendFailedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._errorCode = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/friendlist/FriendListFragmentMessageParser.ts b/src/nitro/communication/messages/parser/friendlist/FriendListFragmentMessageParser.ts index 40c74615..0ae13366 100644 --- a/src/nitro/communication/messages/parser/friendlist/FriendListFragmentMessageParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FriendListFragmentMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { FriendParser } from '../../incoming/friendlist/FriendParser'; export class FriendListFragmentParser implements IMessageParser @@ -18,14 +18,14 @@ export class FriendListFragmentParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._totalFragments = wrapper.readInt(); this._fragmentNumber = wrapper.readInt(); let totalFriends = wrapper.readInt(); - while(totalFriends > 0) + while (totalFriends > 0) { this._fragment.push(new FriendParser(wrapper)); diff --git a/src/nitro/communication/messages/parser/friendlist/FriendListUpdateParser.ts b/src/nitro/communication/messages/parser/friendlist/FriendListUpdateParser.ts index db2765ca..d3cf5889 100644 --- a/src/nitro/communication/messages/parser/friendlist/FriendListUpdateParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FriendListUpdateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { FriendCategoryData } from '../../incoming/friendlist/FriendCategoryData'; import { FriendParser } from '../../incoming/friendlist/FriendParser'; @@ -21,11 +21,11 @@ export class FriendListUpdateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalCategories = wrapper.readInt(); - while(totalCategories > 0) + while (totalCategories > 0) { this._categories.push(new FriendCategoryData(wrapper)); @@ -34,21 +34,21 @@ export class FriendListUpdateParser implements IMessageParser let totalUpdates = wrapper.readInt(); - while(totalUpdates > 0) + while (totalUpdates > 0) { const type = wrapper.readInt(); - if(type === -1) + if (type === -1) { this._removedFriendIds.push(wrapper.readInt()); } - else if(type === 0) + else if (type === 0) { this._updatedFriends.push(new FriendParser(wrapper)); } - else if(type === 1) + else if (type === 1) { this._addedFriends.push(new FriendParser(wrapper)); } diff --git a/src/nitro/communication/messages/parser/friendlist/FriendNotificationParser.ts b/src/nitro/communication/messages/parser/friendlist/FriendNotificationParser.ts index 8d7bfc4c..fa5b4d20 100644 --- a/src/nitro/communication/messages/parser/friendlist/FriendNotificationParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FriendNotificationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FriendNotificationParser implements IMessageParser { @@ -17,7 +17,7 @@ export class FriendNotificationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._typeCode = wrapper.readInt(); this._avatarId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/friendlist/FriendRequestsParser.ts b/src/nitro/communication/messages/parser/friendlist/FriendRequestsParser.ts index 4fcd1b9b..c0740672 100644 --- a/src/nitro/communication/messages/parser/friendlist/FriendRequestsParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FriendRequestsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { FriendRequestData } from '../../incoming/friendlist/FriendRequestData'; export class FriendRequestsParser implements IMessageParser @@ -16,13 +16,13 @@ export class FriendRequestsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._totalRequests = wrapper.readInt(); let totalRequests = wrapper.readInt(); - while(totalRequests > 0) + while (totalRequests > 0) { this._requests.push(new FriendRequestData(wrapper)); diff --git a/src/nitro/communication/messages/parser/friendlist/HabboSearchResultParser.ts b/src/nitro/communication/messages/parser/friendlist/HabboSearchResultParser.ts index 2e16e120..4be2047a 100644 --- a/src/nitro/communication/messages/parser/friendlist/HabboSearchResultParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/HabboSearchResultParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { HabboSearchResultData } from '../../incoming/friendlist/HabboSearchResultData'; export class HabboSearchResultParser implements IMessageParser @@ -16,11 +16,11 @@ export class HabboSearchResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalFriends = wrapper.readInt(); - while(totalFriends > 0) + while (totalFriends > 0) { this._friends.push(new HabboSearchResultData(wrapper)); @@ -29,7 +29,7 @@ export class HabboSearchResultParser implements IMessageParser let totalOthers = wrapper.readInt(); - while(totalOthers > 0) + while (totalOthers > 0) { this._others.push(new HabboSearchResultData(wrapper)); diff --git a/src/nitro/communication/messages/parser/friendlist/InstantMessageErrorParser.ts b/src/nitro/communication/messages/parser/friendlist/InstantMessageErrorParser.ts index 560f3e16..988a5f13 100644 --- a/src/nitro/communication/messages/parser/friendlist/InstantMessageErrorParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/InstantMessageErrorParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class InstantMessageErrorParser implements IMessageParser { @@ -17,7 +17,7 @@ export class InstantMessageErrorParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._errorCode = wrapper.readInt(); this._userId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/friendlist/MessageErrorParser.ts b/src/nitro/communication/messages/parser/friendlist/MessageErrorParser.ts index 80967fff..89391791 100644 --- a/src/nitro/communication/messages/parser/friendlist/MessageErrorParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/MessageErrorParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MessageErrorParser implements IMessageParser { @@ -15,7 +15,7 @@ export class MessageErrorParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._clientMessageId = wrapper.readInt(); this._errorCode = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/friendlist/MessengerInitParser.ts b/src/nitro/communication/messages/parser/friendlist/MessengerInitParser.ts index ab9397ec..2164d37a 100644 --- a/src/nitro/communication/messages/parser/friendlist/MessengerInitParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/MessengerInitParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { FriendCategoryData } from '../../incoming/friendlist/FriendCategoryData'; export class MessengerInitParser implements IMessageParser @@ -19,7 +19,7 @@ export class MessengerInitParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userFriendLimit = wrapper.readInt(); this._normalFriendLimit = wrapper.readInt(); @@ -27,7 +27,7 @@ export class MessengerInitParser implements IMessageParser let totalCategories = wrapper.readInt(); - while(totalCategories > 0) + while (totalCategories > 0) { this._categories.push(new FriendCategoryData(wrapper)); diff --git a/src/nitro/communication/messages/parser/friendlist/MiniMailNewMessageParser.ts b/src/nitro/communication/messages/parser/friendlist/MiniMailNewMessageParser.ts index 02f7a095..6cc63549 100644 --- a/src/nitro/communication/messages/parser/friendlist/MiniMailNewMessageParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/MiniMailNewMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MiniMailNewMessageParser implements IMessageParser { @@ -9,7 +9,7 @@ export class MiniMailNewMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/MiniMailUnreadCountParser.ts b/src/nitro/communication/messages/parser/friendlist/MiniMailUnreadCountParser.ts index c0ab2121..1edf2a8e 100644 --- a/src/nitro/communication/messages/parser/friendlist/MiniMailUnreadCountParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/MiniMailUnreadCountParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MiniMailUnreadCountParser implements IMessageParser { @@ -13,7 +13,7 @@ export class MiniMailUnreadCountParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._count = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/friendlist/NewConsoleMessageParser.ts b/src/nitro/communication/messages/parser/friendlist/NewConsoleMessageParser.ts index 24f9c65a..feaea52d 100644 --- a/src/nitro/communication/messages/parser/friendlist/NewConsoleMessageParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/NewConsoleMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NewConsoleMessageParser implements IMessageParser { @@ -19,13 +19,13 @@ export class NewConsoleMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._senderId = wrapper.readInt(); this._messageText = wrapper.readString(); this._secondsSinceSent = wrapper.readInt(); - if(wrapper.bytesAvailable) + if (wrapper.bytesAvailable) { this._extraData = wrapper.readString(); } diff --git a/src/nitro/communication/messages/parser/friendlist/NewFriendRequestMessageParser.ts b/src/nitro/communication/messages/parser/friendlist/NewFriendRequestMessageParser.ts index 9365771e..41be856a 100644 --- a/src/nitro/communication/messages/parser/friendlist/NewFriendRequestMessageParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/NewFriendRequestMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { FriendRequestData } from '../../incoming/friendlist/FriendRequestData'; export class NewFriendRequestParser implements IMessageParser @@ -14,7 +14,7 @@ export class NewFriendRequestParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._request = new FriendRequestData(wrapper); diff --git a/src/nitro/communication/messages/parser/friendlist/RoomInviteErrorParser.ts b/src/nitro/communication/messages/parser/friendlist/RoomInviteErrorParser.ts index cf5ab38f..583be91d 100644 --- a/src/nitro/communication/messages/parser/friendlist/RoomInviteErrorParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/RoomInviteErrorParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class RoomInviteErrorParser implements IMessageParser { @@ -15,13 +15,13 @@ export class RoomInviteErrorParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._errorCode = wrapper.readInt(); let totalFailed = wrapper.readInt(); - while(totalFailed > 0) + while (totalFailed > 0) { this._failedRecipients.push(wrapper.readInt()); diff --git a/src/nitro/communication/messages/parser/friendlist/RoomInviteMessageParser.ts b/src/nitro/communication/messages/parser/friendlist/RoomInviteMessageParser.ts index 8fa9b3fc..a073050d 100644 --- a/src/nitro/communication/messages/parser/friendlist/RoomInviteMessageParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/RoomInviteMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class RoomInviteParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomInviteParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._senderId = wrapper.readInt(); this._messageText = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/game/LoadGameUrlParser.ts b/src/nitro/communication/messages/parser/game/LoadGameUrlParser.ts index cb371770..8d1ee8f3 100644 --- a/src/nitro/communication/messages/parser/game/LoadGameUrlParser.ts +++ b/src/nitro/communication/messages/parser/game/LoadGameUrlParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class LoadGameUrlParser implements IMessageParser { @@ -17,7 +17,7 @@ export class LoadGameUrlParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._gameTypeId = wrapper.readInt(); this._gameClientId = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/generic/GenericErrorParser.ts b/src/nitro/communication/messages/parser/generic/GenericErrorParser.ts index 5c6b4eb9..86fe3413 100644 --- a/src/nitro/communication/messages/parser/generic/GenericErrorParser.ts +++ b/src/nitro/communication/messages/parser/generic/GenericErrorParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GenericErrorParser implements IMessageParser { @@ -12,7 +12,7 @@ export class GenericErrorParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._errorCode = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/group/GroupBadgePartsParser.ts b/src/nitro/communication/messages/parser/group/GroupBadgePartsParser.ts index e5ce4ffe..578aba06 100644 --- a/src/nitro/communication/messages/parser/group/GroupBadgePartsParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupBadgePartsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GroupBadgePartsParser implements IMessageParser { @@ -21,11 +21,11 @@ export class GroupBadgePartsParser implements IMessageParser parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let basesCount = wrapper.readInt(); - while(basesCount > 0) + while (basesCount > 0) { const id = wrapper.readInt(); const valueA = wrapper.readString(); @@ -37,7 +37,7 @@ export class GroupBadgePartsParser implements IMessageParser let symbolsCount = wrapper.readInt(); - while(symbolsCount > 0) + while (symbolsCount > 0) { const id = wrapper.readInt(); const valueA = wrapper.readString(); @@ -49,7 +49,7 @@ export class GroupBadgePartsParser implements IMessageParser let partColorsCount = wrapper.readInt(); - while(partColorsCount > 0) + while (partColorsCount > 0) { const id = wrapper.readInt(); const color = wrapper.readString(); @@ -60,7 +60,7 @@ export class GroupBadgePartsParser implements IMessageParser let colorsACount = wrapper.readInt(); - while(colorsACount > 0) + while (colorsACount > 0) { const id = wrapper.readInt(); const color = wrapper.readString(); @@ -71,7 +71,7 @@ export class GroupBadgePartsParser implements IMessageParser let colorsBCount = wrapper.readInt(); - while(colorsBCount > 0) + while (colorsBCount > 0) { const id = wrapper.readInt(); const color = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/group/GroupBuyDataParser.ts b/src/nitro/communication/messages/parser/group/GroupBuyDataParser.ts index 74876831..5f58160c 100644 --- a/src/nitro/communication/messages/parser/group/GroupBuyDataParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupBuyDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GroupBuyDataParser implements IMessageParser { @@ -15,12 +15,12 @@ export class GroupBuyDataParser implements IMessageParser parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._groupCost = wrapper.readInt(); let availableRoomsCount = wrapper.readInt(); - while(availableRoomsCount > 0) + while (availableRoomsCount > 0) { const roomId = wrapper.readInt(); const roomName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/group/GroupConfirmMemberRemoveParser.ts b/src/nitro/communication/messages/parser/group/GroupConfirmMemberRemoveParser.ts index 61d3ca8f..2cea33af 100644 --- a/src/nitro/communication/messages/parser/group/GroupConfirmMemberRemoveParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupConfirmMemberRemoveParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GroupConfirmMemberRemoveParser implements IMessageParser { @@ -15,7 +15,7 @@ export class GroupConfirmMemberRemoveParser implements IMessageParser parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userId = wrapper.readInt(); this._furnitureCount = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/group/GroupInformationParser.ts b/src/nitro/communication/messages/parser/group/GroupInformationParser.ts index 1db278cd..de35d7e7 100644 --- a/src/nitro/communication/messages/parser/group/GroupInformationParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupInformationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GroupInformationParser implements IMessageParser { @@ -45,7 +45,7 @@ export class GroupInformationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._id = wrapper.readInt(); wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/group/GroupMembersParser.ts b/src/nitro/communication/messages/parser/group/GroupMembersParser.ts index 5a992918..26247c7d 100644 --- a/src/nitro/communication/messages/parser/group/GroupMembersParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupMembersParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { GroupMemberParser } from './utils'; export class GroupMembersParser implements IMessageParser @@ -34,7 +34,7 @@ export class GroupMembersParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._groupId = wrapper.readInt(); this._groupTitle = wrapper.readString(); @@ -44,7 +44,7 @@ export class GroupMembersParser implements IMessageParser let resultCount = wrapper.readInt(); - while(resultCount > 0) + while (resultCount > 0) { this._result.push(new GroupMemberParser(wrapper)); diff --git a/src/nitro/communication/messages/parser/group/GroupPurchasedParser.ts b/src/nitro/communication/messages/parser/group/GroupPurchasedParser.ts index e58b0caf..24fcf80f 100644 --- a/src/nitro/communication/messages/parser/group/GroupPurchasedParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupPurchasedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GroupPurchasedParser implements IMessageParser { @@ -15,7 +15,7 @@ export class GroupPurchasedParser implements IMessageParser parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._groupId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/group/GroupSettingsParser.ts b/src/nitro/communication/messages/parser/group/GroupSettingsParser.ts index 07f34d90..88087cac 100644 --- a/src/nitro/communication/messages/parser/group/GroupSettingsParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupSettingsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { GroupDataBadgePart } from './utils/GroupDataBadgePart'; export class GroupSettingsParser implements IMessageParser @@ -36,11 +36,11 @@ export class GroupSettingsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const hasRoomData = wrapper.readInt(); - if(hasRoomData === 1) + if (hasRoomData === 1) { this._roomId = wrapper.readInt(); this._roomName = wrapper.readString(); @@ -65,7 +65,7 @@ export class GroupSettingsParser implements IMessageParser const badgePartsCount = wrapper.readInt(); - for(let i = 0; i < badgePartsCount; i++) + for (let i = 0; i < badgePartsCount; i++) { const part = new GroupDataBadgePart(i === 0); @@ -73,7 +73,7 @@ export class GroupSettingsParser implements IMessageParser part.color = wrapper.readInt(); part.position = wrapper.readInt(); - if(part.key === 0) + if (part.key === 0) { part.position = 4; } diff --git a/src/nitro/communication/messages/parser/group/HabboGroupDeactivatedMessageParser.ts b/src/nitro/communication/messages/parser/group/HabboGroupDeactivatedMessageParser.ts index 6221d26d..b60f3dd8 100644 --- a/src/nitro/communication/messages/parser/group/HabboGroupDeactivatedMessageParser.ts +++ b/src/nitro/communication/messages/parser/group/HabboGroupDeactivatedMessageParser.ts @@ -1,16 +1,15 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class HabboGroupDeactivatedMessageParser implements IMessageParser { private _groupId: number; - public flush():boolean + public flush(): boolean { return true; } - public parse(wrapper: IMessageDataWrapper):boolean + public parse(wrapper: IMessageDataWrapper): boolean { this._groupId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/group/utils/GroupMemberParser.ts b/src/nitro/communication/messages/parser/group/utils/GroupMemberParser.ts index 0c12bc22..c5bf12e5 100644 --- a/src/nitro/communication/messages/parser/group/utils/GroupMemberParser.ts +++ b/src/nitro/communication/messages/parser/group/utils/GroupMemberParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; export class GroupRank { @@ -19,7 +19,7 @@ export class GroupMemberParser constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -38,7 +38,7 @@ export class GroupMemberParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._rank = wrapper.readInt(); this._id = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/groupforums/ExtendedForumData.ts b/src/nitro/communication/messages/parser/groupforums/ExtendedForumData.ts index 932311be..8ce2c82f 100644 --- a/src/nitro/communication/messages/parser/groupforums/ExtendedForumData.ts +++ b/src/nitro/communication/messages/parser/groupforums/ExtendedForumData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { ForumData } from './ForumData'; export class ExtendedForumData extends ForumData @@ -15,9 +15,9 @@ export class ExtendedForumData extends ForumData private _canChangeSettings: boolean; private _isStaff: boolean; - public static parse(wrapper: IMessageDataWrapper):ExtendedForumData + public static parse(wrapper: IMessageDataWrapper): ExtendedForumData { - const extendedForumData:ExtendedForumData = new ExtendedForumData(); + const extendedForumData: ExtendedForumData = new ExtendedForumData(); ForumData.fillFromMessage(extendedForumData, wrapper); diff --git a/src/nitro/communication/messages/parser/groupforums/ForumData.ts b/src/nitro/communication/messages/parser/groupforums/ForumData.ts index 25a9d5b1..6ebeff7d 100644 --- a/src/nitro/communication/messages/parser/groupforums/ForumData.ts +++ b/src/nitro/communication/messages/parser/groupforums/ForumData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { GuildForumThread } from './GuildForumThread'; export class ForumData @@ -21,7 +21,7 @@ export class ForumData return this.fillFromMessage(new ForumData(), wrapper); } - protected static fillFromMessage(data: ForumData, wrapper: IMessageDataWrapper):ForumData + protected static fillFromMessage(data: ForumData, wrapper: IMessageDataWrapper): ForumData { data._groupId = wrapper.readInt(); data._name = wrapper.readString(); @@ -99,7 +99,7 @@ export class ForumData return this._lastMessageTimeAsSecondsAgo; } - public _Str_25309(forum: ForumData):void + public _Str_25309(forum: ForumData): void { this._totalThreads = forum._totalThreads; this._totalMessages = forum._totalMessages; @@ -119,7 +119,7 @@ export class ForumData { this._unreadMessages = (this._totalMessages - k); - if(this._unreadMessages < 0) this._unreadMessages = 0; + if (this._unreadMessages < 0) this._unreadMessages = 0; } public _Str_23783(thread: GuildForumThread): void diff --git a/src/nitro/communication/messages/parser/groupforums/ForumDataMessageParser.ts b/src/nitro/communication/messages/parser/groupforums/ForumDataMessageParser.ts index ef89258f..b0419624 100644 --- a/src/nitro/communication/messages/parser/groupforums/ForumDataMessageParser.ts +++ b/src/nitro/communication/messages/parser/groupforums/ForumDataMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { ExtendedForumData } from './ExtendedForumData'; export class ForumDataMessageParser implements IMessageParser @@ -14,7 +14,7 @@ export class ForumDataMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._extendedForumData = ExtendedForumData.parse(wrapper); diff --git a/src/nitro/communication/messages/parser/groupforums/GetForumsListMessageParser.ts b/src/nitro/communication/messages/parser/groupforums/GetForumsListMessageParser.ts index df877822..7ad9351d 100644 --- a/src/nitro/communication/messages/parser/groupforums/GetForumsListMessageParser.ts +++ b/src/nitro/communication/messages/parser/groupforums/GetForumsListMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { ForumData } from './ForumData'; export class GetForumsListMessageParser implements IMessageParser @@ -22,7 +22,7 @@ export class GetForumsListMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._listCode = wrapper.readInt(); this._totalAmount = wrapper.readInt(); @@ -32,7 +32,7 @@ export class GetForumsListMessageParser implements IMessageParser let i = 0; - while(i < this._amount) + while (i < this._amount) { this._forums.push(ForumData.parse(wrapper)); diff --git a/src/nitro/communication/messages/parser/groupforums/GuildForumThread.ts b/src/nitro/communication/messages/parser/groupforums/GuildForumThread.ts index 417e93d0..d6299ef4 100644 --- a/src/nitro/communication/messages/parser/groupforums/GuildForumThread.ts +++ b/src/nitro/communication/messages/parser/groupforums/GuildForumThread.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; export class GuildForumThread { @@ -20,7 +20,7 @@ export class GuildForumThread private _isPinned: boolean; private _isLocked: boolean; - public static parse(wrapper: IMessageDataWrapper):GuildForumThread + public static parse(wrapper: IMessageDataWrapper): GuildForumThread { const thread = new GuildForumThread(); diff --git a/src/nitro/communication/messages/parser/groupforums/GuildForumThreadsParser.ts b/src/nitro/communication/messages/parser/groupforums/GuildForumThreadsParser.ts index 53263ff8..9896aa8b 100644 --- a/src/nitro/communication/messages/parser/groupforums/GuildForumThreadsParser.ts +++ b/src/nitro/communication/messages/parser/groupforums/GuildForumThreadsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { GuildForumThread } from './GuildForumThread'; export class GuildForumThreadsParser implements IMessageParser @@ -20,7 +20,7 @@ export class GuildForumThreadsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._groupId = wrapper.readInt(); this._startIndex = wrapper.readInt(); @@ -29,7 +29,7 @@ export class GuildForumThreadsParser implements IMessageParser let i = 0; - while(i < this._amount) + while (i < this._amount) { this._threads.push(GuildForumThread.parse(wrapper)); diff --git a/src/nitro/communication/messages/parser/groupforums/MessageData.ts b/src/nitro/communication/messages/parser/groupforums/MessageData.ts index ec6312aa..28609fa2 100644 --- a/src/nitro/communication/messages/parser/groupforums/MessageData.ts +++ b/src/nitro/communication/messages/parser/groupforums/MessageData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; export class MessageData { diff --git a/src/nitro/communication/messages/parser/groupforums/PostMessageMessageParser.ts b/src/nitro/communication/messages/parser/groupforums/PostMessageMessageParser.ts index dff50bec..3e317c4e 100644 --- a/src/nitro/communication/messages/parser/groupforums/PostMessageMessageParser.ts +++ b/src/nitro/communication/messages/parser/groupforums/PostMessageMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { MessageData } from './MessageData'; export class PostMessageMessageParser implements IMessageParser @@ -18,7 +18,7 @@ export class PostMessageMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._groupId = wrapper.readInt(); this._threadId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/groupforums/PostThreadMessageParser.ts b/src/nitro/communication/messages/parser/groupforums/PostThreadMessageParser.ts index 996e40be..7bbe3e13 100644 --- a/src/nitro/communication/messages/parser/groupforums/PostThreadMessageParser.ts +++ b/src/nitro/communication/messages/parser/groupforums/PostThreadMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { GuildForumThread } from './GuildForumThread'; export class PostThreadMessageParser implements IMessageParser @@ -16,7 +16,7 @@ export class PostThreadMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._groupId = wrapper.readInt(); this._thread = GuildForumThread.parse(wrapper); diff --git a/src/nitro/communication/messages/parser/groupforums/ThreadMessagesMessageParser.ts b/src/nitro/communication/messages/parser/groupforums/ThreadMessagesMessageParser.ts index fd0f91bd..0a4381fd 100644 --- a/src/nitro/communication/messages/parser/groupforums/ThreadMessagesMessageParser.ts +++ b/src/nitro/communication/messages/parser/groupforums/ThreadMessagesMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { MessageData } from './MessageData'; export class ThreadMessagesMessageParser implements IMessageParser @@ -22,7 +22,7 @@ export class ThreadMessagesMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._groupId = wrapper.readInt(); this._threadId = wrapper.readInt(); @@ -32,7 +32,7 @@ export class ThreadMessagesMessageParser implements IMessageParser let i = 0; - while(i < this._amount) + while (i < this._amount) { const message = MessageData.parse(wrapper); diff --git a/src/nitro/communication/messages/parser/groupforums/UnreadForumsCountMessageParser.ts b/src/nitro/communication/messages/parser/groupforums/UnreadForumsCountMessageParser.ts index 5063d740..68e210be 100644 --- a/src/nitro/communication/messages/parser/groupforums/UnreadForumsCountMessageParser.ts +++ b/src/nitro/communication/messages/parser/groupforums/UnreadForumsCountMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class UnreadForumsCountMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class UnreadForumsCountMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._count = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/groupforums/UpdateMessageMessageParser.ts b/src/nitro/communication/messages/parser/groupforums/UpdateMessageMessageParser.ts index 3eab2fa4..cdfc608c 100644 --- a/src/nitro/communication/messages/parser/groupforums/UpdateMessageMessageParser.ts +++ b/src/nitro/communication/messages/parser/groupforums/UpdateMessageMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { MessageData } from './MessageData'; export class UpdateMessageMessageParser implements IMessageParser @@ -18,7 +18,7 @@ export class UpdateMessageMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._groupId = wrapper.readInt(); this._threadId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/groupforums/UpdateThreadMessageParser.ts b/src/nitro/communication/messages/parser/groupforums/UpdateThreadMessageParser.ts index f80efbb2..0b9cf593 100644 --- a/src/nitro/communication/messages/parser/groupforums/UpdateThreadMessageParser.ts +++ b/src/nitro/communication/messages/parser/groupforums/UpdateThreadMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { GuildForumThread } from './GuildForumThread'; export class UpdateThreadMessageParser implements IMessageParser @@ -16,7 +16,7 @@ export class UpdateThreadMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._groupId = wrapper.readInt(); this._thread = GuildForumThread.parse(wrapper); diff --git a/src/nitro/communication/messages/parser/handshake/NoobnessLevelMessageParser.ts b/src/nitro/communication/messages/parser/handshake/NoobnessLevelMessageParser.ts index 5d6c9ceb..7dca4c9a 100644 --- a/src/nitro/communication/messages/parser/handshake/NoobnessLevelMessageParser.ts +++ b/src/nitro/communication/messages/parser/handshake/NoobnessLevelMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NoobnessLevelMessageParser implements IMessageParser { @@ -14,7 +13,7 @@ export class NoobnessLevelMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._noobnessLevel = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/help/CallForHelpDisabledNotifyMessageParser.ts b/src/nitro/communication/messages/parser/help/CallForHelpDisabledNotifyMessageParser.ts index 2b115b54..dbd4db10 100644 --- a/src/nitro/communication/messages/parser/help/CallForHelpDisabledNotifyMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/CallForHelpDisabledNotifyMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CallForHelpDisabledNotifyMessageParser implements IMessageParser { @@ -11,7 +11,7 @@ export class CallForHelpDisabledNotifyMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._infoUrl = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/help/CallForHelpPendingCallsDeletedMessageParser.ts b/src/nitro/communication/messages/parser/help/CallForHelpPendingCallsDeletedMessageParser.ts index 37458cf6..dad37e4a 100644 --- a/src/nitro/communication/messages/parser/help/CallForHelpPendingCallsDeletedMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/CallForHelpPendingCallsDeletedMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CallForHelpPendingCallsDeletedMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/help/CallForHelpPendingCallsMessageParser.ts b/src/nitro/communication/messages/parser/help/CallForHelpPendingCallsMessageParser.ts index 02ed3bbe..ac8e40fb 100644 --- a/src/nitro/communication/messages/parser/help/CallForHelpPendingCallsMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/CallForHelpPendingCallsMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CallForHelpPendingCallsMessageParser implements IMessageParser { @@ -17,7 +16,7 @@ export class CallForHelpPendingCallsMessageParser implements IMessageParser const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { const callId = wrapper.readString(); const timestamp = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/help/CallForHelpReplyMessageParser.ts b/src/nitro/communication/messages/parser/help/CallForHelpReplyMessageParser.ts index f91d3013..2096576d 100644 --- a/src/nitro/communication/messages/parser/help/CallForHelpReplyMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/CallForHelpReplyMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CallForHelpReplyMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/help/CallForHelpResultMessageParser.ts b/src/nitro/communication/messages/parser/help/CallForHelpResultMessageParser.ts index bbdef8dd..2bb7de6e 100644 --- a/src/nitro/communication/messages/parser/help/CallForHelpResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/CallForHelpResultMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CallForHelpResultMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class CallForHelpResultMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._resultType = wrapper.readInt(); this._messageText = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionDetachedMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionDetachedMessageParser.ts index 074f36f2..8a9fb596 100644 --- a/src/nitro/communication/messages/parser/help/ChatReviewSessionDetachedMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionDetachedMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ChatReviewSessionDetachedMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionOfferedToGuideMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionOfferedToGuideMessageParser.ts index be90de76..ee39853c 100644 --- a/src/nitro/communication/messages/parser/help/ChatReviewSessionOfferedToGuideMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionOfferedToGuideMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ChatReviewSessionOfferedToGuideMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionResultsMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionResultsMessageParser.ts index 19518b9f..29d1241a 100644 --- a/src/nitro/communication/messages/parser/help/ChatReviewSessionResultsMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionResultsMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ChatReviewSessionResultsMessageParser implements IMessageParser { @@ -22,7 +21,7 @@ export class ChatReviewSessionResultsMessageParser implements IMessageParser this._ownVoteCode = wrapper.readInt(); const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._finalStatus.push(wrapper.readInt()); } diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionStartedMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionStartedMessageParser.ts index ba7411d6..bdb83b6d 100644 --- a/src/nitro/communication/messages/parser/help/ChatReviewSessionStartedMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionStartedMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ChatReviewSessionStartedMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionVotingStatusMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionVotingStatusMessageParser.ts index e853d60e..ebce19f7 100644 --- a/src/nitro/communication/messages/parser/help/ChatReviewSessionVotingStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionVotingStatusMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ChatReviewSessionVotingStatusMessageParser implements IMessageParser { @@ -10,7 +9,7 @@ export class ChatReviewSessionVotingStatusMessageParser implements IMessageParse public static readonly NO_VOTE = 4; public static readonly FINDING_NEW_VOTER = 5; - private _status:number[]; + private _status: number[]; flush(): boolean { @@ -24,7 +23,7 @@ export class ChatReviewSessionVotingStatusMessageParser implements IMessageParse const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._status.push(wrapper.readInt()); } diff --git a/src/nitro/communication/messages/parser/help/GuideOnDutyStatusMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideOnDutyStatusMessageParser.ts index 9419e309..6a80efcd 100644 --- a/src/nitro/communication/messages/parser/help/GuideOnDutyStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideOnDutyStatusMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideOnDutyStatusMessageParser implements IMessageParser { @@ -19,7 +19,7 @@ export class GuideOnDutyStatusMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._onDuty = wrapper.readBoolean(); this._guidesOnDuty = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/help/GuideReportingStatusMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideReportingStatusMessageParser.ts index b0bcfaf1..086ad61d 100644 --- a/src/nitro/communication/messages/parser/help/GuideReportingStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideReportingStatusMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { PendingGuideTicketData } from './common/PendingGuideTicketData'; export class GuideReportingStatusMessageParser implements IMessageParser @@ -21,7 +21,7 @@ export class GuideReportingStatusMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._statusCode = wrapper.readInt(); this._pendingTicket = new PendingGuideTicketData( diff --git a/src/nitro/communication/messages/parser/help/GuideSessionAttachedMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideSessionAttachedMessageParser.ts index 3ede6323..a2a46d3e 100644 --- a/src/nitro/communication/messages/parser/help/GuideSessionAttachedMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideSessionAttachedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideSessionAttachedMessageParser implements IMessageParser { @@ -19,7 +19,7 @@ export class GuideSessionAttachedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._asGuide = wrapper.readBoolean(); this._helpRequestType = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/help/GuideSessionDetachedMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideSessionDetachedMessageParser.ts index 72aed516..26945a54 100644 --- a/src/nitro/communication/messages/parser/help/GuideSessionDetachedMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideSessionDetachedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideSessionDetachedMessageParser implements IMessageParser { @@ -9,7 +9,7 @@ export class GuideSessionDetachedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/help/GuideSessionEndedMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideSessionEndedMessageParser.ts index 23f323c2..dfccc3c4 100644 --- a/src/nitro/communication/messages/parser/help/GuideSessionEndedMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideSessionEndedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideSessionEndedMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class GuideSessionEndedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._endReason = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/help/GuideSessionErrorMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideSessionErrorMessageParser.ts index 1ac5c96f..76f0ccd2 100644 --- a/src/nitro/communication/messages/parser/help/GuideSessionErrorMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideSessionErrorMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideSessionErrorMessageParser implements IMessageParser { @@ -19,7 +19,7 @@ export class GuideSessionErrorMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._errorCode = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/help/GuideSessionInvitedToGuideRoomMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideSessionInvitedToGuideRoomMessageParser.ts index e87a7793..ff1c1cfa 100644 --- a/src/nitro/communication/messages/parser/help/GuideSessionInvitedToGuideRoomMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideSessionInvitedToGuideRoomMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideSessionInvitedToGuideRoomMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class GuideSessionInvitedToGuideRoomMessageParser implements IMessagePars public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._roomName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/help/GuideSessionMessageMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideSessionMessageMessageParser.ts index 333aada8..19c9084f 100644 --- a/src/nitro/communication/messages/parser/help/GuideSessionMessageMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideSessionMessageMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideSessionMessageMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class GuideSessionMessageMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._chatMessage = wrapper.readString(); this._senderId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/help/GuideSessionPartnerIsTypingMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideSessionPartnerIsTypingMessageParser.ts index 4d617a11..32daa9f8 100644 --- a/src/nitro/communication/messages/parser/help/GuideSessionPartnerIsTypingMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideSessionPartnerIsTypingMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideSessionPartnerIsTypingMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class GuideSessionPartnerIsTypingMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._isTyping = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/help/GuideSessionRequesterRoomMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideSessionRequesterRoomMessageParser.ts index 97203dc2..911a6a56 100644 --- a/src/nitro/communication/messages/parser/help/GuideSessionRequesterRoomMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideSessionRequesterRoomMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideSessionRequesterRoomMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class GuideSessionRequesterRoomMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._requesterRoomId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/help/GuideSessionStartedMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideSessionStartedMessageParser.ts index 0410f692..59fc6f2f 100644 --- a/src/nitro/communication/messages/parser/help/GuideSessionStartedMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideSessionStartedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideSessionStartedMessageParser implements IMessageParser { @@ -23,7 +23,7 @@ export class GuideSessionStartedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._requesterUserId = wrapper.readInt(); this._requesterName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/help/GuideTicketCreationResultMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideTicketCreationResultMessageParser.ts index 8ad0dee8..e8d44d95 100644 --- a/src/nitro/communication/messages/parser/help/GuideTicketCreationResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideTicketCreationResultMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideTicketCreationResultMessageParser implements IMessageParser { @@ -18,7 +18,7 @@ export class GuideTicketCreationResultMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._result = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/help/GuideTicketResolutionMessageParser.ts b/src/nitro/communication/messages/parser/help/GuideTicketResolutionMessageParser.ts index e0b39c13..b941589d 100644 --- a/src/nitro/communication/messages/parser/help/GuideTicketResolutionMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/GuideTicketResolutionMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class GuideTicketResolutionMessageParser implements IMessageParser { @@ -17,7 +17,7 @@ export class GuideTicketResolutionMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._resolution = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/help/HotelMergeNameChangeParser.ts b/src/nitro/communication/messages/parser/help/HotelMergeNameChangeParser.ts index 0d19d660..a9bf1c60 100644 --- a/src/nitro/communication/messages/parser/help/HotelMergeNameChangeParser.ts +++ b/src/nitro/communication/messages/parser/help/HotelMergeNameChangeParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class HotelMergeNameChangeParser implements IMessageParser { @@ -9,7 +9,7 @@ export class HotelMergeNameChangeParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/help/IssueCloseNotificationMessageParser.ts b/src/nitro/communication/messages/parser/help/IssueCloseNotificationMessageParser.ts index b430e7c6..489045ae 100644 --- a/src/nitro/communication/messages/parser/help/IssueCloseNotificationMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/IssueCloseNotificationMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class IssueCloseNotificationMessageParser implements IMessageParser { @@ -14,7 +14,7 @@ export class IssueCloseNotificationMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._closeReason = wrapper.readInt(); this._messageText = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/help/QuizDataMessageParser.ts b/src/nitro/communication/messages/parser/help/QuizDataMessageParser.ts index 3f928b39..6e5e316b 100644 --- a/src/nitro/communication/messages/parser/help/QuizDataMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/QuizDataMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class QuizDataMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class QuizDataMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._quizCode = wrapper.readString(); @@ -23,7 +23,7 @@ export class QuizDataMessageParser implements IMessageParser this._questionIds = []; - for(let i = 0; i < size; i++) this._questionIds.push(wrapper.readInt()); + for (let i = 0; i < size; i++) this._questionIds.push(wrapper.readInt()); return true; } diff --git a/src/nitro/communication/messages/parser/help/QuizResultsMessageParser.ts b/src/nitro/communication/messages/parser/help/QuizResultsMessageParser.ts index 4f12f63a..d84ea2a5 100644 --- a/src/nitro/communication/messages/parser/help/QuizResultsMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/QuizResultsMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class QuizResultsMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class QuizResultsMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._quizCode = wrapper.readString(); @@ -23,7 +23,7 @@ export class QuizResultsMessageParser implements IMessageParser this._questionIdsForWrongAnswers = []; - for(let i = 0; i < size; i++) this._questionIdsForWrongAnswers.push(wrapper.readInt()); + for (let i = 0; i < size; i++) this._questionIdsForWrongAnswers.push(wrapper.readInt()); return true; } diff --git a/src/nitro/communication/messages/parser/inventory/achievements/AchievementParser.ts b/src/nitro/communication/messages/parser/inventory/achievements/AchievementParser.ts index 8e89ca27..bb0615d5 100644 --- a/src/nitro/communication/messages/parser/inventory/achievements/AchievementParser.ts +++ b/src/nitro/communication/messages/parser/inventory/achievements/AchievementParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { AchievementData } from '../../../incoming/inventory/achievements/AchievementData'; export class AchievementParser implements IMessageParser @@ -14,7 +14,7 @@ export class AchievementParser implements IMessageParser public parse(k: IMessageDataWrapper): boolean { - if(!k) return false; + if (!k) return false; this._achievement = new AchievementData(k); diff --git a/src/nitro/communication/messages/parser/inventory/achievements/AchievementsParser.ts b/src/nitro/communication/messages/parser/inventory/achievements/AchievementsParser.ts index a07d0c85..25f4c5cb 100644 --- a/src/nitro/communication/messages/parser/inventory/achievements/AchievementsParser.ts +++ b/src/nitro/communication/messages/parser/inventory/achievements/AchievementsParser.ts @@ -1,5 +1,4 @@ - -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { AchievementData } from '../../../incoming/inventory/achievements/AchievementData'; export class AchievementsParser implements IMessageParser @@ -17,13 +16,13 @@ export class AchievementsParser implements IMessageParser public parse(k: IMessageDataWrapper): boolean { - if(!k) return false; + if (!k) return false; this._achievements = []; let totalCount = k.readInt(); - while(totalCount > 0) + while (totalCount > 0) { this._achievements.push(new AchievementData(k)); diff --git a/src/nitro/communication/messages/parser/inventory/achievements/AchievementsScoreParser.ts b/src/nitro/communication/messages/parser/inventory/achievements/AchievementsScoreParser.ts index 2d378f28..a3d35447 100644 --- a/src/nitro/communication/messages/parser/inventory/achievements/AchievementsScoreParser.ts +++ b/src/nitro/communication/messages/parser/inventory/achievements/AchievementsScoreParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class AchievementsScoreParser implements IMessageParser { @@ -13,7 +13,7 @@ export class AchievementsScoreParser implements IMessageParser public parse(k: IMessageDataWrapper): boolean { - if(!k) return false; + if (!k) return false; this._score = k.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectActivatedParser.ts b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectActivatedParser.ts index f22936d3..cb0a24c7 100644 --- a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectActivatedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectActivatedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class AvatarEffectActivatedParser implements IMessageParser { @@ -17,7 +17,7 @@ export class AvatarEffectActivatedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._type = wrapper.readInt(); this._duration = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectAddedParser.ts b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectAddedParser.ts index be7874cd..f30e296c 100644 --- a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectAddedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectAddedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class AvatarEffectAddedParser implements IMessageParser { @@ -19,7 +19,7 @@ export class AvatarEffectAddedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._type = wrapper.readInt(); this._subType = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectExpiredParser.ts b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectExpiredParser.ts index 36886d3b..00b54c6c 100644 --- a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectExpiredParser.ts +++ b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectExpiredParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class AvatarEffectExpiredParser implements IMessageParser { @@ -13,7 +13,7 @@ export class AvatarEffectExpiredParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._type = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectSelectedParser.ts b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectSelectedParser.ts index ddc0cd77..af233a86 100644 --- a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectSelectedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectSelectedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class AvatarEffectSelectedParser implements IMessageParser { @@ -13,7 +13,7 @@ export class AvatarEffectSelectedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._type = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectsParser.ts b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectsParser.ts index 7b4f72a9..04075669 100644 --- a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectsParser.ts +++ b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { AvatarEffect } from '../../../incoming/inventory/avatareffect/AvatarEffect'; export class AvatarEffectsParser implements IMessageParser @@ -14,11 +14,11 @@ export class AvatarEffectsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalEffects = wrapper.readInt(); - while(totalEffects > 0) + while (totalEffects > 0) { const effect = new AvatarEffect(); diff --git a/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts index fa92f43a..c84b79e5 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; export class BadgeAndPointLimit { @@ -7,7 +7,7 @@ export class BadgeAndPointLimit constructor(k: string, _arg_2: IMessageDataWrapper) { - if(!_arg_2) throw new Error('invalid_parser'); + if (!_arg_2) throw new Error('invalid_parser'); this._badgeId = (('ACH_' + k) + _arg_2.readInt()); this._limit = _arg_2.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/badges/BadgePointLimitsParser.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgePointLimitsParser.ts index 0ccd9eff..c715fda7 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/BadgePointLimitsParser.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgePointLimitsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { BadgeAndPointLimit } from './BadgeAndPointLimit'; export class BadgePointLimitsParser implements IMessageParser @@ -14,18 +14,18 @@ export class BadgePointLimitsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let _local_2 = wrapper.readInt(); - while(_local_2 > 0) + while (_local_2 > 0) { const _local_4 = wrapper.readString(); const _local_5 = wrapper.readInt(); let _local_6 = 0; - while(_local_6 < _local_5) + while (_local_6 < _local_5) { this._data.push(new BadgeAndPointLimit(_local_4, wrapper)); diff --git a/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts index 36523ca7..c80a7a6e 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class BadgeReceivedParser implements IMessageParser { @@ -15,7 +15,7 @@ export class BadgeReceivedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._badgeId = wrapper.readInt(); this._badgeCode = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/inventory/badges/BadgesParser.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgesParser.ts index 39561505..743a587f 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/BadgesParser.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgesParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { AdvancedMap } from '../../../../../../core/utils/AdvancedMap'; export class BadgesParser implements IMessageParser @@ -18,7 +18,7 @@ export class BadgesParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._allBadgeCodes = []; this._activeBadgeCodes = new AdvancedMap(); @@ -26,7 +26,7 @@ export class BadgesParser implements IMessageParser let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { const badgeId = wrapper.readInt(); const badgeCode = wrapper.readString(); @@ -40,7 +40,7 @@ export class BadgesParser implements IMessageParser count = wrapper.readInt(); - while(count > 0) + while (count > 0) { const badgeSlot = wrapper.readInt(); const badgeCode = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/inventory/badges/IsBadgeRequestFulfilledParser.ts b/src/nitro/communication/messages/parser/inventory/badges/IsBadgeRequestFulfilledParser.ts index dba8988d..752c7d0f 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/IsBadgeRequestFulfilledParser.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/IsBadgeRequestFulfilledParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class IsBadgeRequestFulfilledParser implements IMessageParser { @@ -12,7 +12,7 @@ export class IsBadgeRequestFulfilledParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._requestCode = wrapper.readString(); this._fulfilled = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/inventory/clothing/FigureSetIdsMessageParser.ts b/src/nitro/communication/messages/parser/inventory/clothing/FigureSetIdsMessageParser.ts index 18c99576..5d032cc5 100644 --- a/src/nitro/communication/messages/parser/inventory/clothing/FigureSetIdsMessageParser.ts +++ b/src/nitro/communication/messages/parser/inventory/clothing/FigureSetIdsMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class FigureSetIdsMessageParser implements IMessageParser { @@ -15,11 +15,11 @@ export class FigureSetIdsMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalSetIds = wrapper.readInt(); - while(totalSetIds > 0) + while (totalSetIds > 0) { this._figureSetIds.push(wrapper.readInt()); @@ -28,7 +28,7 @@ export class FigureSetIdsMessageParser implements IMessageParser let totalFurnitureNames = wrapper.readInt(); - while(totalFurnitureNames > 0) + while (totalFurnitureNames > 0) { this._boundFurnitureNames.push(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/inventory/clothing/_Str_8728.ts b/src/nitro/communication/messages/parser/inventory/clothing/_Str_8728.ts index f3d5a41f..7958c030 100644 --- a/src/nitro/communication/messages/parser/inventory/clothing/_Str_8728.ts +++ b/src/nitro/communication/messages/parser/inventory/clothing/_Str_8728.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class _Str_8728 implements IMessageParser { @@ -13,7 +13,7 @@ export class _Str_8728 implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/clothing/_Str_9021.ts b/src/nitro/communication/messages/parser/inventory/clothing/_Str_9021.ts index 119c59fe..849e9254 100644 --- a/src/nitro/communication/messages/parser/inventory/clothing/_Str_9021.ts +++ b/src/nitro/communication/messages/parser/inventory/clothing/_Str_9021.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class _Str_9021 implements IMessageParser { @@ -13,7 +13,7 @@ export class _Str_9021 implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListAddOrUpdateParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListAddOrUpdateParser.ts index e956450a..236282e8 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListAddOrUpdateParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListAddOrUpdateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { FurnitureListItemParser } from './utils/FurnitureListItemParser'; export class FurnitureListAddOrUpdateParser implements IMessageParser @@ -14,7 +14,7 @@ export class FurnitureListAddOrUpdateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._items.push(new FurnitureListItemParser(wrapper)); diff --git a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListInvalidateParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListInvalidateParser.ts index 4731124a..77676d93 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListInvalidateParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListInvalidateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class FurnitureListInvalidateParser implements IMessageParser { @@ -9,7 +9,7 @@ export class FurnitureListInvalidateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListParser.ts index 69119032..4e879094 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { FurnitureListItemParser } from './utils/FurnitureListItemParser'; export class FurnitureListParser implements IMessageParser @@ -18,18 +18,18 @@ export class FurnitureListParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._totalFragments = wrapper.readInt(); this._fragmentNumber = wrapper.readInt(); let totalItems = wrapper.readInt(); - while(totalItems > 0) + while (totalItems > 0) { const item = new FurnitureListItemParser(wrapper); - if(item) this._fragment.set(item.itemId, item); + if (item) this._fragment.set(item.itemId, item); totalItems--; } diff --git a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListRemovedParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListRemovedParser.ts index ee0e1303..68279fc0 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListRemovedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListRemovedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class FurnitureListRemovedParser implements IMessageParser { @@ -13,7 +13,7 @@ export class FurnitureListRemovedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/furniture/FurniturePostItPlacedParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/FurniturePostItPlacedParser.ts index d6e12b0e..7a93dd65 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/FurniturePostItPlacedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/FurniturePostItPlacedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class FurniturePostItPlacedParser implements IMessageParser { @@ -15,7 +15,7 @@ export class FurniturePostItPlacedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); this._itemsLeft = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/furniture/PresentOpenedMessageParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/PresentOpenedMessageParser.ts index 0df01d19..f29d9a82 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/PresentOpenedMessageParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/PresentOpenedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class PresentOpenedMessageParser implements IMessageParser { @@ -21,7 +21,7 @@ export class PresentOpenedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemType = wrapper.readString(); this._classId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/furniture/utils/FurnitureListItemParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/utils/FurnitureListItemParser.ts index bcc2f1ff..ace31b93 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/utils/FurnitureListItemParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/utils/FurnitureListItemParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../../api'; import { Nitro } from '../../../../../../Nitro'; import { IObjectData } from '../../../../../../room/object/data/IObjectData'; import { IFurnitureItemData } from '../../../../incoming/inventory/furni/IFurnitureItemData'; @@ -31,7 +31,7 @@ export class FurnitureListItemParser implements IFurnitureItemData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -64,7 +64,7 @@ export class FurnitureListItemParser implements IFurnitureItemData public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); this._furniType = wrapper.readString(); @@ -79,7 +79,7 @@ export class FurnitureListItemParser implements IFurnitureItemData this._secondsToExpiration = wrapper.readInt(); this._expirationTimeStamp = Nitro.instance.time; - if(this.secondsToExpiration > -1) + if (this.secondsToExpiration > -1) { this._rentable = true; } @@ -93,7 +93,7 @@ export class FurnitureListItemParser implements IFurnitureItemData this._flatId = wrapper.readInt(); this._isWallItem = (this._furniType === FurnitureListItemParser.WALL_ITEM); - if(this._furniType === FurnitureListItemParser.FLOOR_ITEM) + if (this._furniType === FurnitureListItemParser.FLOOR_ITEM) { this._slotId = wrapper.readString(); this._extra = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingRequestParser.ts b/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingRequestParser.ts index 23a3b424..c8612bc1 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingRequestParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingRequestParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { BreedingPetInfo } from '../../../incoming/room/pet/BreedingPetInfo'; import { RarityCategoryData } from '../../../incoming/room/pet/RarityCategoryData'; @@ -14,19 +14,19 @@ export class ConfirmBreedingRequestParser implements IMessageParser { this._nestId = 0; - if(this._pet1) + if (this._pet1) { this._pet1.dispose(); this._pet1 = null; } - if(this._pet2) + if (this._pet2) { this._pet2.dispose(); this._pet2 = null; } - for(const k of this._rarityCategories) k && k.dispose(); + for (const k of this._rarityCategories) k && k.dispose(); this._rarityCategories = []; @@ -35,7 +35,7 @@ export class ConfirmBreedingRequestParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._nestId = wrapper.readInt(); this._pet1 = new BreedingPetInfo(wrapper); @@ -43,7 +43,7 @@ export class ConfirmBreedingRequestParser implements IMessageParser let totalCount = wrapper.readInt(); - while(totalCount > 0) + while (totalCount > 0) { this._rarityCategories.push(new RarityCategoryData(wrapper)); @@ -60,12 +60,12 @@ export class ConfirmBreedingRequestParser implements IMessageParser return this._nestId; } - public get pet1():BreedingPetInfo + public get pet1(): BreedingPetInfo { return this._pet1; } - public get pet2():BreedingPetInfo + public get pet2(): BreedingPetInfo { return this._pet2; } diff --git a/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingResultParser.ts b/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingResultParser.ts index fa6b3438..d767f293 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingResultParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingResultParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class ConfirmBreedingResultParser implements IMessageParser { @@ -15,7 +15,7 @@ export class ConfirmBreedingResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._breedingNestStuffId = wrapper.readInt(); this._result = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/pets/GoToBreedingNestFailureParser.ts b/src/nitro/communication/messages/parser/inventory/pets/GoToBreedingNestFailureParser.ts index 6442865e..3fbc2e5b 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/GoToBreedingNestFailureParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/GoToBreedingNestFailureParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class GoToBreedingNestFailureParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/inventory/pets/NestBreedingSuccessParser.ts b/src/nitro/communication/messages/parser/inventory/pets/NestBreedingSuccessParser.ts index 2136c8a8..d469b3ac 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/NestBreedingSuccessParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/NestBreedingSuccessParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class NestBreedingSuccessParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetAddedToInventoryParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetAddedToInventoryParser.ts index 7c248938..61dec4dd 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetAddedToInventoryParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetAddedToInventoryParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { PetData } from './PetData'; export class PetAddedToInventoryParser implements IMessageParser diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetBreedingMessageParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetBreedingMessageParser.ts index 22e56f71..d4be7051 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetBreedingMessageParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetBreedingMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class PetBreedingMessageParser implements IMessageParser { @@ -21,7 +21,7 @@ export class PetBreedingMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._state = wrapper.readInt(); this._ownPetId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetData.ts b/src/nitro/communication/messages/parser/inventory/pets/PetData.ts index 293a3057..e55d1877 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetData.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; import { PetFigureDataParser } from './PetFigureDataParser'; export class PetData @@ -10,7 +10,7 @@ export class PetData constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this._id = wrapper.readInt(); this._name = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetFigureDataParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetFigureDataParser.ts index abf3cbe4..3b74be27 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetFigureDataParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetFigureDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; export class PetFigureDataParser { @@ -20,7 +20,7 @@ export class PetFigureDataParser let i = 0; - while(i < this._customPartCount) + while (i < this._customPartCount) { this._customParts.push(wrapper.readInt()); this._customParts.push(wrapper.readInt()); @@ -56,7 +56,7 @@ export class PetFigureDataParser figure = (figure + (' ' + this.custompartCount)); - for(const _local_2 of this.customParts) figure = (figure + (' ' + _local_2)); + for (const _local_2 of this.customParts) figure = (figure + (' ' + _local_2)); return figure; } diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetInventoryParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetInventoryParser.ts index dc912140..c080e39e 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetInventoryParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetInventoryParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { PetData } from './PetData'; export class PetInventoryParser implements IMessageParser @@ -23,7 +23,7 @@ export class PetInventoryParser implements IMessageParser this._fragment = new Map(); - while(totalCount > 0) + while (totalCount > 0) { const petData = new PetData(wrapper); diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetReceivedMessageParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetReceivedMessageParser.ts index 83ad33c6..8daa91f5 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetReceivedMessageParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetReceivedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { PetData } from './PetData'; export class PetReceivedMessageParser implements IMessageParser diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetRemovedFromInventoryParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetRemovedFromInventoryParser.ts index d3d8a661..1a302c20 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetRemovedFromInventoryParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetRemovedFromInventoryParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class PetRemovedFromInventoryParser implements IMessageParser { @@ -11,7 +11,7 @@ export class PetRemovedFromInventoryParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._petId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/purse/UserCreditsMessageParser.ts b/src/nitro/communication/messages/parser/inventory/purse/UserCreditsMessageParser.ts index cb97187d..802e628f 100644 --- a/src/nitro/communication/messages/parser/inventory/purse/UserCreditsMessageParser.ts +++ b/src/nitro/communication/messages/parser/inventory/purse/UserCreditsMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class UserCreditsMessageParser implements IMessageParser { @@ -6,7 +6,7 @@ export class UserCreditsMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._balance = parseFloat(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingAcceptParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingAcceptParser.ts index afd1c590..1d716885 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingAcceptParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingAcceptParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class TradingAcceptParser implements IMessageParser { @@ -15,7 +15,7 @@ export class TradingAcceptParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userID = wrapper.readInt(); this._userAccepts = (wrapper.readInt() > 0); diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingCloseParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingCloseParser.ts index f0c52991..7620cc29 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingCloseParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingCloseParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class TradingCloseParser implements IMessageParser { @@ -14,7 +14,7 @@ export class TradingCloseParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userId = wrapper.readInt(); this._reason = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingCompletedParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingCompletedParser.ts index 71facf5e..12f643da 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingCompletedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingCompletedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class TradingCompletedParser implements IMessageParser { @@ -9,7 +9,7 @@ export class TradingCompletedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingConfirmationParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingConfirmationParser.ts index e74cc507..bf3431f1 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingConfirmationParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingConfirmationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class TradingConfirmationParser implements IMessageParser { @@ -9,7 +9,7 @@ export class TradingConfirmationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingListItemParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingListItemParser.ts index 4bed6361..d1ebe1aa 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingListItemParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingListItemParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { ItemDataStructure } from '../../../incoming/inventory/trading/ItemDataStructure'; export class TradingListItemParser implements IMessageParser @@ -28,12 +28,12 @@ export class TradingListItemParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._firstUserID = wrapper.readInt(); this._firstUserItemArray = []; - if(!this.parseItems(wrapper, this._firstUserItemArray)) return false; + if (!this.parseItems(wrapper, this._firstUserItemArray)) return false; this._firstUserNumItems = wrapper.readInt(); this._firstUserNumCredits = wrapper.readInt(); @@ -41,7 +41,7 @@ export class TradingListItemParser implements IMessageParser this._secondUserID = wrapper.readInt(); this._secondUserItemArray = []; - if(!this.parseItems(wrapper, this._secondUserItemArray)) return false; + if (!this.parseItems(wrapper, this._secondUserItemArray)) return false; this._secondUserNumItems = wrapper.readInt(); this._secondUserNumCredits = wrapper.readInt(); @@ -53,7 +53,7 @@ export class TradingListItemParser implements IMessageParser { let count = k.readInt(); - while(count > 0) + while (count > 0) { itemArray.push(new ItemDataStructure(k)); diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingNotOpenParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingNotOpenParser.ts index 646daa25..19827443 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingNotOpenParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingNotOpenParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class TradingNotOpenParser implements IMessageParser { @@ -9,7 +9,7 @@ export class TradingNotOpenParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingOpenFailedParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingOpenFailedParser.ts index 32d728cf..f5a3142b 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingOpenFailedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingOpenFailedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class TradingOpenFailedParser implements IMessageParser { @@ -15,7 +15,7 @@ export class TradingOpenFailedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._reason = wrapper.readInt(); this._otherUserName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingOpenParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingOpenParser.ts index ca16fd61..07443695 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingOpenParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingOpenParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class TradingOpenParser implements IMessageParser { @@ -19,7 +19,7 @@ export class TradingOpenParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userId = wrapper.readInt(); this._userCanTrade = (wrapper.readInt() === 1); diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingOtherNotAllowedParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingOtherNotAllowedParser.ts index f8cf1007..441f30d8 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingOtherNotAllowedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingOtherNotAllowedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class TradingOtherNotAllowedParser implements IMessageParser { @@ -9,7 +9,7 @@ export class TradingOtherNotAllowedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingYouAreNotAllowedParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingYouAreNotAllowedParser.ts index c85e861f..81208690 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingYouAreNotAllowedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingYouAreNotAllowedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class TradingYouAreNotAllowedParser implements IMessageParser { @@ -9,7 +9,7 @@ export class TradingYouAreNotAllowedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/landingview/PromoArticlesMessageParser.ts b/src/nitro/communication/messages/parser/landingview/PromoArticlesMessageParser.ts index 3491c928..ab05a70a 100644 --- a/src/nitro/communication/messages/parser/landingview/PromoArticlesMessageParser.ts +++ b/src/nitro/communication/messages/parser/landingview/PromoArticlesMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { PromoArticleData } from '../../incoming/landingview/PromoArticleData'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class PromoArticlesMessageParser implements IMessageParser { @@ -14,11 +14,11 @@ export class PromoArticlesMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._articles.push(new PromoArticleData(wrapper)); } diff --git a/src/nitro/communication/messages/parser/landingview/votes/CommunityVoteReceivedParser.ts b/src/nitro/communication/messages/parser/landingview/votes/CommunityVoteReceivedParser.ts index 4083f747..55c84a9d 100644 --- a/src/nitro/communication/messages/parser/landingview/votes/CommunityVoteReceivedParser.ts +++ b/src/nitro/communication/messages/parser/landingview/votes/CommunityVoteReceivedParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../../core'; -import { IMessageParser } from './../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; +import { IMessageParser } from './../../../../../../api'; export class CommunityVoteReceivedParser implements IMessageParser { @@ -12,7 +12,7 @@ export class CommunityVoteReceivedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._acknowledged = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/marketplace/MarketplaceBuyOfferResultParser.ts b/src/nitro/communication/messages/parser/marketplace/MarketplaceBuyOfferResultParser.ts index 2885bebf..a512cc73 100644 --- a/src/nitro/communication/messages/parser/marketplace/MarketplaceBuyOfferResultParser.ts +++ b/src/nitro/communication/messages/parser/marketplace/MarketplaceBuyOfferResultParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MarketplaceBuyOfferResultParser implements IMessageParser { @@ -18,7 +18,7 @@ export class MarketplaceBuyOfferResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._result = wrapper.readInt(); this._newOfferId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/marketplace/MarketplaceCanMakeOfferResultParser.ts b/src/nitro/communication/messages/parser/marketplace/MarketplaceCanMakeOfferResultParser.ts index 6294e480..c6d6a350 100644 --- a/src/nitro/communication/messages/parser/marketplace/MarketplaceCanMakeOfferResultParser.ts +++ b/src/nitro/communication/messages/parser/marketplace/MarketplaceCanMakeOfferResultParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MarketplaceCanMakeOfferResultParser implements IMessageParser { @@ -15,7 +15,7 @@ export class MarketplaceCanMakeOfferResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._result = wrapper.readInt(); this._tokenCount = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/marketplace/MarketplaceCancelOfferResultParser.ts b/src/nitro/communication/messages/parser/marketplace/MarketplaceCancelOfferResultParser.ts index 5f123d75..a9d9cac1 100644 --- a/src/nitro/communication/messages/parser/marketplace/MarketplaceCancelOfferResultParser.ts +++ b/src/nitro/communication/messages/parser/marketplace/MarketplaceCancelOfferResultParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MarketplaceCancelOfferResultParser implements IMessageParser { @@ -15,7 +15,7 @@ export class MarketplaceCancelOfferResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._offerId = wrapper.readInt(); this._success = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/marketplace/MarketplaceConfigurationMessageParser.ts b/src/nitro/communication/messages/parser/marketplace/MarketplaceConfigurationMessageParser.ts index e179d3fe..3430f924 100644 --- a/src/nitro/communication/messages/parser/marketplace/MarketplaceConfigurationMessageParser.ts +++ b/src/nitro/communication/messages/parser/marketplace/MarketplaceConfigurationMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MarketplaceConfigurationMessageParser implements IMessageParser { @@ -27,7 +27,7 @@ export class MarketplaceConfigurationMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._enabled = wrapper.readBoolean(); this._commission = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/marketplace/MarketplaceItemPostedParser.ts b/src/nitro/communication/messages/parser/marketplace/MarketplaceItemPostedParser.ts index eecebf30..109bc254 100644 --- a/src/nitro/communication/messages/parser/marketplace/MarketplaceItemPostedParser.ts +++ b/src/nitro/communication/messages/parser/marketplace/MarketplaceItemPostedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MarketplaceMakeOfferResultParser implements IMessageParser { @@ -13,7 +13,7 @@ export class MarketplaceMakeOfferResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._result = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/marketplace/MarketplaceItemStatsParser.ts b/src/nitro/communication/messages/parser/marketplace/MarketplaceItemStatsParser.ts index f2fca62b..fb9b8bc9 100644 --- a/src/nitro/communication/messages/parser/marketplace/MarketplaceItemStatsParser.ts +++ b/src/nitro/communication/messages/parser/marketplace/MarketplaceItemStatsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MarketplaceItemStatsParser implements IMessageParser { @@ -27,7 +27,7 @@ export class MarketplaceItemStatsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._averagePrice = wrapper.readInt(); this._currentOfferCount = wrapper.readInt(); @@ -35,7 +35,7 @@ export class MarketplaceItemStatsParser implements IMessageParser let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._dayOffsets.push(wrapper.readInt()); this._averagePrices.push(wrapper.readInt()); diff --git a/src/nitro/communication/messages/parser/marketplace/MarketplaceOffersParser.ts b/src/nitro/communication/messages/parser/marketplace/MarketplaceOffersParser.ts index 2a77bc37..d3eb79f3 100644 --- a/src/nitro/communication/messages/parser/marketplace/MarketplaceOffersParser.ts +++ b/src/nitro/communication/messages/parser/marketplace/MarketplaceOffersParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { IObjectData } from '../../../../room/object/data/IObjectData'; import { ObjectDataFactory } from '../../../../room/object/data/ObjectDataFactory'; import { LegacyDataType } from '../../../../room/object/data/type/LegacyDataType'; @@ -26,13 +26,13 @@ export class MarketplaceOffersParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const count = wrapper.readInt(); let i = 0; - while(i < count) + while (i < count) { const offerId = wrapper.readInt(); const status = wrapper.readInt(); @@ -42,19 +42,19 @@ export class MarketplaceOffersParser implements IMessageParser let extraData = ''; let stuffData: IObjectData = null; - if(furniType === MarketplaceOffersParser.FURNITYPE_STUFF) + if (furniType === MarketplaceOffersParser.FURNITYPE_STUFF) { furniId = wrapper.readInt(); stuffData = FurnitureDataParser.parseObjectData(wrapper); } - else if(furniType === MarketplaceOffersParser.FURNITYPE_WALL) + else if (furniType === MarketplaceOffersParser.FURNITYPE_WALL) { furniId = wrapper.readInt(); extraData = wrapper.readString(); } - else if(furniType == MarketplaceOffersParser.FAKE_FURNITYPE_UNIQUE) + else if (furniType == MarketplaceOffersParser.FAKE_FURNITYPE_UNIQUE) { furniId = wrapper.readInt(); stuffData = ObjectDataFactory.getData(LegacyDataType.FORMAT_KEY); @@ -70,7 +70,7 @@ export class MarketplaceOffersParser implements IMessageParser const offerItem = new MarketplaceOffer(offerId, furniId, furniType, extraData, stuffData, price, status, timeLeftMinutes, averagePrice, offerCount); - if(i < this.MAX_LIST_LENGTH) this._offers.push(offerItem); + if (i < this.MAX_LIST_LENGTH) this._offers.push(offerItem); i++; } diff --git a/src/nitro/communication/messages/parser/marketplace/MarketplaceOwnOffersParser.ts b/src/nitro/communication/messages/parser/marketplace/MarketplaceOwnOffersParser.ts index 038b79dc..9e42aa6f 100644 --- a/src/nitro/communication/messages/parser/marketplace/MarketplaceOwnOffersParser.ts +++ b/src/nitro/communication/messages/parser/marketplace/MarketplaceOwnOffersParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { IObjectData } from '../../../../room/object/data/IObjectData'; import { ObjectDataFactory } from '../../../../room/object/data/ObjectDataFactory'; import { LegacyDataType } from '../../../../room/object/data/type/LegacyDataType'; @@ -20,13 +20,13 @@ export class MarketplaceOwnOffersParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._offers = []; this._creditsWaiting = wrapper.readInt(); // SoldPriceTotal const offerCount = wrapper.readInt(); - for(let i = 0; i < offerCount; i++) + for (let i = 0; i < offerCount; i++) { const offerId = wrapper.readInt(); const status = wrapper.readInt(); @@ -34,20 +34,20 @@ export class MarketplaceOwnOffersParser implements IMessageParser let furniId; let extraData; - let stuffData:IObjectData; - if(furniType == 1) + let stuffData: IObjectData; + if (furniType == 1) { furniId = wrapper.readInt(); stuffData = this.getStuffData(wrapper); } else { - if(furniType == 2) + if (furniType == 2) { furniId = wrapper.readInt(); extraData = wrapper.readString(); } - else if(furniType == 3) + else if (furniType == 3) { furniId = wrapper.readInt(); stuffData = ObjectDataFactory.getData(LegacyDataType.FORMAT_KEY); @@ -62,7 +62,7 @@ export class MarketplaceOwnOffersParser implements IMessageParser const local10 = wrapper.readInt(); const local13 = new MarketplaceOffer(offerId, furniId, furniType, extraData, stuffData, price, status, local9, local10); - if(i < MarketplaceOwnOffersParser.MAX_LIST_LENGTH) + if (i < MarketplaceOwnOffersParser.MAX_LIST_LENGTH) { this._offers.push(local13); } @@ -71,7 +71,7 @@ export class MarketplaceOwnOffersParser implements IMessageParser return true; } - public get offers():MarketplaceOffer[] + public get offers(): MarketplaceOffer[] { return this._offers; } diff --git a/src/nitro/communication/messages/parser/moderation/CfhChatlogMessageParser.ts b/src/nitro/communication/messages/parser/moderation/CfhChatlogMessageParser.ts index 9cf8106f..8911a54f 100644 --- a/src/nitro/communication/messages/parser/moderation/CfhChatlogMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/CfhChatlogMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CfhChatlogData } from '../../incoming/moderation/CfhChatlogData'; export class CfhChatlogMessageParser implements IMessageParser @@ -15,7 +14,7 @@ export class CfhChatlogMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new CfhChatlogData(wrapper); diff --git a/src/nitro/communication/messages/parser/moderation/IssueDeletedMessageParser.ts b/src/nitro/communication/messages/parser/moderation/IssueDeletedMessageParser.ts index 69525294..0471b097 100644 --- a/src/nitro/communication/messages/parser/moderation/IssueDeletedMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/IssueDeletedMessageParser.ts @@ -1,16 +1,15 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class IssueDeletedMessageParser implements IMessageParser { private _issueId: number; - public flush():boolean + public flush(): boolean { return true; } - public parse(k:IMessageDataWrapper):boolean + public parse(k: IMessageDataWrapper): boolean { this._issueId = parseInt(k.readString()); return true; diff --git a/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts b/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts index 8496a0dc..ce6446d0 100644 --- a/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts @@ -1,13 +1,13 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { IssueMessageData } from './IssueMessageData'; import { PatternMatchData } from './PatternMatchData'; export class IssueInfoMessageParser implements IMessageParser { - private _issueData:IssueMessageData; + private _issueData: IssueMessageData; - public get issueData():IssueMessageData + public get issueData(): IssueMessageData { return this._issueData; } @@ -18,7 +18,7 @@ export class IssueInfoMessageParser implements IMessageParser return true; } - public parse(k:IMessageDataWrapper): boolean + public parse(k: IMessageDataWrapper): boolean { const issueId: number = k.readInt(); const state: number = k.readInt(); @@ -37,9 +37,9 @@ export class IssueInfoMessageParser implements IMessageParser const chatRecordId: number = k.readInt(); const patternsCount: number = k.readInt(); - const patterns:PatternMatchData[] = []; + const patterns: PatternMatchData[] = []; - for(let i = 0; i < patternsCount; i++) + for (let i = 0; i < patternsCount; i++) { patterns.push(new PatternMatchData(k)); } diff --git a/src/nitro/communication/messages/parser/moderation/IssuePickFailedMessageParser.ts b/src/nitro/communication/messages/parser/moderation/IssuePickFailedMessageParser.ts index 8e7adbeb..c5787f2a 100644 --- a/src/nitro/communication/messages/parser/moderation/IssuePickFailedMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/IssuePickFailedMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { IssueMessageData } from './IssueMessageData'; export class IssuePickFailedMessageParser implements IMessageParser @@ -20,7 +19,7 @@ export class IssuePickFailedMessageParser implements IMessageParser const count = k.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { const _local_4 = k.readInt(); const _local_5 = k.readInt(); diff --git a/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts b/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts index 55f5c2c2..6515bae8 100644 --- a/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts +++ b/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ModerationCautionParser implements IMessageParser { @@ -15,7 +15,7 @@ export class ModerationCautionParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._message = wrapper.readString(); this._url = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/moderation/ModeratorActionResultMessageParser.ts b/src/nitro/communication/messages/parser/moderation/ModeratorActionResultMessageParser.ts index 1c618b69..8d1079fe 100644 --- a/src/nitro/communication/messages/parser/moderation/ModeratorActionResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/ModeratorActionResultMessageParser.ts @@ -1,10 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ModeratorActionResultMessageParser implements IMessageParser { - private _userId:number; - private _success:boolean; + private _userId: number; + private _success: boolean; public flush(): boolean { @@ -21,12 +20,12 @@ export class ModeratorActionResultMessageParser implements IMessageParser return true; } - public get userId():number + public get userId(): number { return this._userId; } - public get success():boolean + public get success(): boolean { return this._success; } diff --git a/src/nitro/communication/messages/parser/moderation/ModeratorInitData.ts b/src/nitro/communication/messages/parser/moderation/ModeratorInitData.ts index 867aa41f..1713cb26 100644 --- a/src/nitro/communication/messages/parser/moderation/ModeratorInitData.ts +++ b/src/nitro/communication/messages/parser/moderation/ModeratorInitData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { IssueInfoMessageParser } from './IssueInfoMessageParser'; import { IssueMessageData } from './IssueMessageData'; @@ -6,7 +6,7 @@ export class ModeratorInitData { private _messageTemplates: string[]; private _roomMessageTemplates: string[]; - private _issues:IssueMessageData[]; + private _issues: IssueMessageData[]; private _cfhPermission: boolean; private _chatlogsPermission: boolean; private _alertPermission: boolean; @@ -22,13 +22,13 @@ export class ModeratorInitData const local2 = new IssueInfoMessageParser(); this._issues = []; this._messageTemplates = []; - this._roomMessageTemplates= []; + this._roomMessageTemplates = []; let local3 = wrapper.readInt(); let i = 0; - while(i < local3) + while (i < local3) { - if(local2.parse(wrapper)) + if (local2.parse(wrapper)) { this._issues.push(local2.issueData); } @@ -37,7 +37,7 @@ export class ModeratorInitData local3 = wrapper.readInt(); i = 0; - while(i < local3) + while (i < local3) { this._messageTemplates.push(wrapper.readString()); i++; @@ -45,7 +45,7 @@ export class ModeratorInitData local3 = wrapper.readInt(); i = 0; - while(i < local3) + while (i < local3) { wrapper.readString(); i++; @@ -60,7 +60,7 @@ export class ModeratorInitData this._roomKickPermission = wrapper.readBoolean(); local3 = wrapper.readInt(); i = 0; - while(i < local3) + while (i < local3) { this._roomMessageTemplates.push(wrapper.readString()); i++; @@ -68,9 +68,9 @@ export class ModeratorInitData } - public dispose():void + public dispose(): void { - if(this._disposed) + if (this._disposed) { return; } @@ -95,7 +95,7 @@ export class ModeratorInitData return this._roomMessageTemplates; } - public get issues():IssueMessageData[] + public get issues(): IssueMessageData[] { return this._issues; } diff --git a/src/nitro/communication/messages/parser/moderation/ModeratorInitMessageParser.ts b/src/nitro/communication/messages/parser/moderation/ModeratorInitMessageParser.ts index f189bdf0..3ed80902 100644 --- a/src/nitro/communication/messages/parser/moderation/ModeratorInitMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/ModeratorInitMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { ModeratorInitData } from './ModeratorInitData'; export class ModeratorInitMessageParser implements IMessageParser diff --git a/src/nitro/communication/messages/parser/moderation/ModeratorMessageParser.ts b/src/nitro/communication/messages/parser/moderation/ModeratorMessageParser.ts index bd442b34..d37fe11a 100644 --- a/src/nitro/communication/messages/parser/moderation/ModeratorMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/ModeratorMessageParser.ts @@ -1,10 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ModeratorMessageParser implements IMessageParser { - private _message:string; - private _url:string; + private _message: string; + private _url: string; public flush(): boolean { @@ -16,7 +15,7 @@ export class ModeratorMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._message = wrapper.readString(); this._url = wrapper.readString(); @@ -24,12 +23,12 @@ export class ModeratorMessageParser implements IMessageParser return true; } - public get message():string + public get message(): string { return this._message; } - public get url():string + public get url(): string { return this._url; } diff --git a/src/nitro/communication/messages/parser/moderation/ModeratorRoomInfoMessageParser.ts b/src/nitro/communication/messages/parser/moderation/ModeratorRoomInfoMessageParser.ts index 8d8ea6cc..d15da50c 100644 --- a/src/nitro/communication/messages/parser/moderation/ModeratorRoomInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/ModeratorRoomInfoMessageParser.ts @@ -1,9 +1,9 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { RoomModerationData } from '../../incoming/moderation/RoomModerationData'; export class ModeratorRoomInfoMessageParser implements IMessageParser { - private _data:RoomModerationData; + private _data: RoomModerationData; public flush(): boolean { @@ -14,14 +14,14 @@ export class ModeratorRoomInfoMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new RoomModerationData(wrapper); return true; } - public get data():RoomModerationData + public get data(): RoomModerationData { return this._data; } diff --git a/src/nitro/communication/messages/parser/moderation/ModeratorToolPreferencesMessageParser.ts b/src/nitro/communication/messages/parser/moderation/ModeratorToolPreferencesMessageParser.ts index e38707fd..daade995 100644 --- a/src/nitro/communication/messages/parser/moderation/ModeratorToolPreferencesMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/ModeratorToolPreferencesMessageParser.ts @@ -1,14 +1,13 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ModeratorToolPreferencesMessageParser implements IMessageParser { - private _windowX:number; - private _windowY:number; - private _windowWidth:number; - private _windowHeight:number; + private _windowX: number; + private _windowY: number; + private _windowWidth: number; + private _windowHeight: number; - public flush():boolean + public flush(): boolean { this._windowX = 0; this._windowY = 0; @@ -17,7 +16,7 @@ export class ModeratorToolPreferencesMessageParser implements IMessageParser return true; } - public parse(k:IMessageDataWrapper):boolean + public parse(k: IMessageDataWrapper): boolean { this._windowX = k.readInt(); this._windowY = k.readInt(); diff --git a/src/nitro/communication/messages/parser/moderation/ModeratorUserInfoMessageParser.ts b/src/nitro/communication/messages/parser/moderation/ModeratorUserInfoMessageParser.ts index e5055f0a..01aec884 100644 --- a/src/nitro/communication/messages/parser/moderation/ModeratorUserInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/ModeratorUserInfoMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { ModeratorUserInfoData } from '../../incoming/moderation/ModeratorUserInfoData'; export class ModeratorUserInfoMessageParser implements IMessageParser @@ -14,7 +14,7 @@ export class ModeratorUserInfoMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new ModeratorUserInfoData(wrapper); diff --git a/src/nitro/communication/messages/parser/moderation/PatternMatchData.ts b/src/nitro/communication/messages/parser/moderation/PatternMatchData.ts index a73a2d74..de99ee2e 100644 --- a/src/nitro/communication/messages/parser/moderation/PatternMatchData.ts +++ b/src/nitro/communication/messages/parser/moderation/PatternMatchData.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IDisposable } from '../../../../../core/common/disposable/IDisposable'; +import { IDisposable, IMessageDataWrapper } from '../../../../../api'; export class PatternMatchData implements IDisposable { @@ -8,14 +7,14 @@ export class PatternMatchData implements IDisposable private _endIndex: number; private _disposed: boolean = false; - constructor(k:IMessageDataWrapper) + constructor(k: IMessageDataWrapper) { this._pattern = k.readString(); this._startIndex = k.readInt(); this._endIndex = k.readInt(); } - public dispose():void + public dispose(): void { this._disposed = true; this._pattern = ''; diff --git a/src/nitro/communication/messages/parser/moderation/RoomChatlogMessageParser.ts b/src/nitro/communication/messages/parser/moderation/RoomChatlogMessageParser.ts index 499fbd7b..56fa74b3 100644 --- a/src/nitro/communication/messages/parser/moderation/RoomChatlogMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/RoomChatlogMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { ChatRecordData } from '../../incoming/moderation/ChatRecordData'; export class RoomChatlogMessageParser implements IMessageParser @@ -13,7 +13,7 @@ export class RoomChatlogMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new ChatRecordData(wrapper); diff --git a/src/nitro/communication/messages/parser/moderation/RoomVisitsMessageParser.ts b/src/nitro/communication/messages/parser/moderation/RoomVisitsMessageParser.ts index ae84378b..db04e421 100644 --- a/src/nitro/communication/messages/parser/moderation/RoomVisitsMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/RoomVisitsMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { RoomVisitsData } from '../../incoming/moderation/RoomVisitsData'; export class RoomVisitsMessageParser implements IMessageParser diff --git a/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts b/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts index 5dc48dd2..79f77c55 100644 --- a/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class UserBannedMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class UserBannedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._message = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/moderation/UserChatlogMessageParser.ts b/src/nitro/communication/messages/parser/moderation/UserChatlogMessageParser.ts index 0b4515d0..2b7427b8 100644 --- a/src/nitro/communication/messages/parser/moderation/UserChatlogMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/UserChatlogMessageParser.ts @@ -1,9 +1,9 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { UserChatlogData } from '../../incoming/moderation/UserChatlogData'; export class UserChatlogMessageParser implements IMessageParser { - private _data:UserChatlogData; + private _data: UserChatlogData; public flush(): boolean { @@ -14,14 +14,14 @@ export class UserChatlogMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new UserChatlogData(wrapper); return true; } - public get data():UserChatlogData + public get data(): UserChatlogData { return this._data; } diff --git a/src/nitro/communication/messages/parser/mysterybox/MysteryBoxKeysParser.ts b/src/nitro/communication/messages/parser/mysterybox/MysteryBoxKeysParser.ts index 97a38074..dcda6c54 100644 --- a/src/nitro/communication/messages/parser/mysterybox/MysteryBoxKeysParser.ts +++ b/src/nitro/communication/messages/parser/mysterybox/MysteryBoxKeysParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MysteryBoxKeysParser implements IMessageParser { @@ -15,7 +15,7 @@ export class MysteryBoxKeysParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._boxColor = wrapper.readString(); this._keyColor = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/navigator/CanCreateRoomEventParser.ts b/src/nitro/communication/messages/parser/navigator/CanCreateRoomEventParser.ts index 5d7c478b..0c19c39d 100644 --- a/src/nitro/communication/messages/parser/navigator/CanCreateRoomEventParser.ts +++ b/src/nitro/communication/messages/parser/navigator/CanCreateRoomEventParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CanCreateRoomEventParser implements IMessageParser { @@ -16,7 +15,7 @@ export class CanCreateRoomEventParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._canCreate = wrapper.readBoolean(); this._errorCode = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/CanCreateRoomMessageParser.ts b/src/nitro/communication/messages/parser/navigator/CanCreateRoomMessageParser.ts index a1d84591..34d2f2f2 100644 --- a/src/nitro/communication/messages/parser/navigator/CanCreateRoomMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/CanCreateRoomMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class CanCreateRoomMessageParser implements IMessageParser { @@ -16,7 +15,7 @@ export class CanCreateRoomMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._resultCode = wrapper.readInt(); this._roomLimit = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/CategoriesWithVisitorCountParser.ts b/src/nitro/communication/messages/parser/navigator/CategoriesWithVisitorCountParser.ts index 2d4b27b2..069f6803 100644 --- a/src/nitro/communication/messages/parser/navigator/CategoriesWithVisitorCountParser.ts +++ b/src/nitro/communication/messages/parser/navigator/CategoriesWithVisitorCountParser.ts @@ -1,10 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CategoriesWithVisitorCountData } from './utils/CategoriesWithVisitorCountData'; export class CategoriesWithVisitorCountParser implements IMessageParser { - private _data:CategoriesWithVisitorCountData; + private _data: CategoriesWithVisitorCountData; public flush(): boolean { @@ -13,14 +12,14 @@ export class CategoriesWithVisitorCountParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new CategoriesWithVisitorCountData(wrapper); return true; } - public get data():CategoriesWithVisitorCountData + public get data(): CategoriesWithVisitorCountData { return this._data; } diff --git a/src/nitro/communication/messages/parser/navigator/CompetitionRoomsDataMessageParser.ts b/src/nitro/communication/messages/parser/navigator/CompetitionRoomsDataMessageParser.ts index c56fe2a5..65111b20 100644 --- a/src/nitro/communication/messages/parser/navigator/CompetitionRoomsDataMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/CompetitionRoomsDataMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { CompetitionRoomsData } from './utils/CompetitionRoomsData'; export class CompetitionRoomsDataMessageParser implements IMessageParser @@ -13,14 +12,14 @@ export class CompetitionRoomsDataMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new CompetitionRoomsData(wrapper); return true; } - public get data():CompetitionRoomsData + public get data(): CompetitionRoomsData { return this._data; } diff --git a/src/nitro/communication/messages/parser/navigator/ConvertedRoomIdMessageParser.ts b/src/nitro/communication/messages/parser/navigator/ConvertedRoomIdMessageParser.ts index 427f375f..26f70117 100644 --- a/src/nitro/communication/messages/parser/navigator/ConvertedRoomIdMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/ConvertedRoomIdMessageParser.ts @@ -1,10 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ConvertedRoomIdMessageParser implements IMessageParser { - private _globalId:string; - private _convertedId:number; + private _globalId: string; + private _convertedId: number; public flush(): boolean { @@ -13,7 +12,7 @@ export class ConvertedRoomIdMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._globalId = wrapper.readString(); this._convertedId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/DoorbellMessageParser.ts b/src/nitro/communication/messages/parser/navigator/DoorbellMessageParser.ts index cf9d3e98..ae015d95 100644 --- a/src/nitro/communication/messages/parser/navigator/DoorbellMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/DoorbellMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class DoorbellMessageParser implements IMessageParser { @@ -14,7 +13,7 @@ export class DoorbellMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/navigator/FavouriteChangedMessageParser.ts b/src/nitro/communication/messages/parser/navigator/FavouriteChangedMessageParser.ts index b2374ab0..eeeda527 100644 --- a/src/nitro/communication/messages/parser/navigator/FavouriteChangedMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/FavouriteChangedMessageParser.ts @@ -1,10 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FavouriteChangedMessageParser implements IMessageParser { - private _flatId:number; - private _added:boolean; + private _flatId: number; + private _added: boolean; public flush(): boolean { @@ -13,7 +12,7 @@ export class FavouriteChangedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._flatId = wrapper.readInt(); this._added = wrapper.readBoolean(); @@ -21,12 +20,12 @@ export class FavouriteChangedMessageParser implements IMessageParser return true; } - public get flatId():number + public get flatId(): number { return this._flatId; } - public get added():boolean + public get added(): boolean { return this._added; } diff --git a/src/nitro/communication/messages/parser/navigator/FavouritesMessageParser.ts b/src/nitro/communication/messages/parser/navigator/FavouritesMessageParser.ts index a98e44e9..751960da 100644 --- a/src/nitro/communication/messages/parser/navigator/FavouritesMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/FavouritesMessageParser.ts @@ -1,10 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FavouritesMessageParser implements IMessageParser { - private _limit:number; - private _favouriteRoomIds:number[]; + private _limit: number; + private _favouriteRoomIds: number[]; public flush(): boolean { @@ -13,14 +12,14 @@ export class FavouritesMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._favouriteRoomIds = []; this._limit = wrapper.readInt(); const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._favouriteRoomIds.push(wrapper.readInt()); } diff --git a/src/nitro/communication/messages/parser/navigator/FlatAccessDeniedMessageParser.ts b/src/nitro/communication/messages/parser/navigator/FlatAccessDeniedMessageParser.ts index 1f7e810e..03c7e239 100644 --- a/src/nitro/communication/messages/parser/navigator/FlatAccessDeniedMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/FlatAccessDeniedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FlatAccessDeniedMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class FlatAccessDeniedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/navigator/FlatCreatedMessageParser.ts b/src/nitro/communication/messages/parser/navigator/FlatCreatedMessageParser.ts index 23d0f28d..59d7687b 100644 --- a/src/nitro/communication/messages/parser/navigator/FlatCreatedMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/FlatCreatedMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FlatCreatedMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class FlatCreatedMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._roomName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/navigator/GetGuestRoomResultMessageParser.ts b/src/nitro/communication/messages/parser/navigator/GetGuestRoomResultMessageParser.ts index 766879a1..68d3d965 100644 --- a/src/nitro/communication/messages/parser/navigator/GetGuestRoomResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/GetGuestRoomResultMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageParser } from '../../../../../././core/communication/messages/IMessageParser'; -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { RoomChatSettings } from '../../incoming/roomsettings/RoomChatSettings'; import { RoomModerationSettings } from '../../incoming/roomsettings/RoomModerationSettings'; import { RoomDataParser } from '../room/data/RoomDataParser'; @@ -29,7 +28,7 @@ export class GetGuestRoomResultMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomEnter = wrapper.readBoolean(); this._data = new RoomDataParser(wrapper); diff --git a/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts b/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts index 44941d0b..e02b83d3 100644 --- a/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts @@ -1,10 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { GuestRoomSearchResultData } from './utils/GuestRoomSearchResultData'; export class GuestRoomSearchResultMessageParser implements IMessageParser { - _data:GuestRoomSearchResultData; + _data: GuestRoomSearchResultData; public flush(): boolean { @@ -14,14 +13,14 @@ export class GuestRoomSearchResultMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new GuestRoomSearchResultData(wrapper); return true; } - public get data():GuestRoomSearchResultData + public get data(): GuestRoomSearchResultData { return this._data; } diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorCategoryDataParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorCategoryDataParser.ts index 3e46ba5f..2ae59ddc 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorCategoryDataParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorCategoryDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class NavigatorCategoryDataParser { @@ -12,7 +12,7 @@ export class NavigatorCategoryDataParser constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -33,7 +33,7 @@ export class NavigatorCategoryDataParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._id = wrapper.readInt(); this._name = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorCollapsedParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorCollapsedParser.ts index 44af5b81..dea64567 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorCollapsedParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorCollapsedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NavigatorCollapsedParser implements IMessageParser { @@ -13,11 +13,11 @@ export class NavigatorCollapsedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalCategories = wrapper.readInt(); - while(totalCategories > 0) + while (totalCategories > 0) { this._categories.push(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoryDataParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoryDataParser.ts index 58e8fc6d..cc6764a0 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoryDataParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoryDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class NavigatorEventCategoryDataParser { @@ -8,7 +8,7 @@ export class NavigatorEventCategoryDataParser constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -25,7 +25,7 @@ export class NavigatorEventCategoryDataParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._id = wrapper.readInt(); this._name = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorHomeRoomParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorHomeRoomParser.ts index 10f93a45..d1725351 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorHomeRoomParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorHomeRoomParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NavigatorHomeRoomParser implements IMessageParser { @@ -15,7 +15,7 @@ export class NavigatorHomeRoomParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._homeRoomId = wrapper.readInt(); this._roomIdToEnter = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorLiftedDataParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorLiftedDataParser.ts index 1513f6c8..99a0ba5b 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorLiftedDataParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorLiftedDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class NavigatorLiftedDataParser { @@ -9,7 +9,7 @@ export class NavigatorLiftedDataParser constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -27,7 +27,7 @@ export class NavigatorLiftedDataParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._areaId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorLiftedParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorLiftedParser.ts index a1584721..074a0c9e 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorLiftedParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorLiftedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { NavigatorLiftedDataParser } from './NavigatorLiftedDataParser'; export class NavigatorLiftedParser implements IMessageParser @@ -14,11 +14,11 @@ export class NavigatorLiftedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalRooms = wrapper.readInt(); - while(totalRooms > 0) + while (totalRooms > 0) { this._rooms.push(new NavigatorLiftedDataParser(wrapper)); diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorMetadataParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorMetadataParser.ts index 2ead4b5c..126566b6 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorMetadataParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorMetadataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { NavigatorTopLevelContext } from './utils/NavigatorTopLevelContext'; export class NavigatorMetadataParser implements IMessageParser @@ -14,11 +14,11 @@ export class NavigatorMetadataParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalContexts = wrapper.readInt(); - while(totalContexts > 0) + while (totalContexts > 0) { this._topLevelContexts.push(new NavigatorTopLevelContext(wrapper)); diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorOpenRoomCreatorParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorOpenRoomCreatorParser.ts index 58d08ffb..16274b84 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorOpenRoomCreatorParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorOpenRoomCreatorParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NavigatorOpenRoomCreatorParser implements IMessageParser { @@ -9,7 +9,7 @@ export class NavigatorOpenRoomCreatorParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorSearchParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorSearchParser.ts index 7acb7612..865715b6 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorSearchParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorSearchParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { NavigatorSearchResultSet } from './utils/NavigatorSearchResultSet'; export class NavigatorSearchParser implements IMessageParser @@ -14,7 +14,7 @@ export class NavigatorSearchParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._result = new NavigatorSearchResultSet(wrapper); diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorSearchesParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorSearchesParser.ts index c116ffc9..4ee8abea 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorSearchesParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorSearchesParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { NavigatorSavedSearch } from './utils/NavigatorSavedSearch'; export class NavigatorSearchesParser implements IMessageParser @@ -14,11 +14,11 @@ export class NavigatorSearchesParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalSearches = wrapper.readInt(); - while(totalSearches > 0) + while (totalSearches > 0) { this._searches.push(new NavigatorSavedSearch(wrapper)); diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorSettingsParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorSettingsParser.ts index d630e177..6840c883 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorSettingsParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorSettingsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NavigatorSettingsParser implements IMessageParser { @@ -23,7 +23,7 @@ export class NavigatorSettingsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._windowX = wrapper.readInt(); this._windowY = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts b/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts index 8e12c477..69b2e79e 100644 --- a/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class RoomEventCancelMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/navigator/RoomEventMessageParser.ts b/src/nitro/communication/messages/parser/navigator/RoomEventMessageParser.ts index d2bfc0e4..4453ca17 100644 --- a/src/nitro/communication/messages/parser/navigator/RoomEventMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/RoomEventMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { RoomEventData } from './utils/RoomEventData'; export class RoomEventMessageParser implements IMessageParser diff --git a/src/nitro/communication/messages/parser/navigator/RoomSettingsUpdatedParser.ts b/src/nitro/communication/messages/parser/navigator/RoomSettingsUpdatedParser.ts index 592fe611..dce922b6 100644 --- a/src/nitro/communication/messages/parser/navigator/RoomSettingsUpdatedParser.ts +++ b/src/nitro/communication/messages/parser/navigator/RoomSettingsUpdatedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class RoomSettingsUpdatedParser implements IMessageParser { @@ -13,7 +13,7 @@ export class RoomSettingsUpdatedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts b/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts index 801a3215..de427bbe 100644 --- a/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts @@ -1,10 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class RoomThumbnailUpdateResultMessageParser implements IMessageParser { - private _flatId:number; - private _resultCode:number; + private _flatId: number; + private _resultCode: number; flush(): boolean { @@ -18,12 +17,12 @@ export class RoomThumbnailUpdateResultMessageParser implements IMessageParser return true; } - public get flatId():number + public get flatId(): number { return this._flatId; } - public get resultCode():number + public get resultCode(): number { return this._resultCode; } diff --git a/src/nitro/communication/messages/parser/navigator/UserEventCatsMessageParser.ts b/src/nitro/communication/messages/parser/navigator/UserEventCatsMessageParser.ts index 20496dd4..f768dcda 100644 --- a/src/nitro/communication/messages/parser/navigator/UserEventCatsMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/UserEventCatsMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { NavigatorEventCategoryDataParser } from './NavigatorEventCategoryDataParser'; export class UserEventCatsMessageParser implements IMessageParser @@ -14,11 +14,11 @@ export class UserEventCatsMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalCategories = wrapper.readInt(); - while(totalCategories > 0) + while (totalCategories > 0) { this._categories.push(new NavigatorEventCategoryDataParser(wrapper)); diff --git a/src/nitro/communication/messages/parser/navigator/UserFlatCatsMessageParser.ts b/src/nitro/communication/messages/parser/navigator/UserFlatCatsMessageParser.ts index 26a33c69..4c5e4ddf 100644 --- a/src/nitro/communication/messages/parser/navigator/UserFlatCatsMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/UserFlatCatsMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { NavigatorCategoryDataParser } from './NavigatorCategoryDataParser'; export class UserFlatCatsMessageParser implements IMessageParser @@ -14,11 +14,11 @@ export class UserFlatCatsMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalCategories = wrapper.readInt(); - while(totalCategories > 0) + while (totalCategories > 0) { this._categories.push(new NavigatorCategoryDataParser(wrapper)); diff --git a/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts b/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts index 2c33303d..10d57de8 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts @@ -1,9 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../../api'; export class CategoriesWithVisitorCountData { - private _categoryToCurrentUserCountMap:Map; - private _categoryToMaxUserCountMap:Map; + private _categoryToCurrentUserCountMap: Map; + private _categoryToMaxUserCountMap: Map; constructor(k: IMessageDataWrapper) { @@ -12,7 +12,7 @@ export class CategoriesWithVisitorCountData const count = k.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { const _local_4 = k.readInt(); const _local_5 = k.readInt(); @@ -22,12 +22,12 @@ export class CategoriesWithVisitorCountData } } - public get categoryToCurrentUserCountMap():Map + public get categoryToCurrentUserCountMap(): Map { return this._categoryToCurrentUserCountMap; } - public get categoryToMaxUserCountMap():Map + public get categoryToMaxUserCountMap(): Map { return this._categoryToMaxUserCountMap; } diff --git a/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts b/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts index 6a1a11c6..4c562606 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../../api'; export class CompetitionRoomsData { @@ -6,12 +6,12 @@ export class CompetitionRoomsData private _pageIndex: number; private _pageCount: number; - constructor(k: IMessageDataWrapper, _arg_2:number=0, _arg_3:number=0) + constructor(k: IMessageDataWrapper, _arg_2: number = 0, _arg_3: number = 0) { this._goalId = _arg_2; this._pageIndex = _arg_3; - if(k) + if (k) { this._goalId = k.readInt(); this._pageIndex = k.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts b/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts index 0ca44b8e..18687c77 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts @@ -1,14 +1,14 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../../api'; import { RoomDataParser } from '../../room/data/RoomDataParser'; import { OfficialRoomEntryData } from './OfficialRoomEntryData'; export class GuestRoomSearchResultData { - private _searchType:number; - private _searchParam:string; - private _rooms:RoomDataParser[]; - private _ad:OfficialRoomEntryData; - private _disposed:boolean; + private _searchType: number; + private _searchParam: string; + private _rooms: RoomDataParser[]; + private _ad: OfficialRoomEntryData; + private _disposed: boolean; constructor(k: IMessageDataWrapper) { @@ -16,32 +16,32 @@ export class GuestRoomSearchResultData this._searchType = k.readInt(); this._searchParam = k.readString(); const count = k.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._rooms.push(new RoomDataParser(k)); } const hasAdditional = k.readBoolean(); - if(hasAdditional) + if (hasAdditional) { this._ad = new OfficialRoomEntryData(k); } } - public dispose():void + public dispose(): void { - if(this._disposed) + if (this._disposed) { return; } this._disposed = true; - if(this._rooms != null) + if (this._rooms != null) { - for(const k of this._rooms) + for (const k of this._rooms) { k.flush(); } } - if(this._ad != null) + if (this._ad != null) { this._ad.dispose(); this._ad = null; @@ -49,27 +49,27 @@ export class GuestRoomSearchResultData this._rooms = null; } - public get disposed():boolean + public get disposed(): boolean { return this._disposed; } - public get searchType():number + public get searchType(): number { return this._searchType; } - public get _Str_25185():string + public get _Str_25185(): string { return this._searchParam; } - public get rooms():RoomDataParser[] + public get rooms(): RoomDataParser[] { return this._rooms; } - public get ad():OfficialRoomEntryData + public get ad(): OfficialRoomEntryData { return this._ad; } diff --git a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSavedSearch.ts b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSavedSearch.ts index 26adbc1d..d5cac0b8 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSavedSearch.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSavedSearch.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; export class NavigatorSavedSearch { @@ -9,7 +9,7 @@ export class NavigatorSavedSearch constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -27,7 +27,7 @@ export class NavigatorSavedSearch public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._id = wrapper.readInt(); this._code = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultList.ts b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultList.ts index e9516029..90353f2a 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultList.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultList.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; import { RoomDataParser } from '../../room/data/RoomDataParser'; export class NavigatorSearchResultList @@ -12,7 +12,7 @@ export class NavigatorSearchResultList constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -32,7 +32,7 @@ export class NavigatorSearchResultList public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._code = wrapper.readString(); this._data = wrapper.readString(); @@ -42,7 +42,7 @@ export class NavigatorSearchResultList let totalRooms = wrapper.readInt(); - while(totalRooms > 0) + while (totalRooms > 0) { this._rooms.push(new RoomDataParser(wrapper)); diff --git a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultSet.ts b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultSet.ts index 080b5f43..eca5a3a5 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultSet.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultSet.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; import { NavigatorSearchResultList } from './NavigatorSearchResultList'; export class NavigatorSearchResultSet @@ -9,7 +9,7 @@ export class NavigatorSearchResultSet constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -26,14 +26,14 @@ export class NavigatorSearchResultSet public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._code = wrapper.readString(); this._data = wrapper.readString(); let totalResults = wrapper.readInt(); - while(totalResults > 0) + while (totalResults > 0) { this._results.push(new NavigatorSearchResultList(wrapper)); diff --git a/src/nitro/communication/messages/parser/navigator/utils/NavigatorTopLevelContext.ts b/src/nitro/communication/messages/parser/navigator/utils/NavigatorTopLevelContext.ts index fd87e97a..07f681be 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/NavigatorTopLevelContext.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/NavigatorTopLevelContext.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; import { NavigatorSavedSearch } from './NavigatorSavedSearch'; export class NavigatorTopLevelContext @@ -8,7 +8,7 @@ export class NavigatorTopLevelContext constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -24,13 +24,13 @@ export class NavigatorTopLevelContext public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._code = wrapper.readString(); let totalSavedSearches = wrapper.readInt(); - while(totalSavedSearches > 0) + while (totalSavedSearches > 0) { this._savedSearches.push(new NavigatorSavedSearch(wrapper)); diff --git a/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts b/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts index 43025445..4951678a 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../../api'; import { RoomDataParser } from '../../room'; export class OfficialRoomEntryData @@ -32,13 +32,13 @@ export class OfficialRoomEntryData this._Str_22099 = k.readInt(); this._userCount = k.readInt(); this._type = k.readInt(); - if(this._type == OfficialRoomEntryData._Str_14955) + if (this._type == OfficialRoomEntryData._Str_14955) { this._tag = k.readString(); } else { - if(this._type == OfficialRoomEntryData._Str_12025) + if (this._type == OfficialRoomEntryData._Str_12025) { this._Str_2567 = new RoomDataParser(k); } @@ -51,12 +51,12 @@ export class OfficialRoomEntryData public dispose(): void { - if(this._disposed) + if (this._disposed) { return; } this._disposed = true; - if(this._Str_2567 != null) + if (this._Str_2567 != null) { this._Str_2567.flush(); this._Str_2567 = null; @@ -135,11 +135,11 @@ export class OfficialRoomEntryData public get _Str_23003(): number { - if(this.type == OfficialRoomEntryData._Str_14955) + if (this.type == OfficialRoomEntryData._Str_14955) { return 0; } - if(this.type == OfficialRoomEntryData._Str_12025) + if (this.type == OfficialRoomEntryData._Str_12025) { return this._Str_2567.maxUserCount; } diff --git a/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts b/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts index 568de19d..dfa75f6d 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts @@ -1,20 +1,20 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from "../../../../../../api"; export class RoomEventData { - private _adId:number; - private _ownerAvatarId:number; - private _ownerAvatarName:string; - private _flatId:number; - private _categoryId:number; - private _eventType:number; - private _eventName:string; - private _eventDescription:string; - private _creationTime:string; - private _expirationDate:Date; - private _disposed:boolean; + private _adId: number; + private _ownerAvatarId: number; + private _ownerAvatarName: string; + private _flatId: number; + private _categoryId: number; + private _eventType: number; + private _eventName: string; + private _eventDescription: string; + private _creationTime: string; + private _expirationDate: Date; + private _disposed: boolean; - constructor(k:IMessageDataWrapper) + constructor(k: IMessageDataWrapper) { this._adId = k.readInt(); this._ownerAvatarId = k.readInt(); @@ -25,11 +25,11 @@ export class RoomEventData this._eventDescription = k.readString(); const _local_2 = k.readInt(); const _local_3 = k.readInt(); - const _local_4:Date = new Date(); + const _local_4: Date = new Date(); let _local_5 = _local_4.getTime(); const _local_6 = ((_local_2 * 60) * 1000); _local_5 = (_local_5 - _local_6); - const _local_7:Date = new Date(_local_5); + const _local_7: Date = new Date(_local_5); this._creationTime = ((((((((_local_7.getDate() + '-') + _local_7.getMonth()) + '-') + _local_7.getFullYear()) + ' ') + _local_7.getHours()) + ':') + _local_7.getMinutes()); let _local_8 = _local_4.getTime(); const _local_9 = ((_local_3 * 60) * 1000); @@ -38,66 +38,66 @@ export class RoomEventData this._categoryId = k.readInt(); } - public dispose():void + public dispose(): void { - if(this._disposed) + if (this._disposed) { return; } this._disposed = true; } - public get disposed():boolean + public get disposed(): boolean { return this._disposed; } - public get adId():number + public get adId(): number { return this._adId; } - public get ownerAvatarId():number + public get ownerAvatarId(): number { return this._ownerAvatarId; } - public get ownerAvatarName():string + public get ownerAvatarName(): string { return this._ownerAvatarName; } - public get flatId():number + public get flatId(): number { return this._flatId; } - public get categoryId():number + public get categoryId(): number { return this._categoryId; } - public get eventType():number + public get eventType(): number { return this._eventType; } - public get eventName():string + public get eventName(): string { return this._eventName; } - public get eventDescription():string + public get eventDescription(): string { return this._eventDescription; } - public get creationTime():string + public get creationTime(): string { return this._creationTime; } - public get expirationDate():Date + public get expirationDate(): Date { return this._expirationDate; } diff --git a/src/nitro/communication/messages/parser/notifications/AchievementNotificationMessageParser.ts b/src/nitro/communication/messages/parser/notifications/AchievementNotificationMessageParser.ts index 730d41a4..c34d4f22 100644 --- a/src/nitro/communication/messages/parser/notifications/AchievementNotificationMessageParser.ts +++ b/src/nitro/communication/messages/parser/notifications/AchievementNotificationMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { AchievementLevelUpData } from '../../incoming'; export class AchievementNotificationMessageParser implements IMessageParser @@ -14,7 +14,7 @@ export class AchievementNotificationMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new AchievementLevelUpData(wrapper); diff --git a/src/nitro/communication/messages/parser/notifications/ActivityPointNotificationParser.ts b/src/nitro/communication/messages/parser/notifications/ActivityPointNotificationParser.ts index 738da5fc..a24d585b 100644 --- a/src/nitro/communication/messages/parser/notifications/ActivityPointNotificationParser.ts +++ b/src/nitro/communication/messages/parser/notifications/ActivityPointNotificationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ActivityPointNotificationParser implements IMessageParser { @@ -17,7 +17,7 @@ export class ActivityPointNotificationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._amount = wrapper.readInt(); this._amountChanged = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/notifications/BotErrorEventParser.ts b/src/nitro/communication/messages/parser/notifications/BotErrorEventParser.ts index 7a500b9a..403396ff 100644 --- a/src/nitro/communication/messages/parser/notifications/BotErrorEventParser.ts +++ b/src/nitro/communication/messages/parser/notifications/BotErrorEventParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class BotErrorEventParser implements IMessageParser { @@ -12,7 +12,7 @@ export class BotErrorEventParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._errorCode = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/notifications/ClubGiftNotificationParser.ts b/src/nitro/communication/messages/parser/notifications/ClubGiftNotificationParser.ts index 28cb5d95..bff1ed07 100644 --- a/src/nitro/communication/messages/parser/notifications/ClubGiftNotificationParser.ts +++ b/src/nitro/communication/messages/parser/notifications/ClubGiftNotificationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ClubGiftNotificationParser implements IMessageParser { @@ -13,7 +13,7 @@ export class ClubGiftNotificationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._numGifts = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/notifications/HabboBroadcastMessageParser.ts b/src/nitro/communication/messages/parser/notifications/HabboBroadcastMessageParser.ts index 07d37fee..0521d153 100644 --- a/src/nitro/communication/messages/parser/notifications/HabboBroadcastMessageParser.ts +++ b/src/nitro/communication/messages/parser/notifications/HabboBroadcastMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class HabboBroadcastMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class HabboBroadcastMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._message = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/notifications/HotelWillShutdownParser.ts b/src/nitro/communication/messages/parser/notifications/HotelWillShutdownParser.ts index 27acb3db..e04be7d9 100644 --- a/src/nitro/communication/messages/parser/notifications/HotelWillShutdownParser.ts +++ b/src/nitro/communication/messages/parser/notifications/HotelWillShutdownParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class HotelWillShutdownParser implements IMessageParser { @@ -13,7 +13,7 @@ export class HotelWillShutdownParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._minutes = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/notifications/InfoFeedEnableMessageParser.ts b/src/nitro/communication/messages/parser/notifications/InfoFeedEnableMessageParser.ts index bbed11b5..4fed97d1 100644 --- a/src/nitro/communication/messages/parser/notifications/InfoFeedEnableMessageParser.ts +++ b/src/nitro/communication/messages/parser/notifications/InfoFeedEnableMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class InfoFeedEnableMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class InfoFeedEnableMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._enabled = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/notifications/MOTDNotificationParser.ts b/src/nitro/communication/messages/parser/notifications/MOTDNotificationParser.ts index 1d13a3fd..25462921 100644 --- a/src/nitro/communication/messages/parser/notifications/MOTDNotificationParser.ts +++ b/src/nitro/communication/messages/parser/notifications/MOTDNotificationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MOTDNotificationParser implements IMessageParser { @@ -13,11 +13,11 @@ export class MOTDNotificationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalMessages = wrapper.readInt(); - while(totalMessages > 0) + while (totalMessages > 0) { this._messages.push(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/notifications/NotificationDialogMessageParser.ts b/src/nitro/communication/messages/parser/notifications/NotificationDialogMessageParser.ts index 979fcc07..d4b114aa 100644 --- a/src/nitro/communication/messages/parser/notifications/NotificationDialogMessageParser.ts +++ b/src/nitro/communication/messages/parser/notifications/NotificationDialogMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NotificationDialogMessageParser implements IMessageParser { @@ -15,13 +15,13 @@ export class NotificationDialogMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._type = wrapper.readString(); let totalParameters = wrapper.readInt(); - while(totalParameters > 0) + while (totalParameters > 0) { this._parameters.set(wrapper.readString(), wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/notifications/PetLevelNotificationParser.ts b/src/nitro/communication/messages/parser/notifications/PetLevelNotificationParser.ts index 44b1e33f..959f7586 100644 --- a/src/nitro/communication/messages/parser/notifications/PetLevelNotificationParser.ts +++ b/src/nitro/communication/messages/parser/notifications/PetLevelNotificationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { PetFigureDataParser } from '../inventory/pets/PetFigureDataParser'; export class PetLevelNotificationParser implements IMessageParser @@ -20,7 +20,7 @@ export class PetLevelNotificationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._petId = wrapper.readInt(); this._petName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/notifications/PetPlacingErrorEventParser.ts b/src/nitro/communication/messages/parser/notifications/PetPlacingErrorEventParser.ts index d9df9f45..381bf232 100644 --- a/src/nitro/communication/messages/parser/notifications/PetPlacingErrorEventParser.ts +++ b/src/nitro/communication/messages/parser/notifications/PetPlacingErrorEventParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class PetPlacingErrorEventParser implements IMessageParser { @@ -12,7 +12,7 @@ export class PetPlacingErrorEventParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._errorCode = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/notifications/UnseenItemsParser.ts b/src/nitro/communication/messages/parser/notifications/UnseenItemsParser.ts index ab26c8ea..1bb4fb33 100644 --- a/src/nitro/communication/messages/parser/notifications/UnseenItemsParser.ts +++ b/src/nitro/communication/messages/parser/notifications/UnseenItemsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { AdvancedMap } from '../../../../../core/utils/AdvancedMap'; export class UnseenItemsParser implements IMessageParser @@ -14,18 +14,18 @@ export class UnseenItemsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalUnseen = wrapper.readInt(); - while(totalUnseen > 0) + while (totalUnseen > 0) { const category = wrapper.readInt(); let totalItems = wrapper.readInt(); const itemIds: number[] = []; - while(totalItems > 0) + while (totalItems > 0) { itemIds.push(wrapper.readInt()); diff --git a/src/nitro/communication/messages/parser/perk/PerkAllowancesMessageParser.ts b/src/nitro/communication/messages/parser/perk/PerkAllowancesMessageParser.ts index b1b41cd8..b9593a74 100644 --- a/src/nitro/communication/messages/parser/perk/PerkAllowancesMessageParser.ts +++ b/src/nitro/communication/messages/parser/perk/PerkAllowancesMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { PerkData } from './common/PerkData'; export class PerkAllowancesMessageParser implements IMessageParser @@ -14,13 +14,13 @@ export class PerkAllowancesMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._perks = []; const size: number = wrapper.readInt(); - for(let i = 0; i < size; i++) this._perks.push(new PerkData( + for (let i = 0; i < size; i++) this._perks.push(new PerkData( wrapper.readString(), wrapper.readString(), wrapper.readBoolean() @@ -33,9 +33,9 @@ export class PerkAllowancesMessageParser implements IMessageParser { let allowed = false; - for(const perk of this._perks) + for (const perk of this._perks) { - if(perk.code === perkCode) + if (perk.code === perkCode) { allowed = perk.isAllowed; break; diff --git a/src/nitro/communication/messages/parser/poll/PollContentsParser.ts b/src/nitro/communication/messages/parser/poll/PollContentsParser.ts index c298a9fc..19298313 100644 --- a/src/nitro/communication/messages/parser/poll/PollContentsParser.ts +++ b/src/nitro/communication/messages/parser/poll/PollContentsParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { PollChoice } from './PollChoice'; import { PollQuestion } from './PollQuestion'; @@ -9,7 +8,7 @@ export class PollContentsParser implements IMessageParser private _startMessage = ''; private _endMessage = ''; private _numQuestions = 0; - private _questionArray:PollQuestion[] = []; + private _questionArray: PollQuestion[] = []; private _npsPoll = false; flush(): boolean @@ -29,12 +28,12 @@ export class PollContentsParser implements IMessageParser this._endMessage = wrapper.readString(); this._numQuestions = wrapper.readInt(); - for(let i = 0; i < this._numQuestions; i++) + for (let i = 0; i < this._numQuestions; i++) { const question = this.parsePollQuestion(wrapper); const childrenCount = wrapper.readInt(); - for(let j = 0; j < childrenCount; j++) + for (let j = 0; j < childrenCount; j++) { question.children.push(this.parsePollQuestion(wrapper)); } @@ -46,7 +45,7 @@ export class PollContentsParser implements IMessageParser return true; } - private parsePollQuestion(k:IMessageDataWrapper):PollQuestion + private parsePollQuestion(k: IMessageDataWrapper): PollQuestion { const pollQuestion = new PollQuestion(); pollQuestion.questionId = k.readInt(); @@ -56,9 +55,9 @@ export class PollContentsParser implements IMessageParser pollQuestion.questionCategory = k.readInt(); pollQuestion.questionAnswerType = k.readInt(); pollQuestion.questionAnswerCount = k.readInt(); - if(((pollQuestion.questionType == 1) || (pollQuestion.questionType == 2))) + if (((pollQuestion.questionType == 1) || (pollQuestion.questionType == 2))) { - for(let i = 0; i < pollQuestion.questionAnswerCount; i++) + for (let i = 0; i < pollQuestion.questionAnswerCount; i++) { pollQuestion.questionChoices.push(new PollChoice(k.readString(), k.readString(), k.readInt())); } @@ -66,32 +65,32 @@ export class PollContentsParser implements IMessageParser return pollQuestion; } - public get id():number + public get id(): number { return this._id; } - public get startMessage():string + public get startMessage(): string { return this._startMessage; } - public get endMessage():string + public get endMessage(): string { return this._endMessage; } - public get numQuestions():number + public get numQuestions(): number { return this._numQuestions; } - public get questionArray():PollQuestion[] + public get questionArray(): PollQuestion[] { return this._questionArray; } - public get npsPoll():boolean + public get npsPoll(): boolean { return this._npsPoll; } diff --git a/src/nitro/communication/messages/parser/poll/PollErrorParser.ts b/src/nitro/communication/messages/parser/poll/PollErrorParser.ts index 132187a4..72bde35c 100644 --- a/src/nitro/communication/messages/parser/poll/PollErrorParser.ts +++ b/src/nitro/communication/messages/parser/poll/PollErrorParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class PollErrorParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/poll/PollOfferParser.ts b/src/nitro/communication/messages/parser/poll/PollOfferParser.ts index 6f27805d..959248ee 100644 --- a/src/nitro/communication/messages/parser/poll/PollOfferParser.ts +++ b/src/nitro/communication/messages/parser/poll/PollOfferParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class PollOfferParser implements IMessageParser { @@ -25,22 +24,22 @@ export class PollOfferParser implements IMessageParser return true; } - public get id():number + public get id(): number { return this._id; } - public get type():string + public get type(): string { return this._type; } - public get headline():string + public get headline(): string { return this._headline; } - public get summary():string + public get summary(): string { return this._summary; } diff --git a/src/nitro/communication/messages/parser/poll/QuestionAnsweredParser.ts b/src/nitro/communication/messages/parser/poll/QuestionAnsweredParser.ts index e5b26406..09f85649 100644 --- a/src/nitro/communication/messages/parser/poll/QuestionAnsweredParser.ts +++ b/src/nitro/communication/messages/parser/poll/QuestionAnsweredParser.ts @@ -1,11 +1,10 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class QuestionAnsweredParser implements IMessageParser { - private _userId:number; - private _value:string; - private _answerCounts:Map; + private _userId: number; + private _value: string; + private _answerCounts: Map; flush(): boolean { @@ -23,7 +22,7 @@ export class QuestionAnsweredParser implements IMessageParser const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { const key = wrapper.readString(); const value = wrapper.readInt(); @@ -32,17 +31,17 @@ export class QuestionAnsweredParser implements IMessageParser return true; } - public get userId():number + public get userId(): number { return this._userId; } - public get value():string + public get value(): string { return this._value; } - public get answerCounts():Map + public get answerCounts(): Map { return this._answerCounts; } diff --git a/src/nitro/communication/messages/parser/poll/QuestionFinishedParser.ts b/src/nitro/communication/messages/parser/poll/QuestionFinishedParser.ts index da361013..b9be540c 100644 --- a/src/nitro/communication/messages/parser/poll/QuestionFinishedParser.ts +++ b/src/nitro/communication/messages/parser/poll/QuestionFinishedParser.ts @@ -1,10 +1,9 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class QuestionFinishedParser implements IMessageParser { - private _questionId:number; - private _answerCounts:Map; + private _questionId: number; + private _answerCounts: Map; flush(): boolean { @@ -19,7 +18,7 @@ export class QuestionFinishedParser implements IMessageParser this._answerCounts = new Map(); const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { const key = wrapper.readString(); const value = wrapper.readInt(); @@ -28,12 +27,12 @@ export class QuestionFinishedParser implements IMessageParser return true; } - public get questionId():number + public get questionId(): number { return this._questionId; } - public get answerCounts():Map + public get answerCounts(): Map { return this._answerCounts; } diff --git a/src/nitro/communication/messages/parser/poll/QuestionParser.ts b/src/nitro/communication/messages/parser/poll/QuestionParser.ts index 24b76899..9fdca7dd 100644 --- a/src/nitro/communication/messages/parser/poll/QuestionParser.ts +++ b/src/nitro/communication/messages/parser/poll/QuestionParser.ts @@ -1,13 +1,12 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class QuestionParser implements IMessageParser { - private _pollType:string = null; - private _pollId= -1; + private _pollType: string = null; + private _pollId = -1; private _questionId = -1; private _duration = -1; - private _question:IQuestion = null; + private _question: IQuestion = null; flush(): boolean { @@ -33,7 +32,7 @@ export class QuestionParser implements IMessageParser this._question = { id: questionId, number: questionNumber, type: questionType, content: questionContent }; - if(((this._question.type == 1) || (this._question.type == 2))) + if (((this._question.type == 1) || (this._question.type == 2))) { this._question.selection_min = wrapper.readInt(); const count = wrapper.readInt(); @@ -42,7 +41,7 @@ export class QuestionParser implements IMessageParser this._question.selection_count = count; this._question.selection_max = count; - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._question.selection_values.push(wrapper.readString()); this._question.selections.push(wrapper.readString()); @@ -51,27 +50,27 @@ export class QuestionParser implements IMessageParser return true; } - public get pollType():string + public get pollType(): string { return this._pollType; } - public get pollId():number + public get pollId(): number { return this._pollId; } - public get questionId():number + public get questionId(): number { return this._questionId; } - public get duration():number + public get duration(): number { return this._duration; } - public get question():IQuestion + public get question(): IQuestion { return this._question; } diff --git a/src/nitro/communication/messages/parser/quest/CommunityGoalEarnedPrizesMessageParser.ts b/src/nitro/communication/messages/parser/quest/CommunityGoalEarnedPrizesMessageParser.ts index d934a7e7..3b1d9252 100644 --- a/src/nitro/communication/messages/parser/quest/CommunityGoalEarnedPrizesMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/CommunityGoalEarnedPrizesMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { PrizeData } from '../../incoming/quest/PrizeData'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class CommunityGoalEarnedPrizesMessageParser implements IMessageParser { @@ -14,10 +14,10 @@ export class CommunityGoalEarnedPrizesMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._prizes.push(new PrizeData(wrapper)); } diff --git a/src/nitro/communication/messages/parser/quest/CommunityGoalHallOfFameMessageParser.ts b/src/nitro/communication/messages/parser/quest/CommunityGoalHallOfFameMessageParser.ts index 89cc1b13..c6c7a8e7 100644 --- a/src/nitro/communication/messages/parser/quest/CommunityGoalHallOfFameMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/CommunityGoalHallOfFameMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { CommunityGoalHallOfFameData } from '../../incoming/quest/CommunityGoalHallOfFameData'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class CommunityGoalHallOfFameMessageParser implements IMessageParser { @@ -14,7 +14,7 @@ export class CommunityGoalHallOfFameMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new CommunityGoalHallOfFameData(wrapper); return true; diff --git a/src/nitro/communication/messages/parser/quest/CommunityGoalProgressMessageParser.ts b/src/nitro/communication/messages/parser/quest/CommunityGoalProgressMessageParser.ts index 3335b408..9c01a898 100644 --- a/src/nitro/communication/messages/parser/quest/CommunityGoalProgressMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/CommunityGoalProgressMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { CommunityGoalData } from '../../incoming/quest/CommunityGoalData'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class CommunityGoalProgressMessageParser implements IMessageParser { @@ -14,7 +14,7 @@ export class CommunityGoalProgressMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._data = new CommunityGoalData(wrapper); return true; diff --git a/src/nitro/communication/messages/parser/quest/ConcurrentUsersGoalProgressMessageParser.ts b/src/nitro/communication/messages/parser/quest/ConcurrentUsersGoalProgressMessageParser.ts index 30450f37..ac062726 100644 --- a/src/nitro/communication/messages/parser/quest/ConcurrentUsersGoalProgressMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/ConcurrentUsersGoalProgressMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class ConcurrentUsersGoalProgressMessageParser implements IMessageParser { @@ -15,9 +15,9 @@ export class ConcurrentUsersGoalProgressMessageParser implements IMessageParser return true; } - public parse(wrapper:IMessageDataWrapper): boolean + public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._state = wrapper.readInt(); this._userCount = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/quest/EpicPopupMessageParser.ts b/src/nitro/communication/messages/parser/quest/EpicPopupMessageParser.ts index 1d87961f..a74b97f2 100644 --- a/src/nitro/communication/messages/parser/quest/EpicPopupMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/EpicPopupMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class EpicPopupMessageParser implements IMessageParser { @@ -11,9 +11,9 @@ export class EpicPopupMessageParser implements IMessageParser return true; } - public parse(wrapper:IMessageDataWrapper): boolean + public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._imageUri = wrapper.readString(); return true; diff --git a/src/nitro/communication/messages/parser/quest/QuestCancelledMessageParser.ts b/src/nitro/communication/messages/parser/quest/QuestCancelledMessageParser.ts index bf0f1da9..b4756a42 100644 --- a/src/nitro/communication/messages/parser/quest/QuestCancelledMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/QuestCancelledMessageParser.ts @@ -1,5 +1,5 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from './../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; +import { IMessageParser } from './../../../../../api'; export class QuestCancelledMessageParser implements IMessageParser { @@ -10,9 +10,9 @@ export class QuestCancelledMessageParser implements IMessageParser return true; } - public parse(wrapper:IMessageDataWrapper): boolean + public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._expired = wrapper.readBoolean(); return true; diff --git a/src/nitro/communication/messages/parser/quest/QuestCompletedMessageParser.ts b/src/nitro/communication/messages/parser/quest/QuestCompletedMessageParser.ts index 6e52ac2e..e1adc7d9 100644 --- a/src/nitro/communication/messages/parser/quest/QuestCompletedMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/QuestCompletedMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { QuestMessageData } from '../../incoming/quest/QuestMessageData'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class QuestCompletedMessageParser implements IMessageParser { @@ -13,16 +13,16 @@ export class QuestCompletedMessageParser implements IMessageParser return true; } - public parse(wrapper:IMessageDataWrapper): boolean + public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._questData = new QuestMessageData(wrapper); this._showDialog = wrapper.readBoolean(); return true; } - public get questData():QuestMessageData + public get questData(): QuestMessageData { return this._questData; } diff --git a/src/nitro/communication/messages/parser/quest/QuestDailyMessageParser.ts b/src/nitro/communication/messages/parser/quest/QuestDailyMessageParser.ts index d808e942..d42f1def 100644 --- a/src/nitro/communication/messages/parser/quest/QuestDailyMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/QuestDailyMessageParser.ts @@ -1,10 +1,10 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { QuestMessageData } from '../../incoming/quest/QuestMessageData'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class QuestDailyMessageParser implements IMessageParser { - private _quest:QuestMessageData; + private _quest: QuestMessageData; private _easyQuestCount: number; private _hardQuestCount: number; @@ -14,12 +14,12 @@ export class QuestDailyMessageParser implements IMessageParser return true; } - public parse(wrapper:IMessageDataWrapper): boolean + public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const _local_2 = wrapper.readBoolean(); - if(_local_2) + if (_local_2) { this._quest = new QuestMessageData(wrapper); this._easyQuestCount = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/quest/QuestMessageParser.ts b/src/nitro/communication/messages/parser/quest/QuestMessageParser.ts index 79143b96..2dfa9848 100644 --- a/src/nitro/communication/messages/parser/quest/QuestMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/QuestMessageParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { QuestMessageData } from '../../incoming/quest/QuestMessageData'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class QuestMessageParser implements IMessageParser { @@ -12,15 +12,15 @@ export class QuestMessageParser implements IMessageParser return true; } - public parse(wrapper:IMessageDataWrapper): boolean + public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._quest = new QuestMessageData(wrapper); return true; } - public get quest():QuestMessageData + public get quest(): QuestMessageData { return this._quest; } diff --git a/src/nitro/communication/messages/parser/quest/QuestsMessageParser.ts b/src/nitro/communication/messages/parser/quest/QuestsMessageParser.ts index 127bdab1..c8ccb12f 100644 --- a/src/nitro/communication/messages/parser/quest/QuestsMessageParser.ts +++ b/src/nitro/communication/messages/parser/quest/QuestsMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { QuestMessageData } from '../../incoming/quest/QuestMessageData'; export class QuestsMessageParser implements IMessageParser @@ -13,13 +13,13 @@ export class QuestsMessageParser implements IMessageParser return true; } - public parse(wrapper:IMessageDataWrapper): boolean + public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._quests.push(new QuestMessageData(wrapper)); } diff --git a/src/nitro/communication/messages/parser/quest/SeasonalQuestsParser.ts b/src/nitro/communication/messages/parser/quest/SeasonalQuestsParser.ts index fc062f57..b0c1feca 100644 --- a/src/nitro/communication/messages/parser/quest/SeasonalQuestsParser.ts +++ b/src/nitro/communication/messages/parser/quest/SeasonalQuestsParser.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; import { QuestMessageData } from '../../incoming/quest/QuestMessageData'; -import { IMessageParser } from './../../../../../core'; +import { IMessageParser } from './../../../../../api'; export class SeasonalQuestsParser implements IMessageParser { @@ -12,13 +12,13 @@ export class SeasonalQuestsParser implements IMessageParser return true; } - public parse(wrapper:IMessageDataWrapper): boolean + public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._quests.push(new QuestMessageData(wrapper)); } diff --git a/src/nitro/communication/messages/parser/room/access/CantConnectMessageParser.ts b/src/nitro/communication/messages/parser/room/access/CantConnectMessageParser.ts index 6e220435..9356a22b 100644 --- a/src/nitro/communication/messages/parser/room/access/CantConnectMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/access/CantConnectMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class CantConnectMessageParser implements IMessageParser { @@ -20,7 +20,7 @@ export class CantConnectMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._reason = wrapper.readInt(); this._parameter = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/access/RoomEnterParser.ts b/src/nitro/communication/messages/parser/room/access/RoomEnterParser.ts index b52cf962..1b17b20d 100644 --- a/src/nitro/communication/messages/parser/room/access/RoomEnterParser.ts +++ b/src/nitro/communication/messages/parser/room/access/RoomEnterParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomEnterParser implements IMessageParser { @@ -9,7 +9,7 @@ export class RoomEnterParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/room/access/RoomFowardParser.ts b/src/nitro/communication/messages/parser/room/access/RoomFowardParser.ts index 5afe9cac..88b757f3 100644 --- a/src/nitro/communication/messages/parser/room/access/RoomFowardParser.ts +++ b/src/nitro/communication/messages/parser/room/access/RoomFowardParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomFowardParser implements IMessageParser { @@ -13,7 +13,7 @@ export class RoomFowardParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellAcceptedParser.ts b/src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellAcceptedParser.ts index 7ddcd59b..6c20ffaf 100644 --- a/src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellAcceptedParser.ts +++ b/src/nitro/communication/messages/parser/room/access/doorbell/RoomDoorbellAcceptedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class RoomDoorbellAcceptedParser implements IMessageParser { @@ -13,7 +13,7 @@ export class RoomDoorbellAcceptedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/access/rights/RoomRightsClearParser.ts b/src/nitro/communication/messages/parser/room/access/rights/RoomRightsClearParser.ts index 3d74ddb4..995dfaf9 100644 --- a/src/nitro/communication/messages/parser/room/access/rights/RoomRightsClearParser.ts +++ b/src/nitro/communication/messages/parser/room/access/rights/RoomRightsClearParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class RoomRightsClearParser implements IMessageParser { @@ -9,7 +9,7 @@ export class RoomRightsClearParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/room/access/rights/RoomRightsOwnerParser.ts b/src/nitro/communication/messages/parser/room/access/rights/RoomRightsOwnerParser.ts index 13ec5347..a290a04a 100644 --- a/src/nitro/communication/messages/parser/room/access/rights/RoomRightsOwnerParser.ts +++ b/src/nitro/communication/messages/parser/room/access/rights/RoomRightsOwnerParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class RoomRightsOwnerParser implements IMessageParser { @@ -9,7 +9,7 @@ export class RoomRightsOwnerParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/room/access/rights/RoomRightsParser.ts b/src/nitro/communication/messages/parser/room/access/rights/RoomRightsParser.ts index 031a4884..f44f8564 100644 --- a/src/nitro/communication/messages/parser/room/access/rights/RoomRightsParser.ts +++ b/src/nitro/communication/messages/parser/room/access/rights/RoomRightsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; import { RoomControllerLevel } from '../../../../../../session/enum/RoomControllerLevel'; export class RoomRightsParser implements IMessageParser @@ -14,7 +14,7 @@ export class RoomRightsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._controllerLevel = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/bots/BotCommandConfigurationParser.ts b/src/nitro/communication/messages/parser/room/bots/BotCommandConfigurationParser.ts index c03a3d7e..c99e31a7 100644 --- a/src/nitro/communication/messages/parser/room/bots/BotCommandConfigurationParser.ts +++ b/src/nitro/communication/messages/parser/room/bots/BotCommandConfigurationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class BotCommandConfigurationParser implements IMessageParser { @@ -17,7 +17,7 @@ export class BotCommandConfigurationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._botId = wrapper.readInt(); this._commandId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts b/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts index f7149942..e9eb0dc8 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { RoomChatSettings } from '../../../incoming/roomsettings/RoomChatSettings'; export class RoomChatSettingsParser implements IMessageParser @@ -14,7 +14,7 @@ export class RoomChatSettingsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._chat = new RoomChatSettings(wrapper); diff --git a/src/nitro/communication/messages/parser/room/data/RoomDataParser.ts b/src/nitro/communication/messages/parser/room/data/RoomDataParser.ts index 40d1db54..dfa919f0 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomDataParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages'; +import { IMessageDataWrapper } from '../../../../../../api'; export class RoomDataParser { @@ -47,7 +47,7 @@ export class RoomDataParser constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -89,7 +89,7 @@ export class RoomDataParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._roomName = wrapper.readString(); @@ -113,13 +113,13 @@ export class RoomDataParser private parseTags(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._tags = []; let totalTags = wrapper.readInt(); - while(totalTags > 0) + while (totalTags > 0) { this._tags.push(wrapper.readString()); @@ -131,20 +131,20 @@ export class RoomDataParser private parseBitMask(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._bitMask = wrapper.readInt(); - if(this._bitMask & RoomDataParser.THUMBNAIL_BITMASK) this._officialRoomPicRef = wrapper.readString(); + if (this._bitMask & RoomDataParser.THUMBNAIL_BITMASK) this._officialRoomPicRef = wrapper.readString(); - if(this._bitMask & RoomDataParser.GROUPDATA_BITMASK) + if (this._bitMask & RoomDataParser.GROUPDATA_BITMASK) { this._groupId = wrapper.readInt(); this._groupName = wrapper.readString(); this._groupBadge = wrapper.readString(); } - if(this._bitMask & RoomDataParser.ROOMAD_BITMASK) + if (this._bitMask & RoomDataParser.ROOMAD_BITMASK) { this._adName = wrapper.readString(); this._adDescription = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts b/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts index ffdbe51d..06ec1d2d 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomEntryInfoMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomEntryInfoMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._isOwner = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/room/data/RoomScoreParser.ts b/src/nitro/communication/messages/parser/room/data/RoomScoreParser.ts index 2de16339..0f2e22f6 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomScoreParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomScoreParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomScoreParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomScoreParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._totalLikes = wrapper.readInt(); this._canLike = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/room/engine/FavoriteMembershipUpdateMessageParser.ts b/src/nitro/communication/messages/parser/room/engine/FavoriteMembershipUpdateMessageParser.ts index f11a1293..ebb7f288 100644 --- a/src/nitro/communication/messages/parser/room/engine/FavoriteMembershipUpdateMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/engine/FavoriteMembershipUpdateMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class FavoriteMembershipUpdateMessageParser implements IMessageParser { @@ -19,7 +19,7 @@ export class FavoriteMembershipUpdateMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomIndex = wrapper.readInt(); this._groupId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/engine/ObjectsDataUpdateParser.ts b/src/nitro/communication/messages/parser/room/engine/ObjectsDataUpdateParser.ts index e2226218..dc453b0e 100644 --- a/src/nitro/communication/messages/parser/room/engine/ObjectsDataUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/engine/ObjectsDataUpdateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { ObjectData } from '../../../incoming/room/engine/ObjectData'; import { FurnitureDataParser } from '../furniture/FurnitureDataParser'; @@ -15,11 +15,11 @@ export class ObjectsDataUpdateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalObjects = wrapper.readInt(); - while(totalObjects > 0) + while (totalObjects > 0) { const id = wrapper.readInt(); const stuffData = FurnitureDataParser.parseObjectData(wrapper); diff --git a/src/nitro/communication/messages/parser/room/engine/ObjectsRollingParser.ts b/src/nitro/communication/messages/parser/room/engine/ObjectsRollingParser.ts index 0d53a1b6..20746001 100644 --- a/src/nitro/communication/messages/parser/room/engine/ObjectsRollingParser.ts +++ b/src/nitro/communication/messages/parser/room/engine/ObjectsRollingParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { Vector3d } from '../../../../../../room/utils/Vector3d'; import { ObjectRolling } from '../../../../../room/utils/ObjectRolling'; @@ -20,7 +20,7 @@ export class ObjectsRollingParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const x = wrapper.readInt(); const y = wrapper.readInt(); @@ -29,7 +29,7 @@ export class ObjectsRollingParser implements IMessageParser let totalItems = wrapper.readInt(); - while(totalItems > 0) + while (totalItems > 0) { const id = wrapper.readInt(); const height = parseFloat(wrapper.readString()); @@ -43,14 +43,14 @@ export class ObjectsRollingParser implements IMessageParser this._rollerId = wrapper.readInt(); - if(!wrapper.bytesAvailable) return true; + if (!wrapper.bytesAvailable) return true; const movementType = wrapper.readInt(); const unitId = wrapper.readInt(); const height = parseFloat(wrapper.readString()); const nextHeight = parseFloat(wrapper.readString()); - switch(movementType) + switch (movementType) { case 0: break; case 1: diff --git a/src/nitro/communication/messages/parser/room/furniture/CustomUserNotificationMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/CustomUserNotificationMessageParser.ts index 3fca16eb..89819968 100644 --- a/src/nitro/communication/messages/parser/room/furniture/CustomUserNotificationMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/CustomUserNotificationMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class CustomUserNotificationMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class CustomUserNotificationMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._code = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts index ba0d7925..7cb31998 100644 --- a/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class DiceValueMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class DiceValueMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); this._value = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/furniture/FurnitureAliasesParser.ts b/src/nitro/communication/messages/parser/room/furniture/FurnitureAliasesParser.ts index d8da221c..bb931c44 100644 --- a/src/nitro/communication/messages/parser/room/furniture/FurnitureAliasesParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/FurnitureAliasesParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class FurnitureAliasesParser implements IMessageParser { @@ -13,11 +13,11 @@ export class FurnitureAliasesParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalCount = wrapper.readInt(); - while(totalCount > 0) + while (totalCount > 0) { this._aliases.set(wrapper.readString(), wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/room/furniture/FurnitureDataParser.ts b/src/nitro/communication/messages/parser/room/furniture/FurnitureDataParser.ts index 9c3cc7c7..4c2a506e 100644 --- a/src/nitro/communication/messages/parser/room/furniture/FurnitureDataParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/FurnitureDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { IObjectData } from '../../../../../room/object/data/IObjectData'; import { ObjectDataFactory } from '../../../../../room/object/data/ObjectDataFactory'; @@ -17,7 +17,7 @@ export class FurnitureDataParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = parseInt(wrapper.readString()); this._data = FurnitureDataParser.parseObjectData(wrapper); @@ -27,11 +27,11 @@ export class FurnitureDataParser implements IMessageParser public static parseObjectData(wrapper: IMessageDataWrapper): IObjectData { - if(!wrapper) return null; + if (!wrapper) return null; const data = ObjectDataFactory.getData(wrapper.readInt()); - if(!data) return null; + if (!data) return null; data.parseWrapper(wrapper); diff --git a/src/nitro/communication/messages/parser/room/furniture/FurnitureStackHeightParser.ts b/src/nitro/communication/messages/parser/room/furniture/FurnitureStackHeightParser.ts index 8882aa8d..bdd13244 100644 --- a/src/nitro/communication/messages/parser/room/furniture/FurnitureStackHeightParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/FurnitureStackHeightParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class FurnitureStackHeightParser implements IMessageParser { @@ -15,7 +15,7 @@ export class FurnitureStackHeightParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._furniId = wrapper.readInt(); this._height = (wrapper.readInt() / 100); diff --git a/src/nitro/communication/messages/parser/room/furniture/GroupFurniContextMenuInfoMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/GroupFurniContextMenuInfoMessageParser.ts index f7e12f06..57066469 100644 --- a/src/nitro/communication/messages/parser/room/furniture/GroupFurniContextMenuInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/GroupFurniContextMenuInfoMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class GroupFurniContextMenuInfoMessageParser implements IMessageParser { @@ -23,7 +23,7 @@ export class GroupFurniContextMenuInfoMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._objectId = wrapper.readInt(); this._guildId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts index 6365c104..cb5423d5 100644 --- a/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class ItemDataUpdateMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class ItemDataUpdateMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = parseInt(wrapper.readString()); this._data = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFinishedParser.ts b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFinishedParser.ts index 23480b0d..1abe5d1f 100644 --- a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFinishedParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFinishedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class LoveLockFurniFinishedParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFriendConfirmedParser.ts b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFriendConfirmedParser.ts index c5f20c8b..5eef7d28 100644 --- a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFriendConfirmedParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFriendConfirmedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class LoveLockFurniFriendConfirmedParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniStartParser.ts b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniStartParser.ts index 1407388e..e9f4cf85 100644 --- a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniStartParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniStartParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class LoveLockFurniStartParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts index e905b232..59e614b5 100644 --- a/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class OneWayDoorStatusMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class OneWayDoorStatusMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); this._state = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/furniture/RequestSpamWallPostItMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/RequestSpamWallPostItMessageParser.ts index 50c79041..dc117856 100644 --- a/src/nitro/communication/messages/parser/room/furniture/RequestSpamWallPostItMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/RequestSpamWallPostItMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RequestSpamWallPostItMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RequestSpamWallPostItMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); this._location = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/furniture/RoomDimmerPresetsMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/RoomDimmerPresetsMessageParser.ts index fe4fe501..06fa89e5 100644 --- a/src/nitro/communication/messages/parser/room/furniture/RoomDimmerPresetsMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/RoomDimmerPresetsMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { RoomDimmerPresetsMessageData } from '../../../incoming/room/furniture/RoomDimmerPresetsMessageData'; export class RoomDimmerPresetsMessageParser implements IMessageParser @@ -25,7 +25,7 @@ export class RoomDimmerPresetsMessageParser implements IMessageParser this._selectedPresetId = wrapper.readInt(); - for(let i = 0; i < totalPresets; i++) + for (let i = 0; i < totalPresets; i++) { const presetId = wrapper.readInt(); const type = wrapper.readInt(); @@ -40,7 +40,7 @@ export class RoomDimmerPresetsMessageParser implements IMessageParser public getPreset(id: number): RoomDimmerPresetsMessageData { - if((id < 0) || (id >= this.presetCount)) return null; + if ((id < 0) || (id >= this.presetCount)) return null; return this._presets[id]; } diff --git a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorAddParser.ts b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorAddParser.ts index 97f3c617..6a1c0576 100644 --- a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorAddParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorAddParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; import { FurnitureFloorDataParser } from './FurnitureFloorDataParser'; export class FurnitureFloorAddParser implements IMessageParser @@ -14,7 +14,7 @@ export class FurnitureFloorAddParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._item = new FurnitureFloorDataParser(wrapper); this._item.username = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorDataParser.ts b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorDataParser.ts index b02fda4a..900f35de 100644 --- a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorDataParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../../api'; import { IObjectData } from '../../../../../../room/object/data/IObjectData'; import { FurnitureDataParser } from '../FurnitureDataParser'; @@ -22,7 +22,7 @@ export class FurnitureFloorDataParser constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -51,7 +51,7 @@ export class FurnitureFloorDataParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = wrapper.readInt(); this._spriteId = wrapper.readInt(); @@ -68,7 +68,7 @@ export class FurnitureFloorDataParser this._userId = wrapper.readInt(); this._username = null; - if(this._spriteId < 0) this._spriteName = wrapper.readString(); + if (this._spriteId < 0) this._spriteName = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorParser.ts b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorParser.ts index cb378333..be4d0f50 100644 --- a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; import { FurnitureFloorDataParser } from './FurnitureFloorDataParser'; export class FurnitureFloorParser implements IMessageParser @@ -16,21 +16,21 @@ export class FurnitureFloorParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; - if(!this.parseOwners(wrapper)) return false; + if (!this.parseOwners(wrapper)) return false; let totalItems = wrapper.readInt(); - while(totalItems > 0) + while (totalItems > 0) { const item = new FurnitureFloorDataParser(wrapper); - if(!item) continue; + if (!item) continue; const username = this._owners.get(item.userId); - if(username) item.username = username; + if (username) item.username = username; this._items.push(item); @@ -42,11 +42,11 @@ export class FurnitureFloorParser implements IMessageParser private parseOwners(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalOwners = wrapper.readInt(); - while(totalOwners > 0) + while (totalOwners > 0) { this._owners.set(wrapper.readInt(), wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorRemoveParser.ts b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorRemoveParser.ts index 773e4cd9..b1556abd 100644 --- a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorRemoveParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorRemoveParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class FurnitureFloorRemoveParser implements IMessageParser { @@ -19,7 +19,7 @@ export class FurnitureFloorRemoveParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = parseInt(wrapper.readString()); this._isExpired = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorUpdateParser.ts b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorUpdateParser.ts index acf8834d..aa926ca7 100644 --- a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorUpdateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; import { FurnitureFloorDataParser } from './FurnitureFloorDataParser'; export class FurnitureFloorUpdateParser implements IMessageParser @@ -14,7 +14,7 @@ export class FurnitureFloorUpdateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._item = new FurnitureFloorDataParser(wrapper); diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallAddParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallAddParser.ts index ad40e635..da59b2b9 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallAddParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallAddParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; import { FurnitureWallDataParser } from './FurnitureWallDataParser'; export class FurnitureWallAddParser implements IMessageParser @@ -14,7 +14,7 @@ export class FurnitureWallAddParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._item = new FurnitureWallDataParser(wrapper); this._item.username = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallDataParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallDataParser.ts index ca7a5d38..2142688a 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallDataParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../../api'; export class FurnitureWallDataParser { @@ -23,7 +23,7 @@ export class FurnitureWallDataParser constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -55,7 +55,7 @@ export class FurnitureWallDataParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = parseInt(wrapper.readString()); this._spriteId = wrapper.readInt(); @@ -68,35 +68,35 @@ export class FurnitureWallDataParser const state = parseFloat(this._stuffData); - if(!isNaN(state)) this._state = state; + if (!isNaN(state)) this._state = state; - if(this._location.indexOf(':') === 0) + if (this._location.indexOf(':') === 0) { this._isOldFormat = false; let parts = this._location.split(' '); - if(parts.length >= 3) + if (parts.length >= 3) { let widthHeight = parts[0]; let leftRight = parts[1]; const direction = parts[2]; - if((widthHeight.length > 3) && (leftRight.length > 2)) + if ((widthHeight.length > 3) && (leftRight.length > 2)) { widthHeight = widthHeight.substr(3); leftRight = leftRight.substr(2); parts = widthHeight.split(','); - if(parts.length >= 2) + if (parts.length >= 2) { const width = parseInt(parts[0]); const height = parseInt(parts[1]); parts = leftRight.split(','); - if(parts.length >= 2) + if (parts.length >= 2) { const localX = parseInt(parts[0]); const localY = parseInt(parts[1]); diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallParser.ts index 5875cf6e..f8a4d961 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; import { FurnitureWallDataParser } from './FurnitureWallDataParser'; export class FurnitureWallParser implements IMessageParser @@ -16,21 +16,21 @@ export class FurnitureWallParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; - if(!this.parseOwners(wrapper)) return false; + if (!this.parseOwners(wrapper)) return false; let totalItems = wrapper.readInt(); - while(totalItems > 0) + while (totalItems > 0) { const item = new FurnitureWallDataParser(wrapper); - if(!item) continue; + if (!item) continue; const username = this._owners.get(item.userId); - if(username) item.username = username; + if (username) item.username = username; this._items.push(item); @@ -42,11 +42,11 @@ export class FurnitureWallParser implements IMessageParser private parseOwners(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalOwners = wrapper.readInt(); - while(totalOwners > 0) + while (totalOwners > 0) { this._owners.set(wrapper.readInt(), wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallRemoveParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallRemoveParser.ts index bd893b74..91ddd506 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallRemoveParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallRemoveParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class FurnitureWallRemoveParser implements IMessageParser { @@ -15,7 +15,7 @@ export class FurnitureWallRemoveParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._itemId = parseInt(wrapper.readString()); this._userId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallUpdateParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallUpdateParser.ts index f4149d4e..ed766477 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallUpdateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; import { FurnitureWallDataParser } from './FurnitureWallDataParser'; export class FurnitureWallUpdateParser implements IMessageParser @@ -14,7 +14,7 @@ export class FurnitureWallUpdateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._item = new FurnitureWallDataParser(wrapper); this._item.username = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeControlVideoMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeControlVideoMessageParser.ts index 415860c7..ea696f1f 100644 --- a/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeControlVideoMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeControlVideoMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class YoutubeControlVideoMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeDisplayPlaylistsMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeDisplayPlaylistsMessageParser.ts index c1150ecc..b1083a2f 100644 --- a/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeDisplayPlaylistsMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeDisplayPlaylistsMessageParser.ts @@ -1,12 +1,11 @@ -import { IMessageDataWrapper } from '../../../../../../../core'; -import { IMessageParser } from '../../../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; import { YoutubeDisplayPlaylist } from './YoutubeDisplayPlaylist'; export class YoutubeDisplayPlaylistsMessageParser implements IMessageParser { - private _furniId:number; - private _playlists:YoutubeDisplayPlaylist[]; - private _selectedPlaylistId:string; + private _furniId: number; + private _playlists: YoutubeDisplayPlaylist[]; + private _selectedPlaylistId: string; flush(): boolean { @@ -21,7 +20,7 @@ export class YoutubeDisplayPlaylistsMessageParser implements IMessageParser this._furniId = wrapper.readInt(); const count = wrapper.readInt(); this._playlists = []; - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._playlists.push(new YoutubeDisplayPlaylist(wrapper.readString(), wrapper.readString(), wrapper.readString())); } @@ -29,17 +28,17 @@ export class YoutubeDisplayPlaylistsMessageParser implements IMessageParser return true; } - public get furniId():number + public get furniId(): number { return this._furniId; } - public get playlists():YoutubeDisplayPlaylist[] + public get playlists(): YoutubeDisplayPlaylist[] { return this._playlists; } - public get selectedPlaylistId():string + public get selectedPlaylistId(): string { return this._selectedPlaylistId; } diff --git a/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeDisplayVideoMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeDisplayVideoMessageParser.ts index 2edfbf22..dea012d4 100644 --- a/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeDisplayVideoMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/youtube/YoutubeDisplayVideoMessageParser.ts @@ -1,13 +1,13 @@ import { IMessageParser } from '../../../../../../..'; -import { IMessageDataWrapper } from '../../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../../api'; export class YoutubeDisplayVideoMessageParser implements IMessageParser { - private _furniId:number; - private _videoId:string; - private _startAtSeconds:number; - private _endAtSeconds:number; - private _state:number; + private _furniId: number; + private _videoId: string; + private _startAtSeconds: number; + private _endAtSeconds: number; + private _state: number; flush(): boolean { @@ -24,17 +24,17 @@ export class YoutubeDisplayVideoMessageParser implements IMessageParser return true; } - public get furniId():number + public get furniId(): number { return this._furniId; } - public get videoId():string + public get videoId(): string { return this._videoId; } - public get state():number + public get state(): number { return this._state; } diff --git a/src/nitro/communication/messages/parser/room/mapping/FloorHeightMapMessageParser.ts b/src/nitro/communication/messages/parser/room/mapping/FloorHeightMapMessageParser.ts index f83db7bb..75ea692c 100644 --- a/src/nitro/communication/messages/parser/room/mapping/FloorHeightMapMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/FloorHeightMapMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { RoomPlaneParser } from '../../../../../room/object/RoomPlaneParser'; export class FloorHeightMapMessageParser implements IMessageParser @@ -25,7 +25,7 @@ export class FloorHeightMapMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const scale = wrapper.readBoolean(); const wallHeight = wrapper.readInt(); @@ -53,11 +53,11 @@ export class FloorHeightMapMessageParser implements IMessageParser let iterator = 0; - while(iterator < modelRows) + while (iterator < modelRows) { const row = model[iterator]; - if(row.length > width) + if (row.length > width) { width = row.length; } @@ -68,13 +68,13 @@ export class FloorHeightMapMessageParser implements IMessageParser this._heightMap = []; iterator = 0; - while(iterator < modelRows) + while (iterator < modelRows) { const heightMap: number[] = []; let subIterator = 0; - while(subIterator < width) + while (subIterator < width) { heightMap.push(RoomPlaneParser.TILE_BLOCKED); @@ -91,21 +91,21 @@ export class FloorHeightMapMessageParser implements IMessageParser iterator = 0; - while(iterator < modelRows) + while (iterator < modelRows) { const heightMap = this._heightMap[iterator]; const text = model[iterator]; - if(text.length > 0) + if (text.length > 0) { let subIterator = 0; - while(subIterator < text.length) + while (subIterator < text.length) { const char = text.charAt(subIterator); let height = RoomPlaneParser.TILE_BLOCKED; - if((char !== 'x') && (char !== 'X')) height = parseInt(char, 36); + if ((char !== 'x') && (char !== 'X')) height = parseInt(char, 36); heightMap[subIterator] = height; @@ -121,15 +121,15 @@ export class FloorHeightMapMessageParser implements IMessageParser public getHeight(x: number, y: number): number { - if((x < 0) || (x >= this._width) || (y < 0) || (y >= this._height)) return -110; + if ((x < 0) || (x >= this._width) || (y < 0) || (y >= this._height)) return -110; const row = this._heightMap[y]; - if(row === undefined) return -110; + if (row === undefined) return -110; const height = row[x]; - if(height === undefined) return -110; + if (height === undefined) return -110; return height; } diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomEntryTileMessageParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomEntryTileMessageParser.ts index 92f74eff..a471ad23 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomEntryTileMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomEntryTileMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomEntryTileMessageParser implements IMessageParser { @@ -17,7 +17,7 @@ export class RoomEntryTileMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._x = wrapper.readInt(); this._y = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapParser.ts index 3c9c9a80..e650f0fb 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomHeightMapParser implements IMessageParser { @@ -23,21 +23,21 @@ export class RoomHeightMapParser implements IMessageParser public getTileHeight(x: number, y: number): number { - if((x < 0) || (x >= this._width) || (y < 0) || (y >= this._height)) return -1; + if ((x < 0) || (x >= this._width) || (y < 0) || (y >= this._height)) return -1; return RoomHeightMapParser.decodeTileHeight(this._heights[((y * this._width) + x)]); } public getStackingBlocked(x: number, y: number): boolean { - if((x < 0) || (x >= this._width) || (y < 0) || (y >= this._height)) return true; + if ((x < 0) || (x >= this._width) || (y < 0) || (y >= this._height)) return true; return RoomHeightMapParser.decodeIsStackingBlocked(this._heights[((y * this._width) + x)]); } public isRoomTile(x: number, y: number): boolean { - if((x < 0) || (x >= this._width) || (y < 0) || (y >= this._height)) return false; + if ((x < 0) || (x >= this._width) || (y < 0) || (y >= this._height)) return false; return RoomHeightMapParser.decodeIsRoomTile(this._heights[((y * this._width) + x)]); } @@ -53,7 +53,7 @@ export class RoomHeightMapParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._width = wrapper.readInt(); const totalTiles = wrapper.readInt(); @@ -61,7 +61,7 @@ export class RoomHeightMapParser implements IMessageParser let i = 0; - while(i < totalTiles) + while (i < totalTiles) { this._heights[i] = wrapper.readShort(); diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapUpdateParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapUpdateParser.ts index f2c0f559..8fb2d864 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapUpdateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { RoomHeightMapParser } from './RoomHeightMapParser'; export class RoomHeightMapUpdateParser implements IMessageParser @@ -37,7 +37,7 @@ export class RoomHeightMapUpdateParser implements IMessageParser public next(): boolean { - if(!this._count) return false; + if (!this._count) return false; this._count--; @@ -50,7 +50,7 @@ export class RoomHeightMapUpdateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._wrapper = wrapper; this._count = wrapper.readByte(); diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomOccupiedTilesMessageParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomOccupiedTilesMessageParser.ts index 4881df21..a1a1ac87 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomOccupiedTilesMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomOccupiedTilesMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomOccupiedTilesMessageParser implements IMessageParser { @@ -13,16 +13,16 @@ export class RoomOccupiedTilesMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let tilesCount = wrapper.readInt(); - while(tilesCount > 0) + while (tilesCount > 0) { const x = wrapper.readInt(); const y = wrapper.readInt(); - if(!this._blockedTilesMap[y]) this._blockedTilesMap[y] = []; + if (!this._blockedTilesMap[y]) this._blockedTilesMap[y] = []; this._blockedTilesMap[y][x] = true; diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomPaintParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomPaintParser.ts index ee1fa503..56f3428a 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomPaintParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomPaintParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomPaintParser implements IMessageParser { @@ -19,12 +19,12 @@ export class RoomPaintParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; const type = wrapper.readString(); const value = wrapper.readString(); - switch(type) + switch (type) { case 'floor': this._floorType = value; diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts index eef60979..df83099f 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomReadyMessageParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomReadyMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._name = wrapper.readString(); this._roomId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomVisualizationSettingsParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomVisualizationSettingsParser.ts index b8c4e8b7..716550bc 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomVisualizationSettingsParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomVisualizationSettingsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomVisualizationSettingsParser implements IMessageParser { @@ -17,7 +17,7 @@ export class RoomVisualizationSettingsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._hideWalls = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/room/pet/PetExperienceParser.ts b/src/nitro/communication/messages/parser/room/pet/PetExperienceParser.ts index 798e5969..b1292c49 100644 --- a/src/nitro/communication/messages/parser/room/pet/PetExperienceParser.ts +++ b/src/nitro/communication/messages/parser/room/pet/PetExperienceParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class PetExperienceParser implements IMessageParser { @@ -16,7 +16,7 @@ export class PetExperienceParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._petId = wrapper.readInt(); this._roomIndex = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/pet/PetFigureUpdateParser.ts b/src/nitro/communication/messages/parser/room/pet/PetFigureUpdateParser.ts index d6d0f0c4..bbcb7fca 100644 --- a/src/nitro/communication/messages/parser/room/pet/PetFigureUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/pet/PetFigureUpdateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { PetFigureDataParser } from '../../inventory/pets/PetFigureDataParser'; export class PetFigureUpdateParser implements IMessageParser @@ -16,7 +16,7 @@ export class PetFigureUpdateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomIndex = wrapper.readInt(); this._petId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/pet/PetInfoParser.ts b/src/nitro/communication/messages/parser/room/pet/PetInfoParser.ts index 0315216d..4cda7f67 100644 --- a/src/nitro/communication/messages/parser/room/pet/PetInfoParser.ts +++ b/src/nitro/communication/messages/parser/room/pet/PetInfoParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class PetInfoParser implements IMessageParser { @@ -40,7 +40,7 @@ export class PetInfoParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._id = wrapper.readInt(); this._name = wrapper.readString(); @@ -62,7 +62,7 @@ export class PetInfoParser implements IMessageParser let total = wrapper.readInt(); - while(total > 0) + while (total > 0) { this._skillThresholds.push(wrapper.readInt()); diff --git a/src/nitro/communication/messages/parser/room/pet/PetStatusUpdateParser.ts b/src/nitro/communication/messages/parser/room/pet/PetStatusUpdateParser.ts index 2877e869..4ebf593c 100644 --- a/src/nitro/communication/messages/parser/room/pet/PetStatusUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/pet/PetStatusUpdateParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class PetStatusUpdateParser implements IMessageParser { @@ -23,7 +23,7 @@ export class PetStatusUpdateParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomIndex = wrapper.readInt(); this._petId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/session/YouArePlayingGameParser.ts b/src/nitro/communication/messages/parser/room/session/YouArePlayingGameParser.ts index 2ca2f970..a283af06 100644 --- a/src/nitro/communication/messages/parser/room/session/YouArePlayingGameParser.ts +++ b/src/nitro/communication/messages/parser/room/session/YouArePlayingGameParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class YouArePlayingGameParser implements IMessageParser { @@ -13,7 +13,7 @@ export class YouArePlayingGameParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._isPlaying = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/room/session/YouAreSpectatorMessageParser.ts b/src/nitro/communication/messages/parser/room/session/YouAreSpectatorMessageParser.ts index 5316ced5..eac8a96b 100644 --- a/src/nitro/communication/messages/parser/room/session/YouAreSpectatorMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/session/YouAreSpectatorMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class YouAreSpectatorMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitDanceParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitDanceParser.ts index 806b7638..0e87c0e5 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitDanceParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitDanceParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomUnitDanceParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomUnitDanceParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._unitId = wrapper.readInt(); this._danceId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitEffectParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitEffectParser.ts index 021f27ee..dd741cc2 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitEffectParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitEffectParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomUnitEffectParser implements IMessageParser { @@ -17,7 +17,7 @@ export class RoomUnitEffectParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._unitId = wrapper.readInt(); this._effectId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitExpressionParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitExpressionParser.ts index cc6ca610..aa886964 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitExpressionParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitExpressionParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomUnitExpressionParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomUnitExpressionParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._unitId = wrapper.readInt(); this._expression = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemParser.ts index 224534a1..bcd77035 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomUnitHandItemParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomUnitHandItemParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._unitId = wrapper.readInt(); this._handId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemReceivedParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemReceivedParser.ts index 726e78e0..2df439d7 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemReceivedParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemReceivedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomUnitHandItemReceivedParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomUnitHandItemReceivedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._giverUserId = wrapper.readInt(); this._handItemType = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitIdleParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitIdleParser.ts index 0bc9ddc2..4e2f0fa6 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitIdleParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitIdleParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomUnitIdleParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomUnitIdleParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._unitId = wrapper.readInt(); this._isIdle = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitInfoParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitInfoParser.ts index c4e1c06b..96336c65 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitInfoParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitInfoParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomUnitInfoParser implements IMessageParser { @@ -21,7 +21,7 @@ export class RoomUnitInfoParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._unitId = wrapper.readInt(); this._figure = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitNumberParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitNumberParser.ts index 1defaad8..c6923caa 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitNumberParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitNumberParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomUnitNumberParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomUnitNumberParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._unitId = wrapper.readInt(); this._value = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitParser.ts index 23baf031..5498e0c5 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { RoomObjectType } from '../../../../../room/object/RoomObjectType'; import { UserMessageData } from './UserMessageData'; @@ -15,7 +15,7 @@ export class RoomUnitParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._users = []; @@ -23,7 +23,7 @@ export class RoomUnitParser implements IMessageParser let i = 0; - while(i < totalUsers) + while (i < totalUsers) { const id = wrapper.readInt(); const username = wrapper.readString(); @@ -47,7 +47,7 @@ export class RoomUnitParser implements IMessageParser this._users.push(user); - if(type === 1) + if (type === 1) { user.webID = id; user.userType = RoomObjectType.USER; @@ -58,14 +58,14 @@ export class RoomUnitParser implements IMessageParser const swimFigure = wrapper.readString(); - if(swimFigure !== '') figure = this.convertSwimFigure(swimFigure, figure, user.sex); + if (swimFigure !== '') figure = this.convertSwimFigure(swimFigure, figure, user.sex); user.figure = figure; user.activityPoints = wrapper.readInt(); user.isModerator = wrapper.readBoolean(); } - else if(type === 2) + else if (type === 2) { user.userType = RoomObjectType.PET; user.figure = figure; @@ -84,18 +84,18 @@ export class RoomUnitParser implements IMessageParser user.petPosture = wrapper.readString(); } - else if(type === 3) + else if (type === 3) { user.userType = RoomObjectType.BOT; user.webID = (roomIndex * -1); - if(figure.indexOf('/') === -1) user.figure = figure; + if (figure.indexOf('/') === -1) user.figure = figure; else user.figure = 'hr-100-.hd-180-1.ch-876-66.lg-270-94.sh-300-64'; user.sex = UserMessageData.M; } - else if(type === 4) + else if (type === 4) { user.userType = RoomObjectType.RENTABLE_BOT; user.webID = id; @@ -106,13 +106,13 @@ export class RoomUnitParser implements IMessageParser const totalSkills = wrapper.readInt(); - if(totalSkills) + if (totalSkills) { const skills: number[] = []; let j = 0; - while(j < totalSkills) + while (j < totalSkills) { skills.push(wrapper.readShort()); @@ -131,7 +131,7 @@ export class RoomUnitParser implements IMessageParser private resolveSex(sex: string): string { - if(sex.substr(0, 1).toLowerCase() === 'f') return UserMessageData.F; + if (sex.substr(0, 1).toLowerCase() === 'f') return UserMessageData.F; return UserMessageData.M; } @@ -145,16 +145,16 @@ export class RoomUnitParser implements IMessageParser const _local_8 = 10000; let i = 0; - while(i < _local_4.length) + while (i < _local_4.length) { const _local_13 = _local_4[i]; const _local_14 = _local_13.split('-'); - if(_local_14.length > 2) + if (_local_14.length > 2) { const _local_15 = _local_14[0]; - if(_local_15 === 'hd') _local_5 = parseInt(_local_14[2]); + if (_local_15 === 'hd') _local_5 = parseInt(_local_14[2]); } i++; @@ -163,13 +163,13 @@ export class RoomUnitParser implements IMessageParser const _local_10 = ['238,238,238', '250,56,49', '253,146,160', '42,199,210', '53,51,44', '239,255,146', '198,255,152', '255,146,90', '157,89,126', '182,243,255', '109,255,51', '51,120,201', '255,182,49', '223,161,233', '249,251,50', '202,175,143', '197,198,197', '71,98,61', '138,131,97', '255,140,51', '84,198,39', '30,108,153', '152,79,136', '119,200,255', '255,192,142', '60,75,135', '124,44,71', '215,255,227', '143,63,28', '255,99,147', '31,155,121', '253,255,51']; const _local_11 = k.split('='); - if(_local_11.length > 1) + if (_local_11.length > 1) { const _local_16 = _local_11[1].split('/'); const _local_17 = _local_16[0]; const _local_18 = _local_16[1]; - if(_arg_3 === 'F') _local_7 = 10010; + if (_arg_3 === 'F') _local_7 = 10010; else _local_7 = 10011; const _local_19 = _local_10.indexOf(_local_18); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitRemoveParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitRemoveParser.ts index 4a172346..9b13cb21 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitRemoveParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitRemoveParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class RoomUnitRemoveParser implements IMessageParser { @@ -13,7 +13,7 @@ export class RoomUnitRemoveParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._unitId = parseInt(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusParser.ts index 09501813..12a1120e 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { RoomUnitStatusAction } from './RoomUnitStatusAction'; import { RoomUnitStatusMessage } from './RoomUnitStatusMessage'; @@ -15,15 +15,15 @@ export class RoomUnitStatusParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalUnits = wrapper.readInt(); - while(totalUnits > 0) + while (totalUnits > 0) { const status = this.parseStatus(wrapper); - if(!status) + if (!status) { totalUnits--; @@ -40,7 +40,7 @@ export class RoomUnitStatusParser implements IMessageParser public parseStatus(wrapper: IMessageDataWrapper): RoomUnitStatusMessage { - if(!wrapper) return null; + if (!wrapper) return null; const unitId = wrapper.readInt(); const x = wrapper.readInt(); @@ -58,25 +58,25 @@ export class RoomUnitStatusParser implements IMessageParser let didMove = false; const isSlide = false; - if(actions) + if (actions) { const actionParts = actions.split('/'); const statusActions: RoomUnitStatusAction[] = []; - for(const action of actionParts) + for (const action of actionParts) { const parts = action.split(' '); - if(parts[0] === '') continue; + if (parts[0] === '') continue; - if(parts.length >= 2) + if (parts.length >= 2) { - switch(parts[0]) + switch (parts[0]) { case 'mv': { const values = parts[1].split(','); - if(values.length >= 3) + if (values.length >= 3) { targetX = parseInt(values[0]); targetY = parseInt(values[1]); @@ -89,7 +89,7 @@ export class RoomUnitStatusParser implements IMessageParser case 'sit': { const sitHeight = parseFloat(parts[1]); - if(parts.length >= 3) canStandUp = (parts[2] === '1'); + if (parts.length >= 3) canStandUp = (parts[2] === '1'); height = sitHeight; diff --git a/src/nitro/communication/messages/parser/room/unit/chat/FloodControlParser.ts b/src/nitro/communication/messages/parser/room/unit/chat/FloodControlParser.ts index 72cf8a73..d947234c 100644 --- a/src/nitro/communication/messages/parser/room/unit/chat/FloodControlParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/chat/FloodControlParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class FloodControlParser implements IMessageParser { @@ -13,7 +13,7 @@ export class FloodControlParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._seconds = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/unit/chat/RemainingMuteParser.ts b/src/nitro/communication/messages/parser/room/unit/chat/RemainingMuteParser.ts index 772910f4..a526583b 100644 --- a/src/nitro/communication/messages/parser/room/unit/chat/RemainingMuteParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/chat/RemainingMuteParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class RemainingMuteParser implements IMessageParser { @@ -13,7 +13,7 @@ export class RemainingMuteParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._seconds = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitChatParser.ts b/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitChatParser.ts index 625719ab..ed97fb8a 100644 --- a/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitChatParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitChatParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class RoomUnitChatParser implements IMessageParser { @@ -23,7 +23,7 @@ export class RoomUnitChatParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomIndex = wrapper.readInt(); this._message = wrapper.readString(); @@ -39,13 +39,13 @@ export class RoomUnitChatParser implements IMessageParser private parseUrls(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._urls = []; let totalUrls = wrapper.readInt(); - while(totalUrls > 0) + while (totalUrls > 0) { this._urls.push(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitTypingParser.ts b/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitTypingParser.ts index e02ed09f..25377cf5 100644 --- a/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitTypingParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitTypingParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class RoomUnitTypingParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RoomUnitTypingParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._unitId = wrapper.readInt(); this._isTyping = wrapper.readInt() === 1 ? true : false; diff --git a/src/nitro/communication/messages/parser/roomevents/WiredFurniActionParser.ts b/src/nitro/communication/messages/parser/roomevents/WiredFurniActionParser.ts index 5b9abf45..1b23cf12 100644 --- a/src/nitro/communication/messages/parser/roomevents/WiredFurniActionParser.ts +++ b/src/nitro/communication/messages/parser/roomevents/WiredFurniActionParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { WiredActionDefinition } from '../../incoming/roomevents/WiredActionDefinition'; export class WiredFurniActionParser implements IMessageParser @@ -14,7 +14,7 @@ export class WiredFurniActionParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._definition = new WiredActionDefinition(wrapper); diff --git a/src/nitro/communication/messages/parser/roomevents/WiredFurniConditionParser.ts b/src/nitro/communication/messages/parser/roomevents/WiredFurniConditionParser.ts index e592c366..ca18be73 100644 --- a/src/nitro/communication/messages/parser/roomevents/WiredFurniConditionParser.ts +++ b/src/nitro/communication/messages/parser/roomevents/WiredFurniConditionParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { ConditionDefinition } from '../../incoming/roomevents/ConditionDefinition'; export class WiredFurniConditionParser implements IMessageParser @@ -14,7 +14,7 @@ export class WiredFurniConditionParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._definition = new ConditionDefinition(wrapper); diff --git a/src/nitro/communication/messages/parser/roomevents/WiredFurniTriggerParser.ts b/src/nitro/communication/messages/parser/roomevents/WiredFurniTriggerParser.ts index f7b07389..c5c0938f 100644 --- a/src/nitro/communication/messages/parser/roomevents/WiredFurniTriggerParser.ts +++ b/src/nitro/communication/messages/parser/roomevents/WiredFurniTriggerParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { TriggerDefinition } from '../../incoming/roomevents/TriggerDefinition'; export class WiredFurniTriggerParser implements IMessageParser @@ -14,7 +14,7 @@ export class WiredFurniTriggerParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._definition = new TriggerDefinition(wrapper); diff --git a/src/nitro/communication/messages/parser/roomevents/WiredOpenParser.ts b/src/nitro/communication/messages/parser/roomevents/WiredOpenParser.ts index e21a2c72..de6315fc 100644 --- a/src/nitro/communication/messages/parser/roomevents/WiredOpenParser.ts +++ b/src/nitro/communication/messages/parser/roomevents/WiredOpenParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class WiredOpenParser implements IMessageParser { @@ -13,7 +13,7 @@ export class WiredOpenParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._stuffId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/roomevents/WiredRewardResultMessageParser.ts b/src/nitro/communication/messages/parser/roomevents/WiredRewardResultMessageParser.ts index 7347243e..a012959b 100644 --- a/src/nitro/communication/messages/parser/roomevents/WiredRewardResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/roomevents/WiredRewardResultMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class WiredRewardResultMessageParser implements IMessageParser { @@ -13,7 +13,7 @@ export class WiredRewardResultMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._reason = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/roomevents/WiredSaveSuccessParser.ts b/src/nitro/communication/messages/parser/roomevents/WiredSaveSuccessParser.ts index 379362a0..d7f544f9 100644 --- a/src/nitro/communication/messages/parser/roomevents/WiredSaveSuccessParser.ts +++ b/src/nitro/communication/messages/parser/roomevents/WiredSaveSuccessParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class WiredSaveSuccessParser implements IMessageParser { @@ -9,7 +9,7 @@ export class WiredSaveSuccessParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/roomevents/WiredValidationErrorParser.ts b/src/nitro/communication/messages/parser/roomevents/WiredValidationErrorParser.ts index b7e69cce..36f71a6b 100644 --- a/src/nitro/communication/messages/parser/roomevents/WiredValidationErrorParser.ts +++ b/src/nitro/communication/messages/parser/roomevents/WiredValidationErrorParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class WiredValidationErrorParser implements IMessageParser { @@ -13,7 +13,7 @@ export class WiredValidationErrorParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._info = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/roomsettings/BannedUsersFromRoomParser.ts b/src/nitro/communication/messages/parser/roomsettings/BannedUsersFromRoomParser.ts index d3b1ea71..eb6935c9 100644 --- a/src/nitro/communication/messages/parser/roomsettings/BannedUsersFromRoomParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/BannedUsersFromRoomParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { BannedUserData } from '../../incoming/roomsettings/BannedUserData'; export class BannedUsersFromRoomParser implements IMessageParser @@ -17,13 +16,13 @@ export class BannedUsersFromRoomParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); let totalBans = wrapper.readInt(); - while(totalBans > 0) + while (totalBans > 0) { this._bannedUsers.push(new BannedUserData(wrapper)); diff --git a/src/nitro/communication/messages/parser/roomsettings/FlatControllerAddedParser.ts b/src/nitro/communication/messages/parser/roomsettings/FlatControllerAddedParser.ts index d7904dfc..2f0c4152 100644 --- a/src/nitro/communication/messages/parser/roomsettings/FlatControllerAddedParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/FlatControllerAddedParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { FlatControllerData } from '../../incoming/roomsettings/FlatControllerData'; export class FlatControllerAddedParser implements IMessageParser @@ -17,7 +16,7 @@ export class FlatControllerAddedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._data = new FlatControllerData(wrapper); diff --git a/src/nitro/communication/messages/parser/roomsettings/FlatControllerRemovedParser.ts b/src/nitro/communication/messages/parser/roomsettings/FlatControllerRemovedParser.ts index ffc3cf71..018b9dd0 100644 --- a/src/nitro/communication/messages/parser/roomsettings/FlatControllerRemovedParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/FlatControllerRemovedParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FlatControllerRemovedParser implements IMessageParser { @@ -16,7 +15,7 @@ export class FlatControllerRemovedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._userId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/roomsettings/FlatControllersParser.ts b/src/nitro/communication/messages/parser/roomsettings/FlatControllersParser.ts index eb60bf2e..86954132 100644 --- a/src/nitro/communication/messages/parser/roomsettings/FlatControllersParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/FlatControllersParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class FlatControllersParser implements IMessageParser { @@ -16,13 +15,13 @@ export class FlatControllersParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); let usersCount = wrapper.readInt(); - while(usersCount > 0) + while (usersCount > 0) { const id = wrapper.readInt(); const name = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/roomsettings/MuteAllInRoomParser.ts b/src/nitro/communication/messages/parser/roomsettings/MuteAllInRoomParser.ts index 99fe26f1..d0685739 100644 --- a/src/nitro/communication/messages/parser/roomsettings/MuteAllInRoomParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/MuteAllInRoomParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class MuteAllInRoomParser implements IMessageParser { @@ -12,7 +11,7 @@ export class MuteAllInRoomParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._isMuted = wrapper.readBoolean(); diff --git a/src/nitro/communication/messages/parser/roomsettings/NoSuchFlatParser.ts b/src/nitro/communication/messages/parser/roomsettings/NoSuchFlatParser.ts index bf65ac6c..c72dccbc 100644 --- a/src/nitro/communication/messages/parser/roomsettings/NoSuchFlatParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/NoSuchFlatParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NoSuchFlatParser implements IMessageParser { @@ -14,7 +13,7 @@ export class NoSuchFlatParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsDataParser.ts b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsDataParser.ts index 204e56be..e63318f4 100644 --- a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsDataParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsDataParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { RoomChatSettings } from '../../incoming/roomsettings/RoomChatSettings'; import { RoomModerationSettings } from '../../incoming/roomsettings/RoomModerationSettings'; import { RoomSettingsData } from '../../incoming/roomsettings/RoomSettingsData'; @@ -17,7 +16,7 @@ export class RoomSettingsDataParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomSettingsData = new RoomSettingsData(); @@ -32,7 +31,7 @@ export class RoomSettingsDataParser implements IMessageParser let totalTags = wrapper.readInt(); - while(totalTags > 0) + while (totalTags > 0) { this._roomSettingsData.tags.push(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsErrorParser.ts b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsErrorParser.ts index a03f7d2b..b08e5e26 100644 --- a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsErrorParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsErrorParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class RoomSettingsErrorParser implements IMessageParser { @@ -16,7 +15,7 @@ export class RoomSettingsErrorParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._code = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSaveErrorParser.ts b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSaveErrorParser.ts index 1e79ee49..eacb4e95 100644 --- a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSaveErrorParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSaveErrorParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class RoomSettingsSaveErrorParser implements IMessageParser { @@ -32,7 +31,7 @@ export class RoomSettingsSaveErrorParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._code = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSavedParser.ts b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSavedParser.ts index 02613c34..9154e0f2 100644 --- a/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSavedParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/RoomSettingsSavedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class RoomSettingsSavedParser implements IMessageParser { @@ -13,7 +13,7 @@ export class RoomSettingsSavedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/roomsettings/ShowEnforceRoomCategoryDialogParser.ts b/src/nitro/communication/messages/parser/roomsettings/ShowEnforceRoomCategoryDialogParser.ts index c8201149..2fd40fc5 100644 --- a/src/nitro/communication/messages/parser/roomsettings/ShowEnforceRoomCategoryDialogParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/ShowEnforceRoomCategoryDialogParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ShowEnforceRoomCategoryDialogParser implements IMessageParser { @@ -13,7 +13,7 @@ export class ShowEnforceRoomCategoryDialogParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._selectionType = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/roomsettings/UserUnbannedFromRoomParser.ts b/src/nitro/communication/messages/parser/roomsettings/UserUnbannedFromRoomParser.ts index 0ce1892e..f7a191ff 100644 --- a/src/nitro/communication/messages/parser/roomsettings/UserUnbannedFromRoomParser.ts +++ b/src/nitro/communication/messages/parser/roomsettings/UserUnbannedFromRoomParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class UserUnbannedFromRoomParser implements IMessageParser { @@ -15,7 +15,7 @@ export class UserUnbannedFromRoomParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._roomId = wrapper.readInt(); this._userId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/security/AuthenticatedParser.ts b/src/nitro/communication/messages/parser/security/AuthenticatedParser.ts index 2325b7a9..52e87f65 100644 --- a/src/nitro/communication/messages/parser/security/AuthenticatedParser.ts +++ b/src/nitro/communication/messages/parser/security/AuthenticatedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class AuthenticatedParser implements IMessageParser { @@ -9,7 +9,7 @@ export class AuthenticatedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; return true; } diff --git a/src/nitro/communication/messages/parser/sound/JukeboxPlayListFullMessageParser.ts b/src/nitro/communication/messages/parser/sound/JukeboxPlayListFullMessageParser.ts index 9daa014a..83022636 100644 --- a/src/nitro/communication/messages/parser/sound/JukeboxPlayListFullMessageParser.ts +++ b/src/nitro/communication/messages/parser/sound/JukeboxPlayListFullMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class JukeboxPlayListFullMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/sound/JukeboxSongDisksMessageParser.ts b/src/nitro/communication/messages/parser/sound/JukeboxSongDisksMessageParser.ts index f07ab3fa..d7754abf 100644 --- a/src/nitro/communication/messages/parser/sound/JukeboxSongDisksMessageParser.ts +++ b/src/nitro/communication/messages/parser/sound/JukeboxSongDisksMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class JukeboxSongDisksMessageParser implements IMessageParser { @@ -17,7 +17,7 @@ export class JukeboxSongDisksMessageParser implements IMessageParser this._maxLength = wrapper.readInt(); const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._songDisks.set(wrapper.readInt(), wrapper.readInt()); } diff --git a/src/nitro/communication/messages/parser/sound/NowPlayingMessageParser.ts b/src/nitro/communication/messages/parser/sound/NowPlayingMessageParser.ts index 2a2a4d12..e8c7a295 100644 --- a/src/nitro/communication/messages/parser/sound/NowPlayingMessageParser.ts +++ b/src/nitro/communication/messages/parser/sound/NowPlayingMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class NowPlayingMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/sound/OfficialSongIdMessageParser.ts b/src/nitro/communication/messages/parser/sound/OfficialSongIdMessageParser.ts index ebdb4e18..99f953a9 100644 --- a/src/nitro/communication/messages/parser/sound/OfficialSongIdMessageParser.ts +++ b/src/nitro/communication/messages/parser/sound/OfficialSongIdMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class OfficialSongIdMessageParser implements IMessageParser { diff --git a/src/nitro/communication/messages/parser/sound/PlayListMessageParser.ts b/src/nitro/communication/messages/parser/sound/PlayListMessageParser.ts index c9fdb8f7..39b3eabe 100644 --- a/src/nitro/communication/messages/parser/sound/PlayListMessageParser.ts +++ b/src/nitro/communication/messages/parser/sound/PlayListMessageParser.ts @@ -1,10 +1,10 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { PlayListEntry } from '../../incoming/sound'; export class PlayListMessageParser implements IMessageParser { private _synchronizationCount: number; - private _playlist:PlayListEntry[]; + private _playlist: PlayListEntry[]; flush(): boolean { @@ -18,7 +18,7 @@ export class PlayListMessageParser implements IMessageParser this._synchronizationCount = wrapper.readInt(); const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._playlist.push(new PlayListEntry( wrapper.readInt(), wrapper.readInt(), wrapper.readString(), wrapper.readString() @@ -32,7 +32,7 @@ export class PlayListMessageParser implements IMessageParser return this._synchronizationCount; } - public get playList():PlayListEntry[] + public get playList(): PlayListEntry[] { return this._playlist; } diff --git a/src/nitro/communication/messages/parser/sound/PlayListSongAddedMessageParser.ts b/src/nitro/communication/messages/parser/sound/PlayListSongAddedMessageParser.ts index d138839b..5ab93b5e 100644 --- a/src/nitro/communication/messages/parser/sound/PlayListSongAddedMessageParser.ts +++ b/src/nitro/communication/messages/parser/sound/PlayListSongAddedMessageParser.ts @@ -1,9 +1,9 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { PlayListEntry } from '../../incoming/sound'; export class PlayListSongAddedMessageParser implements IMessageParser { - private _entry:PlayListEntry; + private _entry: PlayListEntry; flush(): boolean { @@ -17,7 +17,7 @@ export class PlayListSongAddedMessageParser implements IMessageParser return true; } - public get entry():PlayListEntry + public get entry(): PlayListEntry { return this._entry; } diff --git a/src/nitro/communication/messages/parser/sound/TraxSongInfoMessageParser.ts b/src/nitro/communication/messages/parser/sound/TraxSongInfoMessageParser.ts index 71fe79e6..bfaed063 100644 --- a/src/nitro/communication/messages/parser/sound/TraxSongInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/sound/TraxSongInfoMessageParser.ts @@ -1,9 +1,9 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { SongInfoEntry } from '../../incoming/sound/SongInfoEntry'; export class TraxSongInfoMessageParser implements IMessageParser { - private _songs:SongInfoEntry[]; + private _songs: SongInfoEntry[]; flush(): boolean { @@ -14,7 +14,7 @@ export class TraxSongInfoMessageParser implements IMessageParser parse(wrapper: IMessageDataWrapper): boolean { const count = wrapper.readInt(); - for(let i = 0; i< count; i++) + for (let i = 0; i < count; i++) { const id = wrapper.readInt(); const _local_3 = wrapper.readString(); @@ -28,7 +28,7 @@ export class TraxSongInfoMessageParser implements IMessageParser return true; } - public get songs():SongInfoEntry[] + public get songs(): SongInfoEntry[] { return this._songs; } diff --git a/src/nitro/communication/messages/parser/sound/UserSongDisksInventoryMessageParser.ts b/src/nitro/communication/messages/parser/sound/UserSongDisksInventoryMessageParser.ts index 8717ea9c..763a7d34 100644 --- a/src/nitro/communication/messages/parser/sound/UserSongDisksInventoryMessageParser.ts +++ b/src/nitro/communication/messages/parser/sound/UserSongDisksInventoryMessageParser.ts @@ -1,4 +1,5 @@ -import { AdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; +import { AdvancedMap } from '../../../../../core'; export class UserSongDisksInventoryMessageParser implements IMessageParser { @@ -14,7 +15,7 @@ export class UserSongDisksInventoryMessageParser implements IMessageParser { const count = wrapper.readInt(); - for(let i = 0; i < count; i++) + for (let i = 0; i < count; i++) { this._songDiskInventory.add(wrapper.readInt(), wrapper.readInt()); } @@ -23,7 +24,7 @@ export class UserSongDisksInventoryMessageParser implements IMessageParser public getDiskId(k: number): number { - if(((k >= 0) && (k < this._songDiskInventory.length))) + if (((k >= 0) && (k < this._songDiskInventory.length))) { return this._songDiskInventory.getKey(k); } @@ -32,7 +33,7 @@ export class UserSongDisksInventoryMessageParser implements IMessageParser public getSongId(k: number): number { - if(((k >= 0) && (k < this._songDiskInventory.length))) + if (((k >= 0) && (k < this._songDiskInventory.length))) { return this._songDiskInventory.getWithIndex(k); } diff --git a/src/nitro/communication/messages/parser/talent/TalentTrackParser.ts b/src/nitro/communication/messages/parser/talent/TalentTrackParser.ts index 4d7b2aec..921ca812 100644 --- a/src/nitro/communication/messages/parser/talent/TalentTrackParser.ts +++ b/src/nitro/communication/messages/parser/talent/TalentTrackParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { TalentTrackLevel } from './TalentTrackLevel'; import { TalentTrackRewardProduct } from './TalentTrackRewardProduct'; import { TalentTrackTask } from './TalentTrackTask'; @@ -18,14 +18,14 @@ export class TalentTrackParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._type = wrapper.readString(); this._levels = []; const levelsCount = wrapper.readInt(); - for(let i = 0; i < levelsCount; i++) + for (let i = 0; i < levelsCount; i++) { const levelId = wrapper.readInt(); const levelState = wrapper.readInt(); @@ -33,7 +33,7 @@ export class TalentTrackParser implements IMessageParser const levelAchievements: TalentTrackTask[] = []; const achievementsCount = wrapper.readInt(); - for(let j = 0; j < achievementsCount; j++) + for (let j = 0; j < achievementsCount; j++) { const id = wrapper.readInt(); const index = wrapper.readInt(); @@ -48,12 +48,12 @@ export class TalentTrackParser implements IMessageParser const levelPerks: string[] = []; const perksCount = wrapper.readInt(); - for(let j = 0; j < perksCount; j++) levelPerks.push(wrapper.readString()); + for (let j = 0; j < perksCount; j++) levelPerks.push(wrapper.readString()); const levelItems: TalentTrackRewardProduct[] = []; const itemsCount = wrapper.readInt(); - for(let j = 0; j < itemsCount; j++) + for (let j = 0; j < itemsCount; j++) { const name = wrapper.readString(); const unknownInt = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/user/ApproveNameResultParser.ts b/src/nitro/communication/messages/parser/user/ApproveNameResultParser.ts index 80e913b9..47cf38d2 100644 --- a/src/nitro/communication/messages/parser/user/ApproveNameResultParser.ts +++ b/src/nitro/communication/messages/parser/user/ApproveNameResultParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class ApproveNameResultParser implements IMessageParser { @@ -15,7 +15,7 @@ export class ApproveNameResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._result = wrapper.readInt(); this._validationInfo = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/user/GuildMembershipsMessageParser.ts b/src/nitro/communication/messages/parser/user/GuildMembershipsMessageParser.ts index e75d793e..e239d4cf 100644 --- a/src/nitro/communication/messages/parser/user/GuildMembershipsMessageParser.ts +++ b/src/nitro/communication/messages/parser/user/GuildMembershipsMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { HabboGroupEntryData } from './HabboGroupEntryData'; export class GuildMembershipsMessageParser implements IMessageParser @@ -14,11 +14,11 @@ export class GuildMembershipsMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalOffers = wrapper.readInt(); - while(totalOffers > 0) + while (totalOffers > 0) { this._groups.push(new HabboGroupEntryData(wrapper)); diff --git a/src/nitro/communication/messages/parser/user/HabboGroupBadgesMessageParser.ts b/src/nitro/communication/messages/parser/user/HabboGroupBadgesMessageParser.ts index b9283a6f..959749cd 100644 --- a/src/nitro/communication/messages/parser/user/HabboGroupBadgesMessageParser.ts +++ b/src/nitro/communication/messages/parser/user/HabboGroupBadgesMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class HabboGroupBadgesMessageParser implements IMessageParser { @@ -13,11 +13,11 @@ export class HabboGroupBadgesMessageParser implements IMessageParser parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let badgesCount = wrapper.readInt(); - while(badgesCount > 0) + while (badgesCount > 0) { const id = wrapper.readInt(); const badge = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/user/HabboGroupEntryData.ts b/src/nitro/communication/messages/parser/user/HabboGroupEntryData.ts index c238e115..1ba18160 100644 --- a/src/nitro/communication/messages/parser/user/HabboGroupEntryData.ts +++ b/src/nitro/communication/messages/parser/user/HabboGroupEntryData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageDataWrapper } from '../../../../../api'; export class HabboGroupEntryData { diff --git a/src/nitro/communication/messages/parser/user/IgnoreResultParser.ts b/src/nitro/communication/messages/parser/user/IgnoreResultParser.ts index 50df3d7d..280dec83 100644 --- a/src/nitro/communication/messages/parser/user/IgnoreResultParser.ts +++ b/src/nitro/communication/messages/parser/user/IgnoreResultParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class IgnoreResultParser implements IMessageParser { @@ -15,7 +15,7 @@ export class IgnoreResultParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._result = wrapper.readInt(); this._name = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/user/IgnoredUsersParser.ts b/src/nitro/communication/messages/parser/user/IgnoredUsersParser.ts index 4f980615..4c3aadfe 100644 --- a/src/nitro/communication/messages/parser/user/IgnoredUsersParser.ts +++ b/src/nitro/communication/messages/parser/user/IgnoredUsersParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class IgnoredUsersParser implements IMessageParser { @@ -13,13 +13,13 @@ export class IgnoredUsersParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._ignoredUsers = []; let count = wrapper.readInt(); - while(count > 0) + while (count > 0) { this._ignoredUsers.push(wrapper.readString()); diff --git a/src/nitro/communication/messages/parser/user/InClientLinkParser.ts b/src/nitro/communication/messages/parser/user/InClientLinkParser.ts index d443eda6..f340bac8 100644 --- a/src/nitro/communication/messages/parser/user/InClientLinkParser.ts +++ b/src/nitro/communication/messages/parser/user/InClientLinkParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class InClientLinkParser implements IMessageParser { @@ -12,7 +12,7 @@ export class InClientLinkParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._link = wrapper.readString(); return true; diff --git a/src/nitro/communication/messages/parser/user/PetRespectNotificationParser.ts b/src/nitro/communication/messages/parser/user/PetRespectNotificationParser.ts index dea61d13..47ba0c2a 100644 --- a/src/nitro/communication/messages/parser/user/PetRespectNotificationParser.ts +++ b/src/nitro/communication/messages/parser/user/PetRespectNotificationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { PetType } from '../../../../avatar/pets/PetType'; import { PetData } from '../inventory/pets/PetData'; @@ -19,7 +19,7 @@ export class PetRespectNotificationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._respect = wrapper.readInt(); this._petOwnerId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/user/PetSupplementedNotificationParser.ts b/src/nitro/communication/messages/parser/user/PetSupplementedNotificationParser.ts index 3e3d90c9..34131864 100644 --- a/src/nitro/communication/messages/parser/user/PetSupplementedNotificationParser.ts +++ b/src/nitro/communication/messages/parser/user/PetSupplementedNotificationParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class PetSupplementedNotificationParser implements IMessageParser { @@ -17,7 +17,7 @@ export class PetSupplementedNotificationParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._petId = wrapper.readInt(); this._userId = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/user/RespectReceivedParser.ts b/src/nitro/communication/messages/parser/user/RespectReceivedParser.ts index f4379cd2..5f5394d8 100644 --- a/src/nitro/communication/messages/parser/user/RespectReceivedParser.ts +++ b/src/nitro/communication/messages/parser/user/RespectReceivedParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; export class RespectReceivedParser implements IMessageParser { @@ -15,7 +15,7 @@ export class RespectReceivedParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userId = wrapper.readInt(); this._respectsReceived = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/user/ScrSendKickbackInfoMessageParser.ts b/src/nitro/communication/messages/parser/user/ScrSendKickbackInfoMessageParser.ts index a2ebe93f..05e84675 100644 --- a/src/nitro/communication/messages/parser/user/ScrSendKickbackInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/user/ScrSendKickbackInfoMessageParser.ts @@ -1,5 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core'; -import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../api'; import { ScrKickbackData } from '../../incoming/user/ScrKickbackData'; export class ScrSendKickbackInfoMessageParser implements IMessageParser @@ -17,7 +16,7 @@ export class ScrSendKickbackInfoMessageParser implements IMessageParser return true; } - public get data():ScrKickbackData + public get data(): ScrKickbackData { return this._data; } diff --git a/src/nitro/communication/messages/parser/user/access/UserPermissionsParser.ts b/src/nitro/communication/messages/parser/user/access/UserPermissionsParser.ts index 833ceebf..8c805c8b 100644 --- a/src/nitro/communication/messages/parser/user/access/UserPermissionsParser.ts +++ b/src/nitro/communication/messages/parser/user/access/UserPermissionsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class UserPermissionsParser implements IMessageParser { @@ -17,7 +17,7 @@ export class UserPermissionsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._clubLevel = wrapper.readInt(); this._securityLevel = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfo.ts b/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfo.ts index 16b80fa4..c4579050 100644 --- a/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfo.ts +++ b/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfo.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; import { RelationshipStatusEnum } from '../../../../../enums/RelationshipStatusEnum'; export class RelationshipStatusInfo @@ -11,7 +11,7 @@ export class RelationshipStatusInfo constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -30,7 +30,7 @@ export class RelationshipStatusInfo public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._relationshipStatusType = wrapper.readInt(); this._friendCount = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfoMessageParser.ts b/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfoMessageParser.ts index e7e3b5f2..ddb90ea3 100644 --- a/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfoMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { AdvancedMap } from '../../../../../../core/utils/AdvancedMap'; import { RelationshipStatusInfo } from './RelationshipStatusInfo'; @@ -17,14 +17,14 @@ export class RelationshipStatusInfoMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userId = wrapper.readInt(); this._relationshipStatusMap = new AdvancedMap(); const relationshipsCount = wrapper.readInt(); - for(let i = 0; i < relationshipsCount; i++) + for (let i = 0; i < relationshipsCount; i++) { const relationship = new RelationshipStatusInfo(wrapper); diff --git a/src/nitro/communication/messages/parser/user/data/UserCurrentBadgesParser.ts b/src/nitro/communication/messages/parser/user/data/UserCurrentBadgesParser.ts index 9ddd6cdc..8e3d595b 100644 --- a/src/nitro/communication/messages/parser/user/data/UserCurrentBadgesParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserCurrentBadgesParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class UserCurrentBadgesParser implements IMessageParser { @@ -15,13 +15,13 @@ export class UserCurrentBadgesParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userId = wrapper.readInt(); let totalBadges = wrapper.readInt(); - while(totalBadges > 0) + while (totalBadges > 0) { const slotId = wrapper.readInt(); const badgeCode = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/user/data/UserFigureParser.ts b/src/nitro/communication/messages/parser/user/data/UserFigureParser.ts index 09dd9edb..75f2631f 100644 --- a/src/nitro/communication/messages/parser/user/data/UserFigureParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserFigureParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class UserFigureParser implements IMessageParser { @@ -15,7 +15,7 @@ export class UserFigureParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._figure = wrapper.readString(); this._gender = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/user/data/UserInfoDataParser.ts b/src/nitro/communication/messages/parser/user/data/UserInfoDataParser.ts index 51c4796b..25da08ba 100644 --- a/src/nitro/communication/messages/parser/user/data/UserInfoDataParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserInfoDataParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../../core'; +import { IMessageDataWrapper } from '../../../../../../api'; export class UserInfoDataParser { @@ -19,7 +19,7 @@ export class UserInfoDataParser constructor(wrapper: IMessageDataWrapper) { - if(!wrapper) throw new Error('invalid_wrapper'); + if (!wrapper) throw new Error('invalid_wrapper'); this.flush(); this.parse(wrapper); @@ -47,7 +47,7 @@ export class UserInfoDataParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userId = wrapper.readInt(); this._username = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/user/data/UserInfoParser.ts b/src/nitro/communication/messages/parser/user/data/UserInfoParser.ts index 702903d8..c53097ef 100644 --- a/src/nitro/communication/messages/parser/user/data/UserInfoParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserInfoParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { UserInfoDataParser } from './UserInfoDataParser'; export class UserInfoParser implements IMessageParser @@ -14,11 +14,11 @@ export class UserInfoParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._userInfo = new UserInfoDataParser(wrapper); - if(!this._userInfo) return false; + if (!this._userInfo) return false; return true; } diff --git a/src/nitro/communication/messages/parser/user/data/UserNameChangeMessageParser.ts b/src/nitro/communication/messages/parser/user/data/UserNameChangeMessageParser.ts index 82d21c2e..178486a7 100644 --- a/src/nitro/communication/messages/parser/user/data/UserNameChangeMessageParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserNameChangeMessageParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class UserNameChangeMessageParser implements IMessageParser { @@ -17,7 +17,7 @@ export class UserNameChangeMessageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._webId = wrapper.readInt(); this._id = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/user/data/UserProfileParser.ts b/src/nitro/communication/messages/parser/user/data/UserProfileParser.ts index ff35171f..5e74e629 100644 --- a/src/nitro/communication/messages/parser/user/data/UserProfileParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserProfileParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; import { HabboGroupEntryData } from '../HabboGroupEntryData'; export class UserProfileParser implements IMessageParser @@ -38,7 +38,7 @@ export class UserProfileParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._id = wrapper.readInt(); this._username = wrapper.readString(); @@ -52,7 +52,7 @@ export class UserProfileParser implements IMessageParser this._isOnline = wrapper.readBoolean(); const groupsCount = wrapper.readInt(); - for(let i = 0; i < groupsCount; i++) + for (let i = 0; i < groupsCount; i++) { this._groups.push(new HabboGroupEntryData(wrapper)); } diff --git a/src/nitro/communication/messages/parser/user/data/UserSettingsParser.ts b/src/nitro/communication/messages/parser/user/data/UserSettingsParser.ts index 3714ae77..04a8c951 100644 --- a/src/nitro/communication/messages/parser/user/data/UserSettingsParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserSettingsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class UserSettingsParser implements IMessageParser { @@ -27,7 +27,7 @@ export class UserSettingsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._volumeSystem = wrapper.readInt(); this._volumeFurni = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/user/inventory/currency/UserCreditsParser.ts b/src/nitro/communication/messages/parser/user/inventory/currency/UserCreditsParser.ts index 78282115..35dff359 100644 --- a/src/nitro/communication/messages/parser/user/inventory/currency/UserCreditsParser.ts +++ b/src/nitro/communication/messages/parser/user/inventory/currency/UserCreditsParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class UserCreditsParser implements IMessageParser { @@ -13,7 +13,7 @@ export class UserCreditsParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._credits = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/user/inventory/currency/UserCurrencyParser.ts b/src/nitro/communication/messages/parser/user/inventory/currency/UserCurrencyParser.ts index 3c369630..8599887b 100644 --- a/src/nitro/communication/messages/parser/user/inventory/currency/UserCurrencyParser.ts +++ b/src/nitro/communication/messages/parser/user/inventory/currency/UserCurrencyParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class UserCurrencyParser implements IMessageParser { @@ -13,11 +13,11 @@ export class UserCurrencyParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; let totalCurrencies = wrapper.readInt(); - while(totalCurrencies > 0) + while (totalCurrencies > 0) { this._currencies.set(wrapper.readInt(), wrapper.readInt()); diff --git a/src/nitro/communication/messages/parser/user/inventory/subscription/UserSubscriptionParser.ts b/src/nitro/communication/messages/parser/user/inventory/subscription/UserSubscriptionParser.ts index 50bae6e7..f7ba235d 100644 --- a/src/nitro/communication/messages/parser/user/inventory/subscription/UserSubscriptionParser.ts +++ b/src/nitro/communication/messages/parser/user/inventory/subscription/UserSubscriptionParser.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../../api'; export class UserSubscriptionParser implements IMessageParser { @@ -38,7 +38,7 @@ export class UserSubscriptionParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; this._productName = wrapper.readString(); this._daysToPeriodEnd = wrapper.readInt(); @@ -51,7 +51,7 @@ export class UserSubscriptionParser implements IMessageParser this._pastVipDays = wrapper.readInt(); this._minutesUntilExpiration = wrapper.readInt(); - if(wrapper.bytesAvailable) this._minutesSinceLastModified = wrapper.readInt(); + if (wrapper.bytesAvailable) this._minutesSinceLastModified = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/user/wardrobe/UserWardrobePageParser.ts b/src/nitro/communication/messages/parser/user/wardrobe/UserWardrobePageParser.ts index 05e1526d..f42b9518 100644 --- a/src/nitro/communication/messages/parser/user/wardrobe/UserWardrobePageParser.ts +++ b/src/nitro/communication/messages/parser/user/wardrobe/UserWardrobePageParser.ts @@ -1,8 +1,8 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; +import { IMessageDataWrapper, IMessageParser } from '../../../../../../api'; export class UserWardrobePageParser implements IMessageParser { - private _looks: Map; + private _looks: Map; public flush(): boolean { @@ -13,19 +13,19 @@ export class UserWardrobePageParser implements IMessageParser public parse(wrapper: IMessageDataWrapper): boolean { - if(!wrapper) return false; + if (!wrapper) return false; wrapper.readInt(); let totalLooks = wrapper.readInt(); - while(totalLooks > 0) + while (totalLooks > 0) { const slotId = wrapper.readInt(); const look = wrapper.readString(); const gender = wrapper.readString(); - this._looks.set(slotId, [ look, gender ]); + this._looks.set(slotId, [look, gender]); totalLooks--; } diff --git a/src/nitro/game/GameMessageHandler.ts b/src/nitro/game/GameMessageHandler.ts index 78c243a0..9cbbcec5 100644 --- a/src/nitro/game/GameMessageHandler.ts +++ b/src/nitro/game/GameMessageHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../core/communication/connections/IConnection'; +import { IConnection } from '../../api'; import { LoadGameUrlEvent } from '../communication/messages/incoming/game/LoadGameUrlEvent'; import { LegacyExternalInterface } from '../externalInterface/LegacyExternalInterface'; @@ -11,12 +11,12 @@ export class GameMessageHandler private onLoadGameUrl(event: LoadGameUrlEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; LegacyExternalInterface.callGame('showGame', parser.url); } -} \ No newline at end of file +} diff --git a/src/nitro/localization/INitroLocalizationManager.ts b/src/nitro/localization/INitroLocalizationManager.ts index 909b3b9a..6a94f990 100644 --- a/src/nitro/localization/INitroLocalizationManager.ts +++ b/src/nitro/localization/INitroLocalizationManager.ts @@ -1,4 +1,4 @@ -import { INitroManager } from '../../core/common/INitroManager'; +import { INitroManager } from '../../api'; export interface INitroLocalizationManager extends INitroManager { getRomanNumeral(number: number): string; diff --git a/src/nitro/room/IRoomEngine.ts b/src/nitro/room/IRoomEngine.ts index 002dd07b..dd604055 100644 --- a/src/nitro/room/IRoomEngine.ts +++ b/src/nitro/room/IRoomEngine.ts @@ -1,7 +1,7 @@ import { RenderTexture } from '@pixi/core'; import { DisplayObject } from '@pixi/display'; import { Point, Rectangle } from '@pixi/math'; -import { INitroManager } from '../../core/common/INitroManager'; +import { INitroManager } from '../../api'; import { IRoomObject } from '../../room'; import { IRoomManager } from '../../room/IRoomManager'; import { IRoomObjectController } from '../../room/object/IRoomObjectController'; diff --git a/src/nitro/room/IRoomEngineServices.ts b/src/nitro/room/IRoomEngineServices.ts index c54e2dbc..598be025 100644 --- a/src/nitro/room/IRoomEngineServices.ts +++ b/src/nitro/room/IRoomEngineServices.ts @@ -1,5 +1,4 @@ -import { IConnection } from '../../core/communication/connections/IConnection'; -import { IEventDispatcher } from '../../core/events/IEventDispatcher'; +import { IConnection, IEventDispatcher } from '../../api'; import { IRoomInstance } from '../../room/IRoomInstance'; import { IRoomObjectController } from '../../room/object/IRoomObjectController'; import { IRoomRenderingCanvas } from '../../room/renderer/IRoomRenderingCanvas'; diff --git a/src/nitro/room/RoomContentLoader.ts b/src/nitro/room/RoomContentLoader.ts index 587e00a7..f39f1cab 100644 --- a/src/nitro/room/RoomContentLoader.ts +++ b/src/nitro/room/RoomContentLoader.ts @@ -1,11 +1,9 @@ import { BaseTexture, Resource, Texture } from '@pixi/core'; import { Loader, LoaderResource } from '@pixi/loaders'; import { Spritesheet } from '@pixi/spritesheet'; -import { IAssetData, IGraphicAssetCollection } from '../../api'; +import { IAssetData, IEventDispatcher, IGraphicAssetCollection, INitroLogger } from '../../api'; import { NitroBundle } from '../../core/asset/NitroBundle'; -import { INitroLogger } from '../../core/common/logger/INitroLogger'; -import { NitroLogger } from '../../core/common/logger/NitroLogger'; -import { IEventDispatcher } from '../../core/events/IEventDispatcher'; +import { NitroLogger } from '../../core/common/NitroLogger'; import { NitroEvent } from '../../core/events/NitroEvent'; import { RoomContentLoadedEvent } from '../../room/events/RoomContentLoadedEvent'; import { IRoomObject } from '../../room/object/IRoomObject'; diff --git a/src/nitro/room/RoomEngine.ts b/src/nitro/room/RoomEngine.ts index 1206ab77..7ac3c428 100644 --- a/src/nitro/room/RoomEngine.ts +++ b/src/nitro/room/RoomEngine.ts @@ -1,12 +1,9 @@ import { RenderTexture, Resource, Texture } from '@pixi/core'; import { Container, DisplayObject } from '@pixi/display'; import { Matrix, Point, Rectangle } from '@pixi/math'; +import { IConnection, IDisposable, IMessageComposer, IUpdateReceiver } from '../../api'; import { NitroSprite } from '../../core'; -import { IDisposable } from '../../core/common/disposable/IDisposable'; -import { IUpdateReceiver } from '../../core/common/IUpdateReceiver'; import { NitroManager } from '../../core/common/NitroManager'; -import { IConnection } from '../../core/communication/connections/IConnection'; -import { IMessageComposer } from '../../core/communication/messages/IMessageComposer'; import { NitroEvent } from '../../core/events/NitroEvent'; import { TextureUtils } from '../../room'; import { RoomObjectEvent } from '../../room/events/RoomObjectEvent'; @@ -216,14 +213,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public onInit(): void { - if(this._ready) return; + if (this._ready) return; this._imageObjectIdBank = new NumberBank(1000); this._thumbnailObjectIdBank = new NumberBank(1000); this._logicFactory.registerEventFunction(this.processRoomObjectEvent); - if(this._roomManager) + if (this._roomManager) { this._roomManager.setContentLoader(this._roomContentLoader); this._roomManager.addUpdateCategory(RoomObjectCategory.FLOOR); @@ -239,7 +236,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato this._roomContentLoader.setSessionDataManager(this._sessionDataManager); this._roomContentLoader.setIconListener(this); - if(this._roomSessionManager) + if (this._roomSessionManager) { this._roomSessionManager.events.addEventListener(RoomSessionEvent.STARTED, this.onRoomSessionEvent); this._roomSessionManager.events.addEventListener(RoomSessionEvent.ENDED, this.onRoomSessionEvent); @@ -254,9 +251,9 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public onDispose(): void { - if(!this._ready) return; + if (!this._ready) return; - for(const [key, value] of this._roomInstanceDatas) + for (const [key, value] of this._roomInstanceDatas) { this.removeRoomInstance(key); } @@ -265,15 +262,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato Nitro.instance.ticker.remove(this.update, this); - if(this._roomObjectEventHandler) this._roomObjectEventHandler.dispose(); + if (this._roomObjectEventHandler) this._roomObjectEventHandler.dispose(); - if(this._roomMessageHandler) this._roomMessageHandler.dispose(); + if (this._roomMessageHandler) this._roomMessageHandler.dispose(); - if(this._roomContentLoader) this._roomContentLoader.dispose(); + if (this._roomContentLoader) this._roomContentLoader.dispose(); this.events.removeEventListener(RoomContentLoader.LOADER_READY, this.onRoomContentLoaderReadyEvent); - if(this._roomSessionManager) + if (this._roomSessionManager) { this._roomSessionManager.events.removeEventListener(RoomSessionEvent.STARTED, this.onRoomSessionEvent); this._roomSessionManager.events.removeEventListener(RoomSessionEvent.ENDED, this.onRoomSessionEvent); @@ -284,15 +281,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private onRoomSessionEvent(event: RoomSessionEvent): void { - if(!(event instanceof RoomSessionEvent)) return; + if (!(event instanceof RoomSessionEvent)) return; - switch(event.type) + switch (event.type) { case RoomSessionEvent.STARTED: - if(this._roomMessageHandler) this._roomMessageHandler.setRoomId(event.session.roomId); + if (this._roomMessageHandler) this._roomMessageHandler.setRoomId(event.session.roomId); return; case RoomSessionEvent.ENDED: - if(this._roomMessageHandler) + if (this._roomMessageHandler) { this._roomMessageHandler.clearRoomId(); this.removeRoomInstance(event.session.roomId); @@ -327,14 +324,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instance = this.getRoomInstance(roomId); - if(instance) + if (instance) { this._roomManager && this._roomManager.removeRoomInstance(this.getRoomId(roomId)); } const existing = this._roomInstanceDatas.get(roomId); - if(existing) + if (existing) { this._roomInstanceDatas.delete(existing.roomId); @@ -350,11 +347,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let wallType = '201'; let landscapeType = '1'; - if(!this._ready) + if (!this._ready) { let data = this._roomDatas.get(roomId); - if(data) + if (data) { this._roomDatas.delete(roomId); @@ -376,7 +373,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato return; } - if(!roomMap) + if (!roomMap) { this.logger.warn('Room property messages received before floor height map, will initialize when floor height map received.'); @@ -385,22 +382,22 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const data = this._roomDatas.get(roomId); - if(data) + if (data) { this._roomDatas.delete(roomId); - if(data.floorType) floorType = data.floorType; + if (data.floorType) floorType = data.floorType; - if(data.wallType) wallType = data.wallType; + if (data.wallType) wallType = data.wallType; - if(data.landscapeType) landscapeType = data.landscapeType; + if (data.landscapeType) landscapeType = data.landscapeType; } const instance = this.setupRoomInstance(roomId, roomMap, floorType, wallType, landscapeType, this.getRoomInstanceModelName(roomId)); - if(!instance) return; + if (!instance) return; - if(roomMap.restrictsDragging) + if (roomMap.restrictsDragging) { this._roomAllowsDragging = false; } @@ -414,11 +411,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private setupRoomInstance(roomId: number, roomMap: RoomMapData, floorType: string, wallType: string, landscapeType: string, worldType: string): IRoomInstance { - if(!this._ready || !this._roomManager) return; + if (!this._ready || !this._roomManager) return; const instance = this._roomManager.createRoomInstance(this.getRoomId(roomId)); - if(!instance) return null; + if (!instance) return null; const category = RoomObjectCategory.ROOM; @@ -427,7 +424,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato instance.model.setValue(RoomVariableEnum.ROOM_IS_PUBLIC, 0); instance.model.setValue(RoomVariableEnum.ROOM_Z_SCALE, 1); - if(roomMap) + if (roomMap) { instance.model.setValue(RoomVariableEnum.RESTRICTS_DRAGGING, roomMap.restrictsDragging); instance.model.setValue(RoomVariableEnum.RESTRICTS_SCALING, roomMap.restrictsScaling); @@ -435,7 +432,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const dimensions = roomMap.dimensions; - if(dimensions) + if (dimensions) { const minX = roomMap.dimensions.minX; const maxX = roomMap.dimensions.maxX; @@ -449,44 +446,44 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const seed = ((((minX * 423) + (maxX * 671)) + (minY * 913)) + (maxY * 7509)); - if(roomObject && roomObject.model) roomObject.model.setValue(RoomObjectVariable.ROOM_RANDOM_SEED, seed); + if (roomObject && roomObject.model) roomObject.model.setValue(RoomObjectVariable.ROOM_RANDOM_SEED, seed); } } const logic = (roomObject && roomObject.logic as RoomLogic) || null; - if(logic) + if (logic) { logic.initialize(roomMap); - if(floorType) + if (floorType) { logic.processUpdateMessage(new ObjectRoomUpdateMessage(ObjectRoomUpdateMessage.ROOM_FLOOR_UPDATE, floorType)); instance.model.setValue(RoomObjectVariable.ROOM_FLOOR_TYPE, floorType); } - if(wallType) + if (wallType) { logic.processUpdateMessage(new ObjectRoomUpdateMessage(ObjectRoomUpdateMessage.ROOM_WALL_UPDATE, wallType)); instance.model.setValue(RoomObjectVariable.ROOM_WALL_TYPE, wallType); } - if(landscapeType) + if (landscapeType) { logic.processUpdateMessage(new ObjectRoomUpdateMessage(ObjectRoomUpdateMessage.ROOM_LANDSCAPE_UPDATE, landscapeType)); instance.model.setValue(RoomObjectVariable.ROOM_LANDSCAPE_TYPE, landscapeType); } } - if(roomMap && roomMap.doors.length) + if (roomMap && roomMap.doors.length) { let doorIndex = 0; - while(doorIndex < roomMap.doors.length) + while (doorIndex < roomMap.doors.length) { const door = roomMap.doors[doorIndex]; - if(door) + if (door) { const doorX = door.x; const doorY = door.y; @@ -498,15 +495,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato logic.processUpdateMessage(new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.ADD_MASK, maskId, maskType, maskLocation, ObjectRoomMaskUpdateMessage.HOLE)); - if((doorDir === 90) || (doorDir === 180)) + if ((doorDir === 90) || (doorDir === 180)) { - if(doorDir === 90) + if (doorDir === 90) { instance.model.setValue(RoomObjectVariable.ROOM_DOOR_X, (doorX - 0.5)); instance.model.setValue(RoomObjectVariable.ROOM_DOOR_Y, doorY); } - if(doorDir === 180) + if (doorDir === 180) { instance.model.setValue(RoomObjectVariable.ROOM_DOOR_X, doorX); instance.model.setValue(RoomObjectVariable.ROOM_DOOR_Y, (doorY - 0.5)); @@ -522,7 +519,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } instance.createRoomObjectAndInitalize(RoomEngine.CURSOR_OBJECT_ID, RoomEngine.CURSOR_OBJECT_TYPE, RoomObjectCategory.CURSOR); - if(Nitro.instance.getConfiguration('enable.avatar.arrow', false)) instance.createRoomObjectAndInitalize(RoomEngine.ARROW_OBJECT_ID, RoomEngine.ARROW_OBJECT_TYPE, RoomObjectCategory.CURSOR); + if (Nitro.instance.getConfiguration('enable.avatar.arrow', false)) instance.createRoomObjectAndInitalize(RoomEngine.ARROW_OBJECT_ID, RoomEngine.ARROW_OBJECT_TYPE, RoomObjectCategory.CURSOR); return instance; } @@ -531,15 +528,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instance = this.getRoomInstance(roomId); - if(!instance) return null; + if (!instance) return null; let renderer = instance.renderer as IRoomRenderer; - if(!renderer) + if (!renderer) { renderer = this._roomRendererFactory.createRenderer(); - if(!renderer) return null; + if (!renderer) return null; } renderer.roomObjectVariableAccurateZ = RoomObjectVariable.OBJECT_ACCURATE_Z_VALUE; @@ -548,15 +545,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const canvas = renderer.createCanvas(id, width, height, scale); - if(!canvas) return null; + if (!canvas) return null; const restrictedScaling = instance.model.getValue(RoomVariableEnum.RESTRICTS_SCALING); - if(restrictedScaling) + if (restrictedScaling) { let restrictedScale = instance.model.getValue(RoomVariableEnum.RESTRICTED_SCALE); - if(!restrictedScale) restrictedScale = 1; + if (!restrictedScale) restrictedScale = 1; canvas.setScale(restrictedScale); @@ -569,7 +566,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato canvas.setMouseListener(this._roomObjectEventHandler); - if(canvas.geometry) + if (canvas.geometry) { canvas.geometry.z_scale = instance.model.getValue(RoomVariableEnum.ROOM_Z_SCALE); @@ -581,15 +578,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let direction: IVector3D = null; - if(doorDirection === 90) direction = new Vector3d(-2000, 0, 0); + if (doorDirection === 90) direction = new Vector3d(-2000, 0, 0); - if(doorDirection === 180) direction = new Vector3d(0, -2000, 0); + if (doorDirection === 180) direction = new Vector3d(0, -2000, 0); canvas.geometry.setDisplacement(vector, direction); const displayObject = (canvas.master as Container); - if(displayObject) + if (displayObject) { const overlay = new NitroSprite(Texture.EMPTY); @@ -607,16 +604,16 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomCanvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - if(roomCanvas) roomCanvas.setMask(flag); + if (roomCanvas) roomCanvas.setMask(flag); } public setRoomInstanceRenderingCanvasScale(roomId: number, canvasId: number, scale: number, point: Point = null, offsetPoint: Point = null, override: boolean = false, asDelta: boolean = false): void { const roomCanvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - if(roomCanvas) + if (roomCanvas) { - if(roomCanvas.restrictsScaling && !override) return; + if (roomCanvas.restrictsScaling && !override) return; roomCanvas.setScale(scale, point, offsetPoint, override, asDelta); @@ -628,17 +625,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instance = this.getRoomInstance(roomId); - if(!instance) return null; + if (!instance) return null; const renderer = instance.renderer as IRoomRenderer; - if(!renderer) return null; + if (!renderer) return null; - if(canvasId === -1) canvasId = this._activeRoomActiveCanvas; + if (canvasId === -1) canvasId = this._activeRoomActiveCanvas; const canvas = renderer.getCanvas(canvasId); - if(!canvas) return null; + if (!canvas) return null; return canvas; } @@ -650,11 +647,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getRoomInstanceRenderingCanvasOffset(roomId: number, canvasId: number = -1): Point { - if(canvasId === -1) canvasId = this._activeRoomActiveCanvas; + if (canvasId === -1) canvasId = this._activeRoomActiveCanvas; const renderingCanvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - if(!renderingCanvas) return null; + if (!renderingCanvas) return null; return new Point(renderingCanvas.screenOffsetX, renderingCanvas.screenOffsetY); } @@ -663,12 +660,12 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const renderingCanvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - if(!renderingCanvas || !point) return false; + if (!renderingCanvas || !point) return false; const x = ~~(point.x); const y = ~~(point.y); - if((renderingCanvas.screenOffsetX === x) && (renderingCanvas.screenOffsetY === y)) return; + if ((renderingCanvas.screenOffsetX === x) && (renderingCanvas.screenOffsetY === y)) return; this.events.dispatchEvent(new RoomDragEvent(roomId, -(renderingCanvas.screenOffsetX - x), -(renderingCanvas.screenOffsetY - y))); @@ -680,13 +677,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getRoomInstanceRenderingCanvasScale(roomId: number = -1000, canvasId: number = -1): number { - if(roomId === -1000) roomId = this._activeRoomId; + if (roomId === -1000) roomId = this._activeRoomId; - if(canvasId === -1) canvasId = this._activeRoomActiveCanvas; + if (canvasId === -1) canvasId = this._activeRoomActiveCanvas; const canvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - if(!canvas) return 1; + if (!canvas) return 1; return canvas.scale; } @@ -695,7 +692,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const canvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - if(!canvas) return; + if (!canvas) return; canvas.initialize(width, height); } @@ -704,17 +701,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instance = this.getRoomInstance(roomId); - if(!instance) return null; + if (!instance) return null; const renderer = instance.renderer as IRoomRenderer; - if(!renderer) return null; + if (!renderer) return null; - if(canvasId === -1) canvasId = this._activeRoomActiveCanvas; + if (canvasId === -1) canvasId = this._activeRoomActiveCanvas; const canvas = renderer.getCanvas(canvasId); - if(!canvas) return null; + if (!canvas) return null; return canvas.geometry; } @@ -723,7 +720,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instance = this.getRoomInstance(roomId); - if(!instance) return null; + if (!instance) return null; return ((instance.model && instance.model.getValue(key)) || null); } @@ -732,7 +729,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomOwnObject(roomId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new ObjectRoomPlaneVisibilityUpdateMessage(ObjectRoomPlaneVisibilityUpdateMessage.WALL_VISIBILITY, wallVisible)); object.processUpdateMessage(new ObjectRoomPlaneVisibilityUpdateMessage(ObjectRoomPlaneVisibilityUpdateMessage.FLOOR_VISIBILITY, floorVisible)); @@ -744,7 +741,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomOwnObject(roomId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new ObjectRoomPlanePropertyUpdateMessage(ObjectRoomPlanePropertyUpdateMessage.WALL_THICKNESS, wallThickness)); object.processUpdateMessage(new ObjectRoomPlanePropertyUpdateMessage(ObjectRoomPlanePropertyUpdateMessage.FLOOR_THICKNESS, floorThickness)); @@ -757,43 +754,43 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const roomObject = this.getRoomOwnObject(roomId); const roomInstance = this.getRoomInstance(roomId); - if(!roomObject) + if (!roomObject) { let roomData = this._roomDatas.get(roomId); - if(!roomData) + if (!roomData) { roomData = new RoomData(roomId, null); this._roomDatas.set(roomId, roomData); } - if(floorType) roomData.floorType = floorType; + if (floorType) roomData.floorType = floorType; - if(wallType) roomData.wallType = wallType; + if (wallType) roomData.wallType = wallType; - if(landscapeType) roomData.landscapeType = landscapeType; + if (landscapeType) roomData.landscapeType = landscapeType; return true; } - if(floorType) + if (floorType) { - if(roomInstance && !_arg_5) roomInstance.model.setValue(RoomObjectVariable.ROOM_FLOOR_TYPE, floorType); + if (roomInstance && !_arg_5) roomInstance.model.setValue(RoomObjectVariable.ROOM_FLOOR_TYPE, floorType); roomObject.processUpdateMessage(new ObjectRoomUpdateMessage(ObjectRoomUpdateMessage.ROOM_FLOOR_UPDATE, floorType)); } - if(wallType) + if (wallType) { - if(roomInstance && !_arg_5) roomInstance.model.setValue(RoomObjectVariable.ROOM_WALL_TYPE, wallType); + if (roomInstance && !_arg_5) roomInstance.model.setValue(RoomObjectVariable.ROOM_WALL_TYPE, wallType); roomObject.processUpdateMessage(new ObjectRoomUpdateMessage(ObjectRoomUpdateMessage.ROOM_WALL_UPDATE, wallType)); } - if(landscapeType) + if (landscapeType) { - if(roomInstance && !_arg_5) roomInstance.model.setValue(RoomObjectVariable.ROOM_LANDSCAPE_TYPE, landscapeType); + if (roomInstance && !_arg_5) roomInstance.model.setValue(RoomObjectVariable.ROOM_LANDSCAPE_TYPE, landscapeType); roomObject.processUpdateMessage(new ObjectRoomUpdateMessage(ObjectRoomUpdateMessage.ROOM_LANDSCAPE_UPDATE, landscapeType)); } @@ -805,7 +802,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomObject = this.getRoomOwnObject(roomId); - if(!roomObject || !roomObject.logic) return false; + if (!roomObject || !roomObject.logic) return false; const event = new ObjectRoomColorUpdateMessage(ObjectRoomColorUpdateMessage.BACKGROUND_COLOR, color, light, backgroundOnly); @@ -818,12 +815,12 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public addRoomInstanceFloorHole(roomId: number, objectId: number): void { - if(objectId < 0) return; + if (objectId < 0) return; const roomOwnObject = this.getRoomOwnObject(roomId); const roomObject = this.getRoomObjectFloor(roomId, objectId); - if(roomOwnObject && roomOwnObject.logic && roomObject && roomObject.model) + if (roomOwnObject && roomOwnObject.logic && roomObject && roomObject.model) { const location = roomObject.getLocation(); const sizeX = roomObject.model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); @@ -835,11 +832,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public removeRoomInstanceFloorHole(roomId: number, objectId: number): void { - if(objectId < 0) return; + if (objectId < 0) return; const roomOwnObject = this.getRoomOwnObject(roomId); - if(roomOwnObject) + if (roomOwnObject) { roomOwnObject.processUpdateMessage(new ObjectRoomFloorHoleUpdateMessage(ObjectRoomFloorHoleUpdateMessage.REMOVE, objectId)); } @@ -849,13 +846,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomInstance = this.getRoomInstance(roomId); - if(!roomInstance) return; + if (!roomInstance) return; const mode = isPlaying ? 1 : 0; roomInstance.model.setValue(RoomVariableEnum.IS_PLAYING_GAME, mode); - if(mode === 0) + if (mode === 0) { this.events.dispatchEvent(new RoomEngineEvent(RoomEngineEvent.NORMAL_MODE, roomId)); } @@ -869,7 +866,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomInstance = this.getRoomInstance(roomId); - if(!roomInstance) return false; + if (!roomInstance) return false; return (roomInstance.model.getValue(RoomVariableEnum.IS_PLAYING_GAME) > 0); } @@ -881,7 +878,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public disableUpdate(flag: boolean): void { - if(flag) + if (flag) { Nitro.instance.ticker.remove(this.update, this); } @@ -899,12 +896,12 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public runVisibilityUpdate(): void { - if(!document.hidden) this.update(1, true); + if (!document.hidden) this.update(1, true); } public update(time: number, update: boolean = false): void { - if(!this._roomManager) return; + if (!this._roomManager) return; time = Nitro.instance.time; @@ -916,7 +913,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato this.updateRoomCameras(time); - if(this._mouseCursorUpdate) this.setPointer(); + if (this._mouseCursorUpdate) this.setPointer(); RoomEnterEffect.turnVisualizationOff(); } @@ -927,7 +924,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const instanceData = this.getRoomInstanceData(this._activeRoomId); - if(instanceData && instanceData.hasButtonMouseCursorOwners()) + if (instanceData && instanceData.hasButtonMouseCursorOwners()) { document.body.style.cursor = 'pointer'; } @@ -939,7 +936,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private processPendingFurniture(): void { - if(this._skipFurnitureCreationForNextFrame) + if (this._skipFurnitureCreationForNextFrame) { this._skipFurnitureCreationForNextFrame = false; @@ -950,25 +947,25 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const furniturePerTick = 5; const hasTickLimit = true; - for(const instanceData of this._roomInstanceDatas.values()) + for (const instanceData of this._roomInstanceDatas.values()) { - if(!instanceData) continue; + if (!instanceData) continue; let pendingData: RoomFurnitureData = null; let totalFurnitureAdded = 0; let furnitureAdded = false; - while((pendingData = instanceData.getNextPendingFurnitureFloor())) + while ((pendingData = instanceData.getNextPendingFurnitureFloor())) { furnitureAdded = this.processPendingFurnitureFloor(instanceData.roomId, pendingData.id, pendingData); - if(hasTickLimit) + if (hasTickLimit) { - if(!(++totalFurnitureAdded % furniturePerTick)) + if (!(++totalFurnitureAdded % furniturePerTick)) { const time = new Date().valueOf(); - if((time - startTime) >= 40) + if ((time - startTime) >= 40) { this._skipFurnitureCreationForNextFrame = true; @@ -978,17 +975,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } } - while(!this._skipFurnitureCreationForNextFrame && (pendingData = instanceData.getNextPendingFurnitureWall())) + while (!this._skipFurnitureCreationForNextFrame && (pendingData = instanceData.getNextPendingFurnitureWall())) { furnitureAdded = this.processPendingFurnitureWall(instanceData.roomId, pendingData.id, pendingData); - if(hasTickLimit) + if (hasTickLimit) { - if(!(++totalFurnitureAdded % furniturePerTick)) + if (!(++totalFurnitureAdded % furniturePerTick)) { const time = new Date().valueOf(); - if((time - startTime) >= 40) + if ((time - startTime) >= 40) { this._skipFurnitureCreationForNextFrame = true; @@ -998,28 +995,28 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } } - if(furnitureAdded && this._roomManager) + if (furnitureAdded && this._roomManager) { const roomInstance = this._roomManager.getRoomInstance(this.getRoomId(instanceData.roomId)) as RoomInstance; - if(!roomInstance.hasUninitializedObjects()) this.objectsInitialized(instanceData.roomId.toString()); + if (!roomInstance.hasUninitializedObjects()) this.objectsInitialized(instanceData.roomId.toString()); } - if(this._skipFurnitureCreationForNextFrame) return; + if (this._skipFurnitureCreationForNextFrame) return; } } public onRoomEngineInitalized(flag: boolean): void { - if(!flag) return; + if (!flag) return; this._ready = true; this.events.dispatchEvent(new RoomEngineEvent(RoomEngineEvent.ENGINE_INITIALIZED, 0)); - for(const roomData of this._roomDatas.values()) + for (const roomData of this._roomDatas.values()) { - if(!roomData) continue; + if (!roomData) continue; this.createRoomInstance(roomData.roomId, roomData.data); } @@ -1027,19 +1024,19 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private processPendingFurnitureFloor(roomId: number, id: number, data: RoomFurnitureData): boolean { - if(!data) + if (!data) { const instanceData = this.getRoomInstanceData(roomId); - if(instanceData) data = instanceData.getPendingFurnitureFloor(id); + if (instanceData) data = instanceData.getPendingFurnitureFloor(id); - if(!data) return false; + if (!data) return false; } let type = data.type; let didLoad = false; - if(!type) + if (!type) { type = this.getFurnitureFloorName(data.typeId); didLoad = true; @@ -1048,11 +1045,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const object = this.createRoomObjectFloor(roomId, id, type); - if(!object) return false; + if (!object) return false; const model = object.model; - if(model) + if (model) { model.setValue(RoomObjectVariable.FURNITURE_COLOR, this.getFurnitureFloorColorIndex(data.typeId)); model.setValue(RoomObjectVariable.FURNITURE_TYPE_ID, data.typeId); @@ -1065,53 +1062,53 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato model.setValue(RoomObjectVariable.FURNITURE_OWNER_NAME, data.ownerName); } - if(!this.updateRoomObjectFloor(roomId, id, data.location, data.direction, data.state, data.data, data.extra)) return false; + if (!this.updateRoomObjectFloor(roomId, id, data.location, data.direction, data.state, data.data, data.extra)) return false; - if(data.sizeZ >= 0) + if (data.sizeZ >= 0) { - if(!this.updateRoomObjectFloorHeight(roomId, id, data.sizeZ)) return false; + if (!this.updateRoomObjectFloorHeight(roomId, id, data.sizeZ)) return false; } - if(this.events) this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.ADDED, roomId, id, RoomObjectCategory.FLOOR)); + if (this.events) this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.ADDED, roomId, id, RoomObjectCategory.FLOOR)); const selectedRoomObjectData = this.getPlacedRoomObjectData(roomId); - if(selectedRoomObjectData && (selectedRoomObjectData.id === id) && (selectedRoomObjectData.category === RoomObjectCategory.FLOOR)) + if (selectedRoomObjectData && (selectedRoomObjectData.id === id) && (selectedRoomObjectData.category === RoomObjectCategory.FLOOR)) { this.selectRoomObject(roomId, id, RoomObjectCategory.FLOOR); } - if(object.isReady && data.synchronized) this.addObjectToTileMap(roomId, object); + if (object.isReady && data.synchronized) this.addObjectToTileMap(roomId, object); return true; } private processPendingFurnitureWall(roomId: number, id: number, data: RoomFurnitureData): boolean { - if(!data) + if (!data) { const instanceData = this.getRoomInstanceData(roomId); - if(instanceData) data = instanceData.getPendingFurnitureWall(id); + if (instanceData) data = instanceData.getPendingFurnitureWall(id); - if(!data) return false; + if (!data) return false; } let extra = ''; - if(data.data) extra = data.data.getLegacyString(); + if (data.data) extra = data.data.getLegacyString(); let type = this.getFurnitureWallName(data.typeId, extra); - if(!type) type = ''; + if (!type) type = ''; const object = this.createRoomObjectWall(roomId, id, type); - if(!object) return false; + if (!object) return false; const model = object.model; - if(model) + if (model) { model.setValue(RoomObjectVariable.FURNITURE_COLOR, this.getFurnitureWallColorIndex(data.typeId)); model.setValue(RoomObjectVariable.FURNITURE_TYPE_ID, data.typeId); @@ -1125,13 +1122,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato model.setValue(RoomObjectVariable.FURNITURE_OWNER_NAME, data.ownerName); } - if(!this.updateRoomObjectWall(roomId, id, data.location, data.direction, data.state, extra)) return false; + if (!this.updateRoomObjectWall(roomId, id, data.location, data.direction, data.state, extra)) return false; - if(this.events) this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.ADDED, roomId, id, RoomObjectCategory.WALL)); + if (this.events) this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.ADDED, roomId, id, RoomObjectCategory.WALL)); const selectedRoomObjectData = this.getPlacedRoomObjectData(roomId); - if(selectedRoomObjectData && (Math.abs(selectedRoomObjectData.id) === id) && (selectedRoomObjectData.category === RoomObjectCategory.WALL)) + if (selectedRoomObjectData && (Math.abs(selectedRoomObjectData.id) === id) && (selectedRoomObjectData.category === RoomObjectCategory.WALL)) { this.selectRoomObject(roomId, id, RoomObjectCategory.WALL); } @@ -1141,18 +1138,18 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public setRoomSessionOwnUser(roomId: number, objectId: number): void { - if(!this._roomSessionManager) return; + if (!this._roomSessionManager) return; const session = this._roomSessionManager.getSession(roomId); - if(session) + if (session) { session.setOwnRoomIndex(objectId); } const camera = this.getRoomCamera(roomId); - if(camera) + if (camera) { camera.targetId = objectId; camera.targetCategory = RoomObjectCategory.UNIT; @@ -1169,33 +1166,33 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private updateRoomCameras(time: number): void { - for(const instanceData of this._roomInstanceDatas.values()) + for (const instanceData of this._roomInstanceDatas.values()) { - if(!instanceData) continue; + if (!instanceData) continue; const camera = instanceData.roomCamera; - if(!camera) continue; + if (!camera) continue; let location: IVector3D = null; const object = this.getRoomObject(instanceData.roomId, camera.targetId, camera.targetCategory); - if(object) location = object.getLocation(); + if (object) location = object.getLocation(); - if(!location) continue; + if (!location) continue; - if((instanceData.roomId !== this._activeRoomId) || !this._activeRoomIsDragged) + if ((instanceData.roomId !== this._activeRoomId) || !this._activeRoomIsDragged) { this.updateRoomCamera(instanceData.roomId, 1, location, time); } } - if(this._activeRoomWasDragged) + if (this._activeRoomWasDragged) { const renderingCanvas = this.getRoomInstanceRenderingCanvas(this._activeRoomId, 1); - if(renderingCanvas) this.setRoomInstanceRenderingCanvasOffset(this._activeRoomId, 1, new Point((renderingCanvas.screenOffsetX + this._activeRoomDragX), (renderingCanvas.screenOffsetY + this._activeRoomDragY))); + if (renderingCanvas) this.setRoomInstanceRenderingCanvasOffset(this._activeRoomId, 1, new Point((renderingCanvas.screenOffsetX + this._activeRoomDragX), (renderingCanvas.screenOffsetY + this._activeRoomDragY))); this._activeRoomDragX = 0; this._activeRoomDragY = 0; @@ -1207,29 +1204,29 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const renderingCanvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); const instanceData = this.getRoomInstanceData(roomId); - if(!renderingCanvas || !instanceData || (renderingCanvas.scale !== 1)) return; + if (!renderingCanvas || !instanceData || (renderingCanvas.scale !== 1)) return; const roomGeometry = (renderingCanvas.geometry as RoomGeometry); const roomCamera = instanceData.roomCamera; const roomInstance = this.getRoomInstance(roomId); - if(!roomGeometry || !roomCamera || !roomInstance) return; + if (!roomGeometry || !roomCamera || !roomInstance) return; const canvasRectangle = this.getRoomCanvasRectangle(roomId, canvasId); - if(!canvasRectangle) return; + if (!canvasRectangle) return; let _local_10 = (Math.floor(objectLocation.z) + 1); const width = Math.round(canvasRectangle.width); const height = Math.round(canvasRectangle.height); const bounds = this.getCanvasBoundingRectangle(canvasId); - if(bounds && ((bounds.right < 0) || (bounds.bottom < 0) || (bounds.left >= width) || (bounds.top >= height))) + if (bounds && ((bounds.right < 0) || (bounds.bottom < 0) || (bounds.left >= width) || (bounds.top >= height))) { roomCamera.reset(); } - if((roomCamera.screenWd !== width) || (roomCamera.screenHt !== height) || (roomCamera.scale !== roomGeometry.scale) || (roomCamera.geometryUpdateId !== roomGeometry.updateId) || !Vector3d.isEqual(objectLocation, roomCamera.targetObjectLoc) || roomCamera.isMoving) + if ((roomCamera.screenWd !== width) || (roomCamera.screenHt !== height) || (roomCamera.scale !== roomGeometry.scale) || (roomCamera.geometryUpdateId !== roomGeometry.updateId) || !Vector3d.isEqual(objectLocation, roomCamera.targetObjectLoc) || roomCamera.isMoving) { roomCamera.targetObjectLoc = objectLocation; @@ -1263,17 +1260,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let _local_32 = 0; let _local_33 = roomGeometry.getScreenPoint(new Vector3d(_local_20, _local_21, _local_22)); - if(!_local_33) return; + if (!_local_33) return; _local_33.x = (_local_33.x + Math.round((canvasRectangle.width / 2))); _local_33.y = (_local_33.y + Math.round((canvasRectangle.height / 2))); - if(bounds) + if (bounds) { bounds.x += -(renderingCanvas.screenOffsetX); bounds.y += -(renderingCanvas.screenOffsetY); - if(((bounds.width > 1) && (bounds.height > 1))) + if (((bounds.width > 1) && (bounds.height > 1))) { _local_29 = (((bounds.left - _local_33.x) - (roomGeometry.scale * 0.25)) / _local_24); _local_31 = (((bounds.right - _local_33.x) + (roomGeometry.scale * 0.25)) / _local_24); @@ -1300,7 +1297,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let _local_37 = false; const _local_38 = Math.round(((_local_31 - _local_29) * _local_24)); - if(_local_38 < canvasRectangle.width) + if (_local_38 < canvasRectangle.width) { _local_10 = 2; _local_23.x = ((_local_31 + _local_29) / 2); @@ -1308,19 +1305,19 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } else { - if(_local_23.x > (_local_31 - _local_27)) + if (_local_23.x > (_local_31 - _local_27)) { _local_23.x = (_local_31 - _local_27); _local_34 = true; } - if(_local_23.x < (_local_29 + _local_27)) + if (_local_23.x < (_local_29 + _local_27)) { _local_23.x = (_local_29 + _local_27); _local_34 = true; } } const _local_39 = Math.round(((_local_32 - _local_30) * _local_25)); - if(_local_39 < canvasRectangle.height) + if (_local_39 < canvasRectangle.height) { _local_10 = 2; _local_23.y = ((_local_32 + _local_30) / 2); @@ -1328,17 +1325,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } else { - if(_local_23.y > (_local_32 - _local_28)) + if (_local_23.y > (_local_32 - _local_28)) { _local_23.y = (_local_32 - _local_28); _local_35 = true; } - if(_local_23.y < (_local_30 + _local_28)) + if (_local_23.y < (_local_30 + _local_28)) { _local_23.y = (_local_30 + _local_28); _local_35 = true; } - if(_local_35) + if (_local_35) { _local_23.y = (_local_23.y / (_local_25 / _local_24)); } @@ -1352,23 +1349,23 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let _local_42 = 0.2; const _local_43 = 10; const _local_44 = 10; - if((_local_42 * width) > 100) + if ((_local_42 * width) > 100) { _local_42 = (100 / width); } - if((_local_40 * height) > 150) + if ((_local_40 * height) > 150) { _local_40 = (150 / height); } - if((_local_41 * height) > 150) + if ((_local_41 * height) > 150) { _local_41 = (150 / height); } - if((((roomCamera.limitedLocationX) && (roomCamera.screenWd == width)) && (roomCamera.screenHt == height))) + if ((((roomCamera.limitedLocationX) && (roomCamera.screenWd == width)) && (roomCamera.screenHt == height))) { _local_42 = 0; } - if((((roomCamera.limitedLocationY) && (roomCamera.screenWd == width)) && (roomCamera.screenHt == height))) + if ((((roomCamera.limitedLocationY) && (roomCamera.screenWd == width)) && (roomCamera.screenHt == height))) { _local_40 = 0; _local_41 = 0; @@ -1377,17 +1374,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato canvasRectangle.width = (canvasRectangle.width * (1 - (_local_42 * 2))); canvasRectangle.height = (canvasRectangle.height * (1 - (_local_40 + _local_41))); - if(canvasRectangle.width < _local_43) + if (canvasRectangle.width < _local_43) { canvasRectangle.width = _local_43; } - if(canvasRectangle.height < _local_44) + if (canvasRectangle.height < _local_44) { canvasRectangle.height = _local_44; } - if((_local_40 + _local_41) > 0) + if ((_local_40 + _local_41) > 0) { canvasRectangle.x += (-(canvasRectangle.width) / 2); canvasRectangle.y += (-(canvasRectangle.height) * (_local_41 / (_local_40 + _local_41))); @@ -1400,19 +1397,19 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato _local_33 = roomGeometry.getScreenPoint(_local_15); - if(!_local_33) return; + if (!_local_33) return; - if(_local_33) + if (_local_33) { _local_33.x = (_local_33.x + renderingCanvas.screenOffsetX); _local_33.y = (_local_33.y + renderingCanvas.screenOffsetY); _local_15.z = _local_10; _local_15.x = (Math.round((_local_23.x * 2)) / 2); _local_15.y = (Math.round((_local_23.y * 2)) / 2); - if(!roomCamera.location) + if (!roomCamera.location) { roomGeometry.location = _local_15; - if(this.useOffsetScrolling) + if (this.useOffsetScrolling) { roomCamera.initializeLocation(new Vector3d(0, 0, 0)); } @@ -1423,16 +1420,16 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } const _local_45 = roomGeometry.getScreenPoint(_local_15); const _local_46 = new Vector3d(0, 0, 0); - if(_local_45) + if (_local_45) { _local_46.x = _local_45.x; _local_46.y = _local_45.y; } - if(((((((((_local_33.x < canvasRectangle.left) || (_local_33.x > canvasRectangle.right)) && (!(roomCamera.centeredLocX))) || (((_local_33.y < canvasRectangle.top) || (_local_33.y > canvasRectangle.bottom)) && (!(roomCamera.centeredLocY)))) || (((_local_36) && (!(roomCamera.centeredLocX))) && (!(roomCamera.screenWd == width)))) || (((_local_37) && (!(roomCamera.centeredLocY))) && (!(roomCamera.screenHt == height)))) || ((!(roomCamera.roomWd == bounds.width)) || (!(roomCamera.roomHt == bounds.height)))) || ((!(roomCamera.screenWd == width)) || (!(roomCamera.screenHt == height))))) + if (((((((((_local_33.x < canvasRectangle.left) || (_local_33.x > canvasRectangle.right)) && (!(roomCamera.centeredLocX))) || (((_local_33.y < canvasRectangle.top) || (_local_33.y > canvasRectangle.bottom)) && (!(roomCamera.centeredLocY)))) || (((_local_36) && (!(roomCamera.centeredLocX))) && (!(roomCamera.screenWd == width)))) || (((_local_37) && (!(roomCamera.centeredLocY))) && (!(roomCamera.screenHt == height)))) || ((!(roomCamera.roomWd == bounds.width)) || (!(roomCamera.roomHt == bounds.height)))) || ((!(roomCamera.screenWd == width)) || (!(roomCamera.screenHt == height))))) { roomCamera.limitedLocationX = _local_34; roomCamera.limitedLocationY = _local_35; - if(this.useOffsetScrolling) + if (this.useOffsetScrolling) { roomCamera.target = _local_46; } @@ -1443,9 +1440,9 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } else { - if(!_local_34) roomCamera.limitedLocationX = false; + if (!_local_34) roomCamera.limitedLocationX = false; - if(!_local_35) roomCamera.limitedLocationY = false; + if (!_local_35) roomCamera.limitedLocationY = false; } } @@ -1458,9 +1455,9 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato roomCamera.roomWd = bounds.width; roomCamera.roomHt = bounds.height; - if(!this._sessionDataManager.isCameraFollowDisabled) + if (!this._sessionDataManager.isCameraFollowDisabled) { - if(this.useOffsetScrolling) + if (this.useOffsetScrolling) { roomCamera.update(time, 8); } @@ -1470,7 +1467,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } } - if(this.useOffsetScrolling) + if (this.useOffsetScrolling) { this.setRoomInstanceRenderingCanvasOffset(this.activeRoomId, 1, new Point(-(roomCamera.location.x), -(roomCamera.location.y))); } @@ -1492,7 +1489,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const canvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - if(!canvas) return null; + if (!canvas) return null; return new Rectangle(0, 0, canvas.width, canvas.height); } @@ -1501,22 +1498,22 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const geometry = this.getRoomInstanceGeometry(roomId, canvasId); - if(!geometry) return null; + if (!geometry) return null; const roomObject = this.getRoomObject(roomId, objectId, category); - if(!roomObject) return null; + if (!roomObject) return null; const visualization = roomObject.visualization; - if(!visualization) return null; + if (!visualization) return null; const rectangle = visualization.getBoundingRectangle(); const canvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); const scale = ((canvas) ? canvas.scale : 1); const screenPoint = geometry.getScreenPoint(roomObject.getLocation()); - if(!screenPoint) return null; + if (!screenPoint) return null; screenPoint.x = Math.round(screenPoint.x); screenPoint.y = Math.round(screenPoint.y); @@ -1532,7 +1529,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato rectangle.x += screenPoint.x; rectangle.y += screenPoint.y; - if(!canvas) return null; + if (!canvas) return null; rectangle.x += (Math.round(canvas.width / 2) + canvas.screenOffsetX); rectangle.y += (Math.round(canvas.height / 2) + canvas.screenOffsetY); @@ -1547,28 +1544,28 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getFurnitureFloorName(typeId: number): string { - if(!this._roomContentLoader) return null; + if (!this._roomContentLoader) return null; return this._roomContentLoader.getFurnitureFloorNameForTypeId(typeId); } public getFurnitureWallName(typeId: number, extra: string = null): string { - if(!this._roomContentLoader) return null; + if (!this._roomContentLoader) return null; return this._roomContentLoader.getFurnitureWallNameForTypeId(typeId, extra); } public getFurnitureFloorColorIndex(typeId: number): number { - if(!this._roomContentLoader) return null; + if (!this._roomContentLoader) return null; return this._roomContentLoader.getFurnitureFloorColorIndex(typeId); } public getFurnitureWallColorIndex(typeId: number): number { - if(!this._roomContentLoader) return null; + if (!this._roomContentLoader) return null; return this._roomContentLoader.getFurnitureWallColorIndex(typeId); } @@ -1577,7 +1574,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const existing = this._roomInstanceDatas.get(roomId); - if(existing) return existing; + if (existing) return existing; const data = new RoomInstanceData(roomId); @@ -1590,7 +1587,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return null; + if (!instanceData) return null; return instanceData.modelName; } @@ -1599,7 +1596,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return; + if (!instanceData) return; instanceData.setModelName(name); } @@ -1608,7 +1605,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomInstance = this.getRoomInstanceData(k); - if(!roomInstance) return null; + if (!roomInstance) return null; return roomInstance.tileObjectMap; } @@ -1622,7 +1619,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return null; + if (!instanceData) return null; return instanceData.roomCamera; } @@ -1631,7 +1628,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return null; + if (!instanceData) return null; return instanceData.selectedObject; } @@ -1640,18 +1637,18 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return null; + if (!instanceData) return null; instanceData.setSelectedObject(data); - if(data) instanceData.setPlacedObject(null); + if (data) instanceData.setPlacedObject(null); } public getPlacedRoomObjectData(roomId: number): SelectedRoomObjectData { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return null; + if (!instanceData) return null; return instanceData.placedObject; } @@ -1660,14 +1657,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return null; + if (!instanceData) return null; instanceData.setPlacedObject(data); } public cancelRoomObjectPlacement(): void { - if(!this._roomObjectEventHandler) return; + if (!this._roomObjectEventHandler) return; this._roomObjectEventHandler.cancelRoomObjectPlacement(this._activeRoomId); } @@ -1676,7 +1673,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return null; + if (!instanceData) return null; return instanceData.furnitureStackingHeightMap; } @@ -1685,7 +1682,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return null; + if (!instanceData) return null; instanceData.setFurnitureStackingHeightMap(heightMap); } @@ -1694,7 +1691,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return null; + if (!instanceData) return null; return instanceData.legacyGeometry; } @@ -1703,7 +1700,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instance = this.getRoomInstance(roomId); - if(!instance) return null; + if (!instance) return null; return instance.createRoomObjectAndInitalize(objectId, type, category) as IRoomObjectController; } @@ -1712,18 +1709,18 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instance = this.getRoomInstance(roomId); - if(!instance) return 0; + if (!instance) return 0; return instance.getTotalObjectsForManager(category); } public getRoomObject(roomId: number, objectId: number, category: number): IRoomObjectController { - if(!this._ready) return null; + if (!this._ready) return null; let roomIdString = this.getRoomId(roomId); - if(roomId === 0) roomIdString = RoomEngine.TEMPORARY_ROOM; + if (roomId === 0) roomIdString = RoomEngine.TEMPORARY_ROOM; return this.getObject(roomIdString, objectId, category); } @@ -1732,15 +1729,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { let roomInstance: IRoomInstance = null; - if(this._roomManager) roomInstance = this._roomManager.getRoomInstance(roomId); + if (this._roomManager) roomInstance = this._roomManager.getRoomInstance(roomId); - if(!roomInstance) return null; + if (!roomInstance) return null; let roomObject = (roomInstance.getRoomObject(objectId, category) as IRoomObjectController); - if(!roomObject) + if (!roomObject) { - switch(category) + switch (category) { case RoomObjectCategory.FLOOR: this.processPendingFurnitureFloor(this.getRoomIdFromString(roomId), objectId, null); @@ -1762,14 +1759,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instance = this.getRoomInstance(roomId); - if(!instance) return null; + if (!instance) return null; return instance.getRoomObjectByIndex(index, category) as IRoomObjectController; } public getRoomObjectCategoryForType(type: string): number { - if(!type || !this._roomContentLoader) return RoomObjectCategory.MINIMUM; + if (!type || !this._roomContentLoader) return RoomObjectCategory.MINIMUM; return this._roomContentLoader.getCategoryForType(type); } @@ -1818,21 +1815,21 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomInstanceData = this.getRoomInstanceData(roomId); - if(roomInstanceData) roomInstanceData.removePendingFunitureFloor(objectId); + if (roomInstanceData) roomInstanceData.removePendingFunitureFloor(objectId); - if(this._sessionDataManager && (userId === this._sessionDataManager.userId) && !FurniId.isBuilderClubId(objectId)) + if (this._sessionDataManager && (userId === this._sessionDataManager.userId) && !FurniId.isBuilderClubId(objectId)) { const roomObject = this.getRoomObject(roomId, objectId, RoomObjectCategory.FLOOR); - if(roomObject) + if (roomObject) { const screenLocation = this.getRoomObjectScreenLocation(roomId, objectId, RoomObjectCategory.FLOOR, this._activeRoomActiveCanvas); - if(screenLocation) + if (screenLocation) { const disabledPickingAnimation = (roomObject.model.getValue(RoomObjectVariable.FURNITURE_DISABLE_PICKING_ANIMATION) === 1); - if(!disabledPickingAnimation) + if (!disabledPickingAnimation) { const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); const extras = roomObject.model.getValue(RoomObjectVariable.FURNITURE_EXTRAS); @@ -1840,11 +1837,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const objectData = ObjectDataFactory.getData(dataKey); const icon = this.getFurnitureFloorIcon(typeId, null, extras, objectData).data; - if(icon) + if (icon) { const image = TextureUtils.generateImage(icon); - if(this.events) + if (this.events) { const event = new NitroToolbarAnimateIconEvent(image, screenLocation.x, screenLocation.y); @@ -1861,7 +1858,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato this.removeRoomObject(roomId, objectId, RoomObjectCategory.FLOOR); this.setMouseDefault(roomId, RoomObjectCategory.FLOOR, objectId); - if(_arg_4) this.refreshTileObjectMap(roomId, 'RoomEngine.disposeObjectFurniture()'); + if (_arg_4) this.refreshTileObjectMap(roomId, 'RoomEngine.disposeObjectFurniture()'); } public getRoomObjectWall(roomId: number, objectId: number): IRoomObjectController @@ -1871,25 +1868,25 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public removeRoomObjectWall(roomId: number, objectId: number, userId: number = -1): void { - if(this._sessionDataManager && (userId === this._sessionDataManager.userId) && !FurniId.isBuilderClubId(objectId)) + if (this._sessionDataManager && (userId === this._sessionDataManager.userId) && !FurniId.isBuilderClubId(objectId)) { const roomObject = this.getRoomObject(roomId, objectId, RoomObjectCategory.WALL); - if(roomObject && (roomObject.type.indexOf('post_it') === -1) && (roomObject.type.indexOf('external_image_wallitem') === -1)) + if (roomObject && (roomObject.type.indexOf('post_it') === -1) && (roomObject.type.indexOf('external_image_wallitem') === -1)) { const screenLocation = this.getRoomObjectScreenLocation(roomId, objectId, RoomObjectCategory.WALL, this._activeRoomActiveCanvas); - if(screenLocation) + if (screenLocation) { const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); const objectData = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA); const icon = this.getFurnitureWallIcon(typeId, null, objectData).data; - if(icon) + if (icon) { const image = TextureUtils.generateImage(icon); - if(this.events) + if (this.events) { const event = new NitroToolbarAnimateIconEvent(image, screenLocation.x, screenLocation.y); @@ -1916,18 +1913,18 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instance = this.getRoomInstance(roomId); - if(!instance) return null; + if (!instance) return null; instance.removeRoomObject(objectId, category); - if(this.events) this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.REMOVED, roomId, objectId, category)); + if (this.events) this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.REMOVED, roomId, objectId, category)); } public addFurnitureFloor(roomId: number, id: number, typeId: number, location: IVector3D, direction: IVector3D, state: number, objectData: IObjectData, extra: number = NaN, expires: number = -1, usagePolicy: number = 0, ownerId: number = 0, ownerName: string = '', synchronized: boolean = true, realRoomObject: boolean = true, sizeZ: number = -1): boolean { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return false; + if (!instanceData) return false; const furnitureData = new RoomFurnitureData(id, typeId, null, location, direction, state, objectData, extra, expires, usagePolicy, ownerId, ownerName, synchronized, realRoomObject, sizeZ); @@ -1940,7 +1937,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return false; + if (!instanceData) return false; const furnitureData = new RoomFurnitureData(id, 0, typeName, location, direction, state, objectData, extra, expires, usagePolicy, ownerId, ownerName, synchronized, realRoomObject, sizeZ); @@ -1953,7 +1950,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const instanceData = this.getRoomInstanceData(roomId); - if(!instanceData) return false; + if (!instanceData) return false; const objectData = new LegacyDataType(); @@ -1970,7 +1967,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectFloor(roomId, objectId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new RoomObjectUpdateMessage(location, direction)); object.processUpdateMessage(new ObjectDataUpdateMessage(state, data, extra)); @@ -1982,7 +1979,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectWall(roomId, objectId); - if(!object || !object.logic) return false; + if (!object || !object.logic) return false; const updateMessage = new RoomObjectUpdateMessage(location, direction); const data = new LegacyDataType(); @@ -2002,7 +1999,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectWall(roomId, objectId); - if(!object || !object.logic) return false; + if (!object || !object.logic) return false; object.logic.processUpdateMessage(new ObjectItemDataUpdateMessage(data)); @@ -2013,7 +2010,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectFloor(roomId, objectId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new ObjectHeightUpdateMessage(null, null, height)); @@ -2024,7 +2021,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectFloor(roomId, objectId); - if(!object) return false; + if (!object) return false; object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRY_TIME, expires); object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, Nitro.instance.time); @@ -2036,7 +2033,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectWall(roomId, objectId); - if(!object) return false; + if (!object) return false; object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRY_TIME, expires); object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, Nitro.instance.time); @@ -2051,14 +2048,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let maskUpdate: ObjectRoomMaskUpdateMessage = null; - if(roomObject && roomObject.model) + if (roomObject && roomObject.model) { - if(roomObject.model.getValue(RoomObjectVariable.FURNITURE_USES_PLANE_MASK) > 0) + if (roomObject.model.getValue(RoomObjectVariable.FURNITURE_USES_PLANE_MASK) > 0) { const maskType = roomObject.model.getValue(RoomObjectVariable.FURNITURE_PLANE_MASK_TYPE); const location = roomObject.getLocation(); - if(_arg_3) maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.ADD_MASK, maskName, maskType, location); + if (_arg_3) maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.ADD_MASK, maskName, maskType, location); else maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.REMOVE_MASK, maskName); } } @@ -2069,14 +2066,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const roomOwnObject = this.getRoomOwnObject(roomId); - if(roomOwnObject && roomOwnObject.logic && maskUpdate) roomOwnObject.logic.processUpdateMessage(maskUpdate); + if (roomOwnObject && roomOwnObject.logic && maskUpdate) roomOwnObject.logic.processUpdateMessage(maskUpdate); } public rollRoomObjectFloor(roomId: number, objectId: number, location: IVector3D, targetLocation: IVector3D): void { const object = this.getRoomObjectFloor(roomId, objectId); - if(!object) return; + if (!object) return; object.processUpdateMessage(new ObjectMoveUpdateMessage(location, targetLocation, null, !!targetLocation)); } @@ -2085,9 +2082,9 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomObject = this.getRoomObjectWall(roomId, objectId); - if(!roomObject) return false; + if (!roomObject) return false; - if(roomObject.logic) roomObject.logic.processUpdateMessage(new ObjectMoveUpdateMessage(location, null, null)); + if (roomObject.logic) roomObject.logic.processUpdateMessage(new ObjectMoveUpdateMessage(location, null, null)); this.updateRoomObjectMask(roomId, objectId); @@ -2098,23 +2095,23 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const existing = this.getRoomObjectUser(roomId, objectId); - if(existing) return false; + if (existing) return false; let objectType = RoomObjectUserType.getTypeString(type); - if(objectType === RoomObjectUserType.PET) objectType = this.getPetType(figure); + if (objectType === RoomObjectUserType.PET) objectType = this.getPetType(figure); const object = this.createRoomObjectUser(roomId, objectId, objectType); - if(!object) return false; + if (!object) return false; //object.model.setValue(RoomObjectVariable.FIGURE_HIGHLIGHT_ENABLE, 1); object.processUpdateMessage(new ObjectAvatarUpdateMessage(this.fixedUserLocation(roomId, location), null, direction, headDirection, false, 0)); - if(figure) object.processUpdateMessage(new ObjectAvatarFigureUpdateMessage(figure)); + if (figure) object.processUpdateMessage(new ObjectAvatarFigureUpdateMessage(figure)); - if(this.events) this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.ADDED, roomId, objectId, RoomObjectCategory.UNIT)); + if (this.events) this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.ADDED, roomId, objectId, RoomObjectCategory.UNIT)); return true; } @@ -2123,19 +2120,19 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectUser(roomId, objectId); - if(!object) return false; + if (!object) return false; - if(!location) location = object.getLocation(); + if (!location) location = object.getLocation(); - if(!direction) direction = object.getDirection(); + if (!direction) direction = object.getDirection(); - if(isNaN(headDirection)) headDirection = object.model.getValue(RoomObjectVariable.HEAD_DIRECTION); + if (isNaN(headDirection)) headDirection = object.model.getValue(RoomObjectVariable.HEAD_DIRECTION); object.processUpdateMessage(new ObjectAvatarUpdateMessage(this.fixedUserLocation(roomId, location), this.fixedUserLocation(roomId, targetLocation), direction, headDirection, canStandUp, baseY)); const roomSession = ((this._roomSessionManager && this._roomSessionManager.getSession(roomId)) || null); - if(roomSession && (roomSession.ownRoomIndex === objectId)) + if (roomSession && (roomSession.ownRoomIndex === objectId)) { this._logicFactory.events.dispatchEvent(new RoomToObjectOwnAvatarMoveEvent(RoomToObjectOwnAvatarMoveEvent.ROAME_MOVE_TO, targetLocation)); } @@ -2145,18 +2142,18 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private fixedUserLocation(roomId: number, location: IVector3D): IVector3D { - if(!location) return null; + if (!location) return null; const heightMap = this.getFurnitureStackingHeightMap(roomId); const wallGeometry = this.getLegacyWallGeometry(roomId); - if(!heightMap || !wallGeometry) return location; + if (!heightMap || !wallGeometry) return location; let _local_5 = location.z; const _local_6 = heightMap.getTileHeight(location.x, location.y); const _local_7 = wallGeometry.getHeight(location.x, location.y); - if((Math.abs((_local_5 - _local_6)) < 0.1) && (Math.abs((_local_6 - _local_7)) < 0.1)) + if ((Math.abs((_local_5 - _local_6)) < 0.1) && (Math.abs((_local_6 - _local_7)) < 0.1)) { _local_5 = wallGeometry.getFloorAltitude(location.x, location.y); } @@ -2168,11 +2165,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectUser(roomId, objectId); - if(!object) return false; + if (!object) return false; let message: ObjectStateUpdateMessage = null; - switch(action) + switch (action) { case RoomObjectVariable.FIGURE_TALK: message = new ObjectAvatarChatUpdateMessage(value); @@ -2215,7 +2212,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato break; } - if(!message) return false; + if (!message) return false; object.processUpdateMessage(message); @@ -2226,7 +2223,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectUser(roomId, objectId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new ObjectAvatarFigureUpdateMessage(figure, gender, subType, isRiding)); @@ -2237,7 +2234,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectUser(roomId, objectId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new ObjectAvatarFlatControlUpdateMessage(parseInt(level))); @@ -2248,7 +2245,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectUser(roomId, objectId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new ObjectAvatarEffectUpdateMessage(effectId, delay)); @@ -2259,7 +2256,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectUser(roomId, objectId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new ObjectAvatarGestureUpdateMessage(gestureId)); @@ -2270,7 +2267,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectUser(roomId, objectId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new ObjectAvatarPetGestureUpdateMessage(gesture)); @@ -2281,7 +2278,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectUser(roomId, objectId); - if(!object) return false; + if (!object) return false; object.processUpdateMessage(new ObjectAvatarPostureUpdateMessage(type, parameter)); @@ -2292,7 +2289,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const object = this.getRoomObjectUser(roomId, objectId); - if(!object) return; + if (!object) return; object.processUpdateMessage(new ObjectAvatarOwnMessage()); } @@ -2301,11 +2298,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomObject = this.getRoomObject(this._activeRoomId, objectId, category); - if(roomObject) + if (roomObject) { const eventHandler = roomObject.logic; - if(eventHandler) + if (eventHandler) { eventHandler.useObject(); @@ -2320,18 +2317,18 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const id = this.getRoomIdFromString(roomId); - if(category === RoomObjectCategory.WALL) + if (category === RoomObjectCategory.WALL) { this.updateRoomObjectMask(id, objectId); } const object = this.getRoomObject(id, objectId, category); - if(object && object.model && object.logic) + if (object && object.model && object.logic) { const dataFormat = object.model.getValue(RoomObjectVariable.FURNITURE_DATA_FORMAT); - if(!isNaN(dataFormat)) + if (!isNaN(dataFormat)) { const data = ObjectDataFactory.getData(dataFormat); @@ -2343,14 +2340,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.CONTENT_UPDATED, id, objectId, category)); } - if(roomId !== RoomEngine.TEMPORARY_ROOM) this.addObjectToTileMap(id, object); + if (roomId !== RoomEngine.TEMPORARY_ROOM) this.addObjectToTileMap(id, object); } public changeObjectModelData(roomId: number, objectId: number, category: number, numberKey: string, numberValue: number): boolean { const roomObject = this.getObject(this.getRoomId(roomId), objectId, category); - if(!roomObject || !roomObject.logic) return false; + if (!roomObject || !roomObject.logic) return false; const message = new ObjectModelDataUpdateMessage(numberKey, numberValue); @@ -2363,11 +2360,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomObject = this.getObject(this.getRoomId(roomId), objectId, category); - if(!roomObject || !roomObject.model) return; + if (!roomObject || !roomObject.model) return; let stateIndex = roomObject.model.getValue(RoomObjectVariable.FURNITURE_AUTOMATIC_STATE_INDEX); - if(isNaN(stateIndex)) stateIndex = 1; + if (isNaN(stateIndex)) stateIndex = 1; else stateIndex = (stateIndex + 1); roomObject.model.setValue(RoomObjectVariable.FURNITURE_AUTOMATIC_STATE_INDEX, stateIndex); @@ -2377,44 +2374,44 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato objectData.initializeFromRoomObjectModel(roomObject.model); - if(roomObject.logic) roomObject.logic.processUpdateMessage(new ObjectDataUpdateMessage(stateIndex, objectData)); + if (roomObject.logic) roomObject.logic.processUpdateMessage(new ObjectDataUpdateMessage(stateIndex, objectData)); } public loadRoomObjectBadgeImage(roomId: number, objectId: number, objectCategory: number, badgeId: string, groupBadge: boolean = true): void { - if(!this._sessionDataManager) return; + if (!this._sessionDataManager) return; let roomObject: IRoomObjectController = null; - if(roomId === 0) + if (roomId === 0) { const room = this._roomManager.getRoomInstance(RoomEngine.TEMPORARY_ROOM); - if(room) roomObject = (room.getRoomObject(objectId, objectCategory) as IRoomObjectController); + if (room) roomObject = (room.getRoomObject(objectId, objectCategory) as IRoomObjectController); } else { roomObject = this.getRoomObjectFloor(roomId, objectId); } - if(!roomObject || !roomObject.logic) return; + if (!roomObject || !roomObject.logic) return; let badgeName = (groupBadge) ? this._sessionDataManager.loadGroupBadgeImage(badgeId) : this._sessionDataManager.loadBadgeImage(badgeId); - if(!badgeName) + if (!badgeName) { badgeName = 'loading_icon'; - if(!this._badgeListenerObjects) this._badgeListenerObjects = new Map(); + if (!this._badgeListenerObjects) this._badgeListenerObjects = new Map(); - if(!this._badgeListenerObjects.size) + if (!this._badgeListenerObjects.size) { this._sessionDataManager.events.addEventListener(BadgeImageReadyEvent.IMAGE_READY, this.onBadgeImageReadyEvent); } let listeners = this._badgeListenerObjects.get(badgeId); - if(!listeners) listeners = []; + if (!listeners) listeners = []; listeners.push(new RoomObjectBadgeImageAssetListener(roomObject, groupBadge)); @@ -2430,26 +2427,26 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private onBadgeImageReadyEvent(k: BadgeImageReadyEvent): void { - if(!this._sessionDataManager) return; + if (!this._sessionDataManager) return; const listeners = this._badgeListenerObjects && this._badgeListenerObjects.get(k.badgeId); - if(!listeners) return; + if (!listeners) return; - for(const listener of listeners) + for (const listener of listeners) { - if(!listener) continue; + if (!listener) continue; this.putBadgeInObjectAssets(listener.object, k.badgeId, listener.groupBadge); const badgeName = (listener.groupBadge) ? this._sessionDataManager.loadGroupBadgeImage(k.badgeId) : this._sessionDataManager.loadBadgeImage(k.badgeId); - if(listener.object && listener.object.logic) listener.object.logic.processUpdateMessage(new ObjectGroupBadgeUpdateMessage(k.badgeId, badgeName)); + if (listener.object && listener.object.logic) listener.object.logic.processUpdateMessage(new ObjectGroupBadgeUpdateMessage(k.badgeId, badgeName)); } this._badgeListenerObjects.delete(k.badgeId); - if(!this._badgeListenerObjects.size) + if (!this._badgeListenerObjects.size) { this._sessionDataManager.events.removeEventListener(BadgeImageReadyEvent.IMAGE_READY, this.onBadgeImageReadyEvent); } @@ -2457,24 +2454,24 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private putBadgeInObjectAssets(object: IRoomObjectController, badgeId: string, groupBadge: boolean = false): void { - if(!this._roomContentLoader || !this._sessionDataManager) return; + if (!this._roomContentLoader || !this._sessionDataManager) return; const badgeName = (groupBadge) ? this._sessionDataManager.loadGroupBadgeImage(badgeId) : this._sessionDataManager.loadBadgeImage(badgeId); const badgeImage = (groupBadge) ? this._sessionDataManager.getGroupBadgeImage(badgeId) : this._sessionDataManager.getBadgeImage(badgeId); - if(badgeImage) this._roomContentLoader.addAssetToCollection(object.type, badgeName, badgeImage, false); + if (badgeImage) this._roomContentLoader.addAssetToCollection(object.type, badgeName, badgeImage, false); } public dispatchMouseEvent(canvasId: number, x: number, y: number, type: string, altKey: boolean, ctrlKey: boolean, shiftKey: boolean, buttonDown: boolean): void { const canvas = this.getRoomInstanceRenderingCanvas(this._activeRoomId, canvasId); - if(!canvas) return; + if (!canvas) return; const overlay = this.getRenderingCanvasOverlay(canvas); const sprite = this.getOverlayIconSprite(overlay, RoomEngine.OBJECT_ICON_SPRITE); - if(sprite) + if (sprite) { const rectangle = sprite.getLocalBounds(); @@ -2482,15 +2479,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato sprite.y = (y - (rectangle.height / 2)); } - if(!this.handleRoomDragging(canvas, x, y, type, altKey, ctrlKey, shiftKey)) + if (!this.handleRoomDragging(canvas, x, y, type, altKey, ctrlKey, shiftKey)) { - if(!canvas.handleMouseEvent(x, y, type, altKey, ctrlKey, shiftKey, buttonDown)) + if (!canvas.handleMouseEvent(x, y, type, altKey, ctrlKey, shiftKey, buttonDown)) { let eventType: string = null; - if(type === MouseEventType.MOUSE_CLICK) + if (type === MouseEventType.MOUSE_CLICK) { - if(this.events) + if (this.events) { this.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.DESELECTED, this._activeRoomId, -1, RoomObjectCategory.MINIMUM)); } @@ -2499,13 +2496,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } else { - if(type === MouseEventType.MOUSE_MOVE) eventType = RoomObjectMouseEvent.MOUSE_MOVE; + if (type === MouseEventType.MOUSE_MOVE) eventType = RoomObjectMouseEvent.MOUSE_MOVE; - else if(type === MouseEventType.MOUSE_DOWN) eventType = RoomObjectMouseEvent.MOUSE_DOWN; + else if (type === MouseEventType.MOUSE_DOWN) eventType = RoomObjectMouseEvent.MOUSE_DOWN; - else if(type === MouseEventType.MOUSE_DOWN_LONG) eventType = RoomObjectMouseEvent.MOUSE_DOWN_LONG; + else if (type === MouseEventType.MOUSE_DOWN_LONG) eventType = RoomObjectMouseEvent.MOUSE_DOWN_LONG; - else if(type === MouseEventType.MOUSE_UP) eventType = RoomObjectMouseEvent.MOUSE_UP; + else if (type === MouseEventType.MOUSE_UP) eventType = RoomObjectMouseEvent.MOUSE_UP; } this._roomObjectEventHandler.handleRoomObjectEvent(new RoomObjectMouseEvent(eventType, this.getRoomObject(this._activeRoomId, RoomEngine.ROOM_OBJECT_ID, RoomObjectCategory.ROOM), null, altKey), this._activeRoomId); @@ -2522,11 +2519,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let offsetX = (x - this._activeRoomActiveCanvasMouseX); let offsetY = (y - this._activeRoomActiveCanvasMouseY); - if(type === MouseEventType.MOUSE_DOWN) + if (type === MouseEventType.MOUSE_DOWN) { - if(!altKey && !ctrlKey && !shiftKey && !this.isDecorating) + if (!altKey && !ctrlKey && !shiftKey && !this.isDecorating) { - if(this._roomAllowsDragging) + if (this._roomAllowsDragging) { this._activeRoomIsDragged = true; this._activeRoomWasDragged = false; @@ -2536,25 +2533,25 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } } - else if(type === MouseEventType.MOUSE_UP) + else if (type === MouseEventType.MOUSE_UP) { - if(this._activeRoomIsDragged) + if (this._activeRoomIsDragged) { this._activeRoomIsDragged = false; - if(this._activeRoomWasDragged) + if (this._activeRoomWasDragged) { const instanceData = this.getRoomInstanceData(this._activeRoomId); - if(instanceData) + if (instanceData) { const camera = instanceData.roomCamera; - if(camera) + if (camera) { - if(this.useOffsetScrolling) + if (this.useOffsetScrolling) { - if(!camera.isMoving) + if (!camera.isMoving) { camera.centeredLocX = false; camera.centeredLocY = false; @@ -2563,23 +2560,23 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato camera.resetLocation(new Vector3d(-(canvas.screenOffsetX), -(canvas.screenOffsetY))); } - if(this._roomDraggingAlwaysCenters) camera.reset(); + if (this._roomDraggingAlwaysCenters) camera.reset(); } } } } } - else if(type === MouseEventType.MOUSE_MOVE) + else if (type === MouseEventType.MOUSE_MOVE) { - if(this._activeRoomIsDragged) + if (this._activeRoomIsDragged) { - if(!this._activeRoomWasDragged) + if (!this._activeRoomWasDragged) { offsetX = (x - this._activeRoomDragStartX); offsetY = (y - this._activeRoomDragStartY); - if(((((offsetX <= -(RoomEngine.DRAG_THRESHOLD)) || (offsetX >= RoomEngine.DRAG_THRESHOLD)) || (offsetY <= -(RoomEngine.DRAG_THRESHOLD))) || (offsetY >= RoomEngine.DRAG_THRESHOLD))) + if (((((offsetX <= -(RoomEngine.DRAG_THRESHOLD)) || (offsetX >= RoomEngine.DRAG_THRESHOLD)) || (offsetY <= -(RoomEngine.DRAG_THRESHOLD))) || (offsetY >= RoomEngine.DRAG_THRESHOLD))) { this._activeRoomWasDragged = true; } @@ -2588,7 +2585,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato offsetY = 0; } - if(((!(offsetX == 0)) || (!(offsetY == 0)))) + if (((!(offsetX == 0)) || (!(offsetY == 0)))) { this._activeRoomDragX += offsetX; this._activeRoomDragY += offsetY; @@ -2598,11 +2595,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } } - else if((type === MouseEventType.MOUSE_CLICK) || (type === MouseEventType.DOUBLE_CLICK)) + else if ((type === MouseEventType.MOUSE_CLICK) || (type === MouseEventType.DOUBLE_CLICK)) { this._activeRoomIsDragged = false; - if(this._activeRoomWasDragged) + if (this._activeRoomWasDragged) { this._activeRoomWasDragged = false; @@ -2617,7 +2614,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const category = this.getRoomObjectCategoryForType(objectType); - switch(type) + switch (type) { case RoomObjectFurnitureActionEvent.MOUSE_BUTTON: this.setMouseButton(this._activeRoomId, category, objectId); @@ -2630,67 +2627,67 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private setMouseButton(roomId: number, category: number, objectId: number): void { - if(!this._roomSessionManager) return; + if (!this._roomSessionManager) return; const session = this._roomSessionManager.getSession(roomId); - if(!session) return; + if (!session) return; - if(((category !== RoomObjectCategory.FLOOR) && (category !== RoomObjectCategory.WALL)) || ((session.controllerLevel >= RoomControllerLevel.GUEST))) + if (((category !== RoomObjectCategory.FLOOR) && (category !== RoomObjectCategory.WALL)) || ((session.controllerLevel >= RoomControllerLevel.GUEST))) { const instanceData = this.getRoomInstanceData(roomId); - if(instanceData) + if (instanceData) { - if(instanceData.addButtonMouseCursorOwner((category + '_' + objectId))) this._mouseCursorUpdate = true; + if (instanceData.addButtonMouseCursorOwner((category + '_' + objectId))) this._mouseCursorUpdate = true; } } } private setMouseDefault(roomId: number, category: number, objectId: number): void { - if(!this._roomSessionManager) return; + if (!this._roomSessionManager) return; const instanceData = this.getRoomInstanceData(roomId); - if(instanceData) + if (instanceData) { - if(instanceData.removeButtonMouseCursorOwner((category + '_' + objectId))) this._mouseCursorUpdate = true; + if (instanceData.removeButtonMouseCursorOwner((category + '_' + objectId))) this._mouseCursorUpdate = true; } } public processRoomObjectOperation(objectId: number, category: number, operation: string): boolean { - if(!this._roomObjectEventHandler) return false; + if (!this._roomObjectEventHandler) return false; this._roomObjectEventHandler.modifyRoomObject(this._activeRoomId, objectId, category, operation); } public modifyRoomObjectDataWithMap(objectId: number, category: number, operation: string, data: Map): boolean { - if(!this._roomObjectEventHandler) return false; + if (!this._roomObjectEventHandler) return false; - if(category !== RoomObjectCategory.FLOOR) return; + if (category !== RoomObjectCategory.FLOOR) return; this._roomObjectEventHandler.modifyRoomObjectDataWithMap(this._activeRoomId, objectId, category, operation, data); } public modifyRoomObjectData(objectId: number, category: number, colorHex: string, data: string): boolean { - if(!this._roomObjectEventHandler) return false; + if (!this._roomObjectEventHandler) return false; - if(category !== RoomObjectCategory.WALL) return; + if (category !== RoomObjectCategory.WALL) return; this._roomObjectEventHandler.modifyWallItemData(this._activeRoomId, objectId, colorHex, data); } private processRoomObjectEvent(event: RoomObjectEvent): void { - if(!this._roomObjectEventHandler) return; + if (!this._roomObjectEventHandler) return; const roomIdString = this.getRoomObjectRoomId(event.object); - if(!roomIdString) return; + if (!roomIdString) return; const roomId = this.getRoomIdFromString(roomIdString); @@ -2701,32 +2698,32 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomInstance = this.getRoomInstance(this._activeRoomId); - if(!roomInstance || (roomInstance.model.getValue(RoomVariableEnum.ROOM_IS_PUBLIC) !== 0)) return false; + if (!roomInstance || (roomInstance.model.getValue(RoomVariableEnum.ROOM_IS_PUBLIC) !== 0)) return false; - if(!this._roomObjectEventHandler) return false; + if (!this._roomObjectEventHandler) return false; return this._roomObjectEventHandler.processRoomObjectPlacement(placementSource, this._activeRoomId, id, category, typeId, extra, stuffData, state, frameNumber, posture); } public getRoomObjectScreenLocation(roomId: number, objectId: number, objectType: number, canvasId: number = -1): Point { - if(canvasId == -1) canvasId = this._activeRoomActiveCanvas; + if (canvasId == -1) canvasId = this._activeRoomActiveCanvas; const geometry = this.getRoomInstanceGeometry(roomId, canvasId); - if(!geometry) return null; + if (!geometry) return null; const roomObject = this.getRoomObject(roomId, objectId, objectType); - if(!roomObject) return null; + if (!roomObject) return null; const screenPoint = geometry.getScreenPoint(roomObject.getLocation()); - if(!screenPoint) return null; + if (!screenPoint) return null; const renderingCanvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - if(!renderingCanvas) return null; + if (!renderingCanvas) return null; screenPoint.x = (screenPoint.x * renderingCanvas.scale); screenPoint.y = (screenPoint.y * renderingCanvas.scale); @@ -2742,32 +2739,32 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public selectRoomObject(roomId: number, objectId: number, objectCategory: number): void { - if(!this._roomObjectEventHandler) return; + if (!this._roomObjectEventHandler) return; this._roomObjectEventHandler.setSelectedObject(roomId, objectId, objectCategory); } public setSelectedAvatar(roomId: number, objectId: number): void { - if(this._roomObjectEventHandler) return; + if (this._roomObjectEventHandler) return; this._roomObjectEventHandler.setSelectedAvatar(roomId, objectId, true); } public cancelRoomObjectInsert(): void { - if(!this._roomObjectEventHandler) return; + if (!this._roomObjectEventHandler) return; this._roomObjectEventHandler.cancelRoomObjectInsert(this._activeRoomId); } private addOverlayIconSprite(k: NitroSprite, _arg_2: string, _arg_3: Texture, scale: number = 1): NitroSprite { - if(!k || !_arg_3) return; + if (!k || !_arg_3) return; let sprite = this.getOverlayIconSprite(k, _arg_2); - if(sprite) return null; + if (sprite) return null; sprite = new NitroSprite(_arg_3); @@ -2782,23 +2779,23 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public onRoomContentLoaded(id: number, assetName: string, success: boolean): void { - if(!this._roomContentLoader || (id === -1)) return; + if (!this._roomContentLoader || (id === -1)) return; this._thumbnailObjectIdBank.freeNumber((id - 1)); const listeners = this._thumbnailCallbacks.get(assetName); - if(listeners) + if (listeners) { this._thumbnailCallbacks.delete(assetName); const image = this._roomContentLoader.getImage(assetName); - if(image) + if (image) { - for(const listener of listeners) + for (const listener of listeners) { - if(!listener) continue; + if (!listener) continue; listener.imageReady(id, null, image); } @@ -2813,31 +2810,31 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let imageResult: ImageResult = null; const scale = 1; - if(_arg_3) + if (_arg_3) { imageResult = this.getRoomObjectImage(this._activeRoomId, objectId, category, new Vector3d(), 1, null); } else { - if(this._roomContentLoader) + if (this._roomContentLoader) { - if(category === RoomObjectCategory.FLOOR) + if (category === RoomObjectCategory.FLOOR) { type = this._roomContentLoader.getFurnitureFloorNameForTypeId(objectId); colorIndex = this._roomContentLoader.getFurnitureFloorColorIndex(objectId); } - else if(category === RoomObjectCategory.WALL) + else if (category === RoomObjectCategory.WALL) { type = this._roomContentLoader.getFurnitureWallNameForTypeId(objectId, instanceData); colorIndex = this._roomContentLoader.getFurnitureWallColorIndex(objectId); } - if(category === RoomObjectCategory.UNIT) + if (category === RoomObjectCategory.UNIT) { type = RoomObjectUserType.getTypeString(objectId); - if(type === 'pet') + if (type === 'pet') { type = this.getPetType(instanceData); @@ -2857,11 +2854,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } } - if(!imageResult || !imageResult.data) return; + if (!imageResult || !imageResult.data) return; const canvas = this.getActiveRoomInstanceRenderingCanvas(); - if(!canvas) return; + if (!canvas) return; const overlay = this.getRenderingCanvasOverlay(canvas); @@ -2869,7 +2866,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const _local_15 = this.addOverlayIconSprite(overlay, RoomEngine.OBJECT_ICON_SPRITE, imageResult.data, scale); - if(_local_15) + if (_local_15) { _local_15.x = (this._activeRoomActiveCanvasMouseX - (imageResult.data.width / 2)); _local_15.y = (this._activeRoomActiveCanvasMouseY - (imageResult.data.height / 2)); @@ -2878,7 +2875,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getRoomObjectImage(roomId: number, objectId: number, category: number, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor: number = 0): ImageResult { - if(!this._roomManager) return null; + if (!this._roomManager) return null; let id = -1; let type: string = null; @@ -2889,16 +2886,16 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const roomIdString = this.getRoomId(roomId); const roomInstance = this._roomManager.getRoomInstance(roomIdString); - if(roomInstance) + if (roomInstance) { const roomObject = roomInstance.getRoomObject(objectId, category); - if(roomObject && roomObject.model) + if (roomObject && roomObject.model) { id = roomObject.id; type = roomObject.type; - switch(category) + switch (category) { case RoomObjectCategory.FLOOR: case RoomObjectCategory.WALL: { @@ -2907,7 +2904,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const dataFormat = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA_FORMAT); - if(dataFormat !== LegacyDataType.FORMAT_KEY) + if (dataFormat !== LegacyDataType.FORMAT_KEY) { data = ObjectDataFactory.getData(dataFormat); @@ -2931,7 +2928,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let type: string = null; let color = ''; - if(this._roomContentLoader) + if (this._roomContentLoader) { type = this._roomContentLoader.getFurnitureFloorNameForTypeId(typeId); color = (this._roomContentLoader.getFurnitureFloorColorIndex(typeId).toString()); @@ -2952,7 +2949,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let type: string = null; let color = ''; - if(this._roomContentLoader) + if (this._roomContentLoader) { type = this._roomContentLoader.getFurnitureWallNameForTypeId(typeId, extra); color = (this._roomContentLoader.getFurnitureWallColorIndex(typeId).toString()); @@ -2973,13 +2970,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let type: string = null; let color = ''; - if(this._roomContentLoader) + if (this._roomContentLoader) { type = this._roomContentLoader.getFurnitureFloorNameForTypeId(typeId); color = (this._roomContentLoader.getFurnitureFloorColorIndex(typeId).toString()); } - if((scale === 1) && listener) + if ((scale === 1) && listener) { return this.getGenericRoomObjectThumbnail(type, color, listener, extras, objectData); } @@ -2992,13 +2989,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let type: string = null; let color = ''; - if(this._roomContentLoader) + if (this._roomContentLoader) { type = this._roomContentLoader.getFurnitureWallNameForTypeId(typeId); color = this._roomContentLoader.getFurnitureWallColorIndex(typeId).toString(); } - if((scale === 1) && listener) + if ((scale === 1) && listener) { return this.getGenericRoomObjectThumbnail(type, color, listener, extras, null); } @@ -3011,56 +3008,56 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let type: string = null; let value = ((((typeId + ' ') + paletteId) + ' ') + color.toString(16)); - if(headOnly) value = (value + (' ' + 'head')); + if (headOnly) value = (value + (' ' + 'head')); - if(customParts) + if (customParts) { value = (value + (' ' + customParts.length)); - for(const _local_13 of customParts) + for (const _local_13 of customParts) { value = (value + (((((' ' + _local_13.layerId) + ' ') + _local_13.partId) + ' ') + _local_13.paletteId)); } } - if(this._roomContentLoader) type = this._roomContentLoader.getPetNameForType(typeId); + if (this._roomContentLoader) type = this._roomContentLoader.getPetNameForType(typeId); return this.getGenericRoomObjectImage(type, value, direction, scale, listener, bgColor, null, null, -1, -1, posture); } public getGenericRoomObjectImage(type: string, value: string, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor: number = 0, extras: string = null, objectData: IObjectData = null, state: number = -1, frameCount: number = -1, posture: string = null, originalId: number = -1): ImageResult { - if(!this._roomManager) return null; + if (!this._roomManager) return null; const imageResult = new ImageResult(); imageResult.id = -1; - if(!this._ready || !type) return imageResult; + if (!this._ready || !type) return imageResult; let roomInstance = this._roomManager.getRoomInstance(RoomEngine.TEMPORARY_ROOM); - if(!roomInstance) + if (!roomInstance) { roomInstance = this._roomManager.createRoomInstance(RoomEngine.TEMPORARY_ROOM); - if(!roomInstance) return imageResult; + if (!roomInstance) return imageResult; } let objectId = this._imageObjectIdBank.reserveNumber(); const objectCategory = this.getRoomObjectCategoryForType(type); - if(objectId < 0) return imageResult; + if (objectId < 0) return imageResult; objectId++; const roomObject = (roomInstance.createRoomObjectAndInitalize(objectId, type, objectCategory) as IRoomObjectController); - if(!roomObject || !roomObject.model || !roomObject.logic) return imageResult; + if (!roomObject || !roomObject.model || !roomObject.logic) return imageResult; const model = roomObject.model; - switch(objectCategory) + switch (objectCategory) { case RoomObjectCategory.FLOOR: case RoomObjectCategory.WALL: @@ -3068,7 +3065,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato model.setValue(RoomObjectVariable.FURNITURE_EXTRAS, extras); break; case RoomObjectCategory.UNIT: - if((type === RoomObjectUserType.USER) || (type === RoomObjectUserType.BOT) || (type === RoomObjectUserType.RENTABLE_BOT) || (type === RoomObjectUserType.PET)) + if ((type === RoomObjectUserType.USER) || (type === RoomObjectUserType.BOT) || (type === RoomObjectUserType.RENTABLE_BOT) || (type === RoomObjectUserType.PET)) { model.setValue(RoomObjectVariable.FIGURE, value); } @@ -3079,16 +3076,16 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato model.setValue(RoomObjectVariable.PET_PALETTE_INDEX, figureData.paletteId); model.setValue(RoomObjectVariable.PET_COLOR, figureData.color); - if(figureData.headOnly) model.setValue(RoomObjectVariable.PET_HEAD_ONLY, 1); + if (figureData.headOnly) model.setValue(RoomObjectVariable.PET_HEAD_ONLY, 1); - if(figureData.hasCustomParts) + if (figureData.hasCustomParts) { model.setValue(RoomObjectVariable.PET_CUSTOM_LAYER_IDS, figureData.customLayerIds); model.setValue(RoomObjectVariable.PET_CUSTOM_PARTS_IDS, figureData.customPartIds); model.setValue(RoomObjectVariable.PET_CUSTOM_PALETTE_IDS, figureData.customPaletteIds); } - if(posture) model.setValue(RoomObjectVariable.FIGURE_POSTURE, posture); + if (posture) model.setValue(RoomObjectVariable.FIGURE_POSTURE, posture); } break; case RoomObjectCategory.ROOM: @@ -3099,16 +3096,16 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const visualization = roomObject.visualization; - if(!visualization) + if (!visualization) { roomInstance.removeRoomObject(objectId, objectCategory); return imageResult; } - if((state > -1) || objectData) + if ((state > -1) || objectData) { - if(objectData && (objectData.getLegacyString() !== '')) + if (objectData && (objectData.getLegacyString() !== '')) { roomObject.logic.processUpdateMessage(new ObjectDataUpdateMessage(parseInt(objectData.getLegacyString()), objectData)); } @@ -3122,11 +3119,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato visualization.update(geometry, 0, true, false); - if(frameCount > 0) + if (frameCount > 0) { let i = 0; - while(i < frameCount) + while (i < frameCount) { visualization.update(geometry, 0, true, false); @@ -3139,11 +3136,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato imageResult.data = texture; imageResult.id = objectId; - if(!this.isRoomContentTypeLoaded(type) && listener) + if (!this.isRoomContentTypeLoaded(type) && listener) { let imageListeners = this._imageCallbacks.get(objectId.toString()); - if(!imageListeners) + if (!imageListeners) { imageListeners = []; @@ -3170,27 +3167,27 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getGenericRoomObjectThumbnail(type: string, param: string, listener: IGetImageListener, extraData: string = null, stuffData: IObjectData = null): ImageResult { - if(!this._roomManager) return null; + if (!this._roomManager) return null; const imageResult = new ImageResult(); imageResult.id = -1; - if(!this._ready || !type) return imageResult; + if (!this._ready || !type) return imageResult; let roomInstance = this._roomManager.getRoomInstance(RoomEngine.TEMPORARY_ROOM); - if(!roomInstance) + if (!roomInstance) { roomInstance = this._roomManager.createRoomInstance(RoomEngine.TEMPORARY_ROOM); - if(!roomInstance) return imageResult; + if (!roomInstance) return imageResult; } let objectId = this._thumbnailObjectIdBank.reserveNumber(); const objectCategory = this.getRoomObjectCategoryForType(type); - if(objectId < 0) return imageResult; + if (objectId < 0) return imageResult; objectId++; @@ -3202,11 +3199,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const asset = this._roomContentLoader.getImage(assetName); - if(!asset && listener) + if (!asset && listener) { let contentListeners = this._thumbnailCallbacks.get(assetName); - if(!contentListeners) + if (!contentListeners) { contentListeners = []; @@ -3219,7 +3216,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } else { - if(asset) + if (asset) { imageResult.image = asset; } @@ -3236,7 +3233,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const roomInstance = this._roomManager.getRoomInstance(RoomEngine.TEMPORARY_ROOM); - if(!roomInstance || !this._roomContentLoader) return; + if (!roomInstance || !this._roomContentLoader) return; const objectCategory = this._roomContentLoader.getCategoryForType(type); const objectManager = roomInstance.getManager(objectCategory); @@ -3244,29 +3241,29 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let geometry: RoomGeometry = null; let scale = 0; - if(objectManager && objectManager.objects.length) + if (objectManager && objectManager.objects.length) { - for(const roomObject of objectManager.objects.getValues()) + for (const roomObject of objectManager.objects.getValues()) { - if(roomObject && roomObject.model && (roomObject.type === type)) + if (roomObject && roomObject.model && (roomObject.type === type)) { const objectId = roomObject.id; const visualization = roomObject.visualization; let texture: RenderTexture = null; - if(visualization) + if (visualization) { const imageScale = roomObject.model.getValue(RoomObjectVariable.IMAGE_QUERY_SCALE); - if(geometry && (scale !== imageScale)) + if (geometry && (scale !== imageScale)) { geometry.dispose(); geometry = null; } - if(!geometry) + if (!geometry) { scale = imageScale; @@ -3284,15 +3281,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const imageListeners = this._imageCallbacks.get(objectId.toString()); - if(imageListeners) + if (imageListeners) { this._imageCallbacks.delete(objectId.toString()); - for(const imageListener of imageListeners) + for (const imageListener of imageListeners) { - if(!imageListener) continue; + if (!imageListener) continue; - if(texture) imageListener.imageReady(objectId, texture); + if (texture) imageListener.imageReady(objectId, texture); else imageListener.imageFailed(objectId); } } @@ -3300,19 +3297,19 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } } - if(geometry) geometry.dispose(); + if (geometry) geometry.dispose(); } public setObjectMoverIconSpriteVisible(k: boolean): void { const canvas = this.getActiveRoomInstanceRenderingCanvas(); - if(!canvas) return; + if (!canvas) return; const overlay = this.getRenderingCanvasOverlay(canvas); const sprite = this.getOverlayIconSprite(overlay, RoomEngine.OBJECT_ICON_SPRITE); - if(sprite) + if (sprite) { sprite.visible = k; } @@ -3322,7 +3319,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const canvas = this.getActiveRoomInstanceRenderingCanvas(); - if(!canvas) return; + if (!canvas) return; const sprite = this.getRenderingCanvasOverlay(canvas); @@ -3331,32 +3328,32 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private getRenderingCanvasOverlay(k: IRoomRenderingCanvas): NitroSprite { - if(!k) return null; + if (!k) return null; const displayObject = (k.master as Container); - if(!displayObject) return null; + if (!displayObject) return null; return ((displayObject.getChildByName(RoomEngine.OVERLAY) as NitroSprite) || null); } private removeOverlayIconSprite(k: NitroSprite, _arg_2: string): boolean { - if(!k) return false; + if (!k) return false; let index = (k.children.length - 1); - while(index >= 0) + while (index >= 0) { const child = (k.getChildAt(index) as NitroSprite); - if(child) + if (child) { - if(child.name === _arg_2) + if (child.name === _arg_2) { k.removeChildAt(index); - if(child.children.length) + if (child.children.length) { const firstChild = (child.getChildAt(0) as NitroSprite); @@ -3377,17 +3374,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private getOverlayIconSprite(k: NitroSprite, _arg_2: string): NitroSprite { - if(!k) return null; + if (!k) return null; let index = (k.children.length - 1); - while(index >= 0) + while (index >= 0) { const child = (k.getChildAt(index) as NitroSprite); - if(child) + if (child) { - if(child.name === _arg_2) return child; + if (child.name === _arg_2) return child; } index--; @@ -3398,13 +3395,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getRoomObjects(roomId: number, category: number): IRoomObject[] { - if(this._ready) + if (this._ready) { const _local_3 = this.getRoomId(roomId); const _local_4 = this._roomManager.getRoomInstance(_local_3); - if(_local_4) return _local_4.getRoomObjectsForCategory(category); + if (_local_4) return _local_4.getRoomObjectsForCategory(category); } return []; @@ -3414,21 +3411,21 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const tileObjectMap = this.getRoomInstanceData(k).tileObjectMap; - if(tileObjectMap) tileObjectMap.addRoomObject(_arg_2); + if (tileObjectMap) tileObjectMap.addRoomObject(_arg_2); } public refreshTileObjectMap(k: number, _arg_2: string): void { const tileObjectMap = this.getRoomInstanceData(k).tileObjectMap; - if(tileObjectMap) tileObjectMap.populate(this.getRoomObjects(k, RoomObjectCategory.FLOOR)); + if (tileObjectMap) tileObjectMap.populate(this.getRoomObjects(k, RoomObjectCategory.FLOOR)); } public getRenderRoomMessage(k: Rectangle, _arg_2: number, _arg_3: boolean = false, _arg_4: boolean = true, _arg_5: boolean = false, canvasId: number = -1): IMessageComposer { let canvas: IRoomRenderingCanvas = null; - if(canvasId > -1) + if (canvasId > -1) { canvas = this.getRoomInstanceRenderingCanvas(this._activeRoomId, canvasId); } @@ -3437,16 +3434,16 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato canvas = this.getActiveRoomInstanceRenderingCanvas(); } - if(!canvas) return null; + if (!canvas) return null; - if(_arg_5) + if (_arg_5) { canvas.skipSpriteVisibilityChecking(); } let _local_8 = -1; - if(((!(_arg_4)) && (!(this._roomSessionManager.getSession(this._activeRoomId) == null)))) + if (((!(_arg_4)) && (!(this._roomSessionManager.getSession(this._activeRoomId) == null)))) { _local_8 = this._roomSessionManager.getSession(this._activeRoomId).ownRoomIndex; } @@ -3456,9 +3453,9 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const _local_11 = _local_9.getRoomRenderingModifiers(this); const _local_12 = _local_9.getRoomPlanes(k, canvas, this, _arg_2); - if(_arg_5) canvas.resumeSpriteVisibilityChecking(); + if (_arg_5) canvas.resumeSpriteVisibilityChecking(); - if(_arg_3) + if (_arg_3) { //return new RenderRoomThumbnailMessageComposer(_local_12, _local_10, _local_11, this._activeRoomId, this._sessionDataManager._Str_8500); } @@ -3474,7 +3471,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { let canvas: IRoomRenderingCanvas = null; - if(canvasId > -1) + if (canvasId > -1) { canvas = this.getRoomInstanceRenderingCanvas(this._activeRoomId, canvasId); } @@ -3485,7 +3482,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato let texture: RenderTexture = null; - if(bounds) + if (bounds) { texture = TextureUtils.generateTexture(canvas.master, bounds); } @@ -3501,7 +3498,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { let composer: RenderRoomMessageComposer = null; - if(saveAsThumbnail) composer = new RenderRoomThumbnailMessageComposer(); + if (saveAsThumbnail) composer = new RenderRoomThumbnailMessageComposer(); else composer = new RenderRoomMessageComposer(); composer.assignBitmap(texture); @@ -3513,7 +3510,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { let composer: RenderRoomMessageComposer = null; - if(saveAsThumbnail) composer = new RenderRoomThumbnailMessageComposer(); + if (saveAsThumbnail) composer = new RenderRoomThumbnailMessageComposer(); else composer = new RenderRoomMessageComposer(); composer.assignBase64(base64); @@ -3535,18 +3532,18 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private getRoomIdFromString(roomId: string): number { - if(!roomId) return -1; + if (!roomId) return -1; const split = roomId.split('_'); - if(split.length <= 0) return -1; + if (split.length <= 0) return -1; return (parseInt(split[0]) || 0); } private getRoomObjectRoomId(object: IRoomObject): string { - if(!object || !object.model) return null; + if (!object || !object.model) return null; return (object.model.getValue(RoomObjectVariable.OBJECT_ROOM_ID)); } @@ -3560,11 +3557,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { let type = -1; - if(figure) + if (figure) { const parts = figure.split(' '); - if(parts.length > 1) type = parseInt(parts[0]); + if (parts.length > 1) type = parseInt(parts[0]); } return type; @@ -3572,15 +3569,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private getPetType(type: string): string { - if(!type) return null; + if (!type) return null; const parts = type.split(' '); - if(parts.length > 1) + if (parts.length > 1) { const typeId = parseInt(parts[0]); - if(this._roomContentLoader) return this._roomContentLoader.getPetNameForType(typeId); + if (this._roomContentLoader) return this._roomContentLoader.getPetNameForType(typeId); return 'pet'; } @@ -3590,28 +3587,28 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public isRoomContentTypeLoaded(name: string): boolean { - if(!this._roomContentLoader) return false; + if (!this._roomContentLoader) return false; return (this._roomContentLoader.getCollection(name) !== null); } public getPetColorResult(petIndex: number, paletteIndex: number): PetColorResult { - if(!this._roomContentLoader) return null; + if (!this._roomContentLoader) return null; return this._roomContentLoader.getPetColorResult(petIndex, paletteIndex); } public getPetColorResultsForTag(petIndex: number, tagName: string): PetColorResult[] { - if(!this._roomContentLoader) return null; + if (!this._roomContentLoader) return null; return this._roomContentLoader.getPetColorResultsForTag(petIndex, tagName); } public deleteRoomObject(objectId: number, objectCategory: number): boolean { - if(!this._roomObjectEventHandler || (objectCategory !== RoomObjectCategory.WALL)) return false; + if (!this._roomObjectEventHandler || (objectCategory !== RoomObjectCategory.WALL)) return false; return this._roomObjectEventHandler.deleteWallItem(this._activeRoomId, objectId); } @@ -3688,7 +3685,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public get isDecorating(): boolean { - if(!this._roomSessionManager) return false; + if (!this._roomSessionManager) return false; const session = this._roomSessionManager.getSession(this._activeRoomId); @@ -3702,14 +3699,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public get selectedAvatarId(): number { - if(!this._roomObjectEventHandler) return -1; + if (!this._roomObjectEventHandler) return -1; return this._roomObjectEventHandler.selectedAvatarId; } public getRoomObjectCount(roomId: number, categoryId: number): number { - if(this._roomManager == null) return 0; + if (this._roomManager == null) return 0; return this._roomManager.getRoomInstance(roomId.toString()).getRoomObjectsForCategory(categoryId).length; } diff --git a/src/nitro/room/RoomMessageHandler.ts b/src/nitro/room/RoomMessageHandler.ts index 0108d3f8..1ff9ad17 100644 --- a/src/nitro/room/RoomMessageHandler.ts +++ b/src/nitro/room/RoomMessageHandler.ts @@ -1,5 +1,5 @@ -import { Disposable } from '../../core/common/disposable/Disposable'; -import { IConnection } from '../../core/communication/connections/IConnection'; +import { IConnection } from '../../api'; +import { Disposable } from '../../core/common/Disposable'; import { IVector3D } from '../../room/utils/IVector3D'; import { Vector3d } from '../../room/utils/Vector3d'; import { AvatarGuideStatus } from '../avatar/enum/AvatarGuideStatus'; @@ -100,7 +100,7 @@ export class RoomMessageHandler extends Disposable this._roomCreator = null; this._latestEntryTileEvent = null; - if(this._planeParser) + if (this._planeParser) { this._planeParser.dispose(); @@ -110,7 +110,7 @@ export class RoomMessageHandler extends Disposable public setConnection(connection: IConnection) { - if(this._connection || !connection) return; + if (this._connection || !connection) return; this._connection = connection; @@ -162,9 +162,9 @@ export class RoomMessageHandler extends Disposable public setRoomId(id: number): void { - if(this._currentRoomId !== 0) + if (this._currentRoomId !== 0) { - if(this._roomCreator) this._roomCreator.destroyRoom(this._currentRoomId); + if (this._roomCreator) this._roomCreator.destroyRoom(this._currentRoomId); } this._currentRoomId = id; @@ -179,11 +179,11 @@ export class RoomMessageHandler extends Disposable private onUserInfoEvent(event: UserInfoEvent): void { - if(!(event instanceof UserInfoEvent) || !event.connection) return; + if (!(event instanceof UserInfoEvent) || !event.connection) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this._ownUserId = parser.userInfo.userId; } @@ -192,17 +192,17 @@ export class RoomMessageHandler extends Disposable { const parser = event.getParser(); - if(this._currentRoomId !== parser.roomId) + if (this._currentRoomId !== parser.roomId) { this.setRoomId(parser.roomId); } - if(this._roomCreator) + if (this._roomCreator) { this._roomCreator.setRoomInstanceModelName(parser.roomId, parser.name); } - if(this._initialConnection) + if (this._initialConnection) { event.connection.send(new FurnitureAliasesComposer()); @@ -216,17 +216,17 @@ export class RoomMessageHandler extends Disposable private onRoomPaintEvent(event: RoomPaintEvent): void { - if(!(event instanceof RoomPaintEvent)) return; + if (!(event instanceof RoomPaintEvent)) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const floorType = parser.floorType; const wallType = parser.wallType; const landscapeType = parser.landscapeType; - if(this._roomCreator) + if (this._roomCreator) { this._roomCreator.updateRoomInstancePlaneType(this._currentRoomId, floorType, wallType, landscapeType); } @@ -234,15 +234,15 @@ export class RoomMessageHandler extends Disposable private onRoomModelEvent(event: FloorHeightMapEvent): void { - if(!(event instanceof FloorHeightMapEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FloorHeightMapEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const wallGeometry = this._roomCreator.getLegacyWallGeometry(this._currentRoomId); - if(!wallGeometry) return; + if (!wallGeometry) return; this._planeParser.reset(); @@ -253,7 +253,7 @@ export class RoomMessageHandler extends Disposable let entryTile: RoomEntryTileMessageParser = null; - if(this._latestEntryTileEvent) entryTile = this._latestEntryTileEvent.getParser(); + if (this._latestEntryTileEvent) entryTile = this._latestEntryTileEvent.getParser(); let doorX = -1; let doorY = -1; @@ -262,17 +262,17 @@ export class RoomMessageHandler extends Disposable let y = 0; - while(y < height) + while (y < height) { let x = 0; - while(x < width) + while (x < width) { const tileHeight = parser.getHeight(x, y); - if(((((y > 0) && (y < (height - 1))) || ((x > 0) && (x < (width - 1)))) && (!(tileHeight == RoomPlaneParser.TILE_BLOCKED))) && ((entryTile == null) || ((x == entryTile.x) && (y == entryTile.y)))) + if (((((y > 0) && (y < (height - 1))) || ((x > 0) && (x < (width - 1)))) && (!(tileHeight == RoomPlaneParser.TILE_BLOCKED))) && ((entryTile == null) || ((x == entryTile.x) && (y == entryTile.y)))) { - if(((parser.getHeight(x, (y - 1)) == RoomPlaneParser.TILE_BLOCKED) && (parser.getHeight((x - 1), y) == RoomPlaneParser.TILE_BLOCKED)) && (parser.getHeight(x, (y + 1)) == RoomPlaneParser.TILE_BLOCKED)) + if (((parser.getHeight(x, (y - 1)) == RoomPlaneParser.TILE_BLOCKED) && (parser.getHeight((x - 1), y) == RoomPlaneParser.TILE_BLOCKED)) && (parser.getHeight(x, (y + 1)) == RoomPlaneParser.TILE_BLOCKED)) { doorX = (x + 0.5); doorY = y; @@ -280,7 +280,7 @@ export class RoomMessageHandler extends Disposable doorDirection = 90; } - if(((parser.getHeight(x, (y - 1)) == RoomPlaneParser.TILE_BLOCKED) && (parser.getHeight((x - 1), y) == RoomPlaneParser.TILE_BLOCKED)) && (parser.getHeight((x + 1), y) == RoomPlaneParser.TILE_BLOCKED)) + if (((parser.getHeight(x, (y - 1)) == RoomPlaneParser.TILE_BLOCKED) && (parser.getHeight((x - 1), y) == RoomPlaneParser.TILE_BLOCKED)) && (parser.getHeight((x + 1), y) == RoomPlaneParser.TILE_BLOCKED)) { doorX = x; doorY = (y + 0.5); @@ -301,7 +301,7 @@ export class RoomMessageHandler extends Disposable this._planeParser.initializeFromTileData(parser.wallHeight); this._planeParser.setTileHeight(Math.floor(doorX), Math.floor(doorY), (doorZ + this._planeParser.wallHeight)); - if(parser.scale === 64) + if (parser.scale === 64) { this._planeParser.restrictsDragging = true; this._planeParser.restrictsScaling = true; @@ -319,11 +319,11 @@ export class RoomMessageHandler extends Disposable let heightIterator = (parser.height - 1); - while(heightIterator >= 0) + while (heightIterator >= 0) { let widthIterator = (parser.width - 1); - while(widthIterator >= 0) + while (widthIterator >= 0) { wallGeometry.setHeight(widthIterator, heightIterator, this._planeParser.getTileHeight(widthIterator, heightIterator)); widthIterator--; @@ -346,11 +346,11 @@ export class RoomMessageHandler extends Disposable private onRoomHeightMapEvent(event: RoomHeightMapEvent): void { - if(!(event instanceof RoomHeightMapEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomHeightMapEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const width = parser.width; const height = parser.height; @@ -358,11 +358,11 @@ export class RoomMessageHandler extends Disposable let y = 0; - while(y < height) + while (y < height) { let x = 0; - while(x < width) + while (x < width) { heightMap.setTileHeight(x, y, parser.getTileHeight(x, y)); heightMap.setStackingBlocked(x, y, parser.getStackingBlocked(x, y)); @@ -379,17 +379,17 @@ export class RoomMessageHandler extends Disposable private onRoomHeightMapUpdateEvent(event: RoomHeightMapUpdateEvent): void { - if(!(event instanceof RoomHeightMapUpdateEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomHeightMapUpdateEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const heightMap = this._roomCreator.getFurnitureStackingHeightMap(this._currentRoomId); - if(!heightMap) return; + if (!heightMap) return; - while(parser.next()) + while (parser.next()) { heightMap.setTileHeight(parser.x, parser.y, parser.tileHeight()); heightMap.setStackingBlocked(parser.x, parser.y, parser.isStackingBlocked()); @@ -401,18 +401,18 @@ export class RoomMessageHandler extends Disposable private onRoomThicknessEvent(event: RoomVisualizationSettingsEvent): void { - if(!(event instanceof RoomVisualizationSettingsEvent)) return; + if (!(event instanceof RoomVisualizationSettingsEvent)) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const visibleWall = !parser.hideWalls; const visibleFloor = true; const thicknessWall = parser.thicknessWall; const thicknessFloor = parser.thicknessFloor; - if(this._roomCreator) + if (this._roomCreator) { this._roomCreator.updateRoomInstancePlaneVisibility(this._currentRoomId, visibleWall, visibleFloor); this._roomCreator.updateRoomInstancePlaneThickness(this._currentRoomId, thicknessWall, thicknessFloor); @@ -421,14 +421,14 @@ export class RoomMessageHandler extends Disposable private onRoomDoorEvent(event: RoomEntryTileMessageEvent): void { - if(!(event instanceof RoomEntryTileMessageEvent)) return; + if (!(event instanceof RoomEntryTileMessageEvent)) return; this._latestEntryTileEvent = event; } private onRoomRollingEvent(event: ObjectsRollingEvent): void { - if(!(event instanceof ObjectsRollingEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof ObjectsRollingEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); @@ -437,11 +437,11 @@ export class RoomMessageHandler extends Disposable const furnitureRolling = parser.itemsRolling; - if(furnitureRolling && furnitureRolling.length) + if (furnitureRolling && furnitureRolling.length) { - for(const rollData of furnitureRolling) + for (const rollData of furnitureRolling) { - if(!rollData) continue; + if (!rollData) continue; this._roomCreator.rollRoomObjectFloor(this._currentRoomId, rollData.id, rollData.location, rollData.targetLocation); } @@ -449,17 +449,17 @@ export class RoomMessageHandler extends Disposable const unitRollData = parser.unitRolling; - if(unitRollData) + if (unitRollData) { this._roomCreator.updateRoomObjectUserLocation(this._currentRoomId, unitRollData.id, unitRollData.location, unitRollData.targetLocation); const object = this._roomCreator.getRoomObjectUser(this._currentRoomId, unitRollData.id); - if(object && object.type !== RoomObjectUserType.MONSTER_PLANT) + if (object && object.type !== RoomObjectUserType.MONSTER_PLANT) { let posture = 'std'; - switch(unitRollData.movementType) + switch (unitRollData.movementType) { case ObjectRolling.MOVE: posture = 'mv'; @@ -476,13 +476,13 @@ export class RoomMessageHandler extends Disposable private onObjectsDataUpdateEvent(event: ObjectsDataUpdateEvent): void { - if(!(event instanceof ObjectsDataUpdateEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof ObjectsDataUpdateEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; - for(const object of parser.objects) + for (const object of parser.objects) { this._roomCreator.updateRoomObjectFloor(this._currentRoomId, object.id, null, null, object.state, object.data); } @@ -490,7 +490,7 @@ export class RoomMessageHandler extends Disposable private onFurnitureAliasesEvent(event: FurnitureAliasesEvent): void { - if(!(event instanceof FurnitureAliasesEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureAliasesEvent) || !event.connection || !this._roomCreator) return; const alises = event.getParser().aliases; @@ -499,32 +499,32 @@ export class RoomMessageHandler extends Disposable private onFurnitureFloorAddEvent(event: FurnitureFloorAddEvent): void { - if(!(event instanceof FurnitureFloorAddEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureFloorAddEvent) || !event.connection || !this._roomCreator) return; const item = event.getParser().item; - if(!item) return; + if (!item) return; this.addRoomObjectFurnitureFloor(this._currentRoomId, item); } private onFurnitureFloorEvent(event: FurnitureFloorEvent): void { - if(!(event instanceof FurnitureFloorEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureFloorEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const totalObjects = parser.items.length; let iterator = 0; - while(iterator < totalObjects) + while (iterator < totalObjects) { const object = parser.items[iterator]; - if(object) this.addRoomObjectFurnitureFloor(this._currentRoomId, object); + if (object) this.addRoomObjectFurnitureFloor(this._currentRoomId, object); iterator++; } @@ -532,13 +532,13 @@ export class RoomMessageHandler extends Disposable private onFurnitureFloorRemoveEvent(event: FurnitureFloorRemoveEvent): void { - if(!(event instanceof FurnitureFloorRemoveEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureFloorRemoveEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; - if(parser.delay > 0) + if (parser.delay > 0) { setTimeout(() => { @@ -553,11 +553,11 @@ export class RoomMessageHandler extends Disposable private onFurnitureFloorUpdateEvent(event: FurnitureFloorUpdateEvent): void { - if(!(event instanceof FurnitureFloorUpdateEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureFloorUpdateEvent) || !event.connection || !this._roomCreator) return; const item = event.getParser().item; - if(!item) return; + if (!item) return; const location: IVector3D = new Vector3d(item.x, item.y, item.z); const direction: IVector3D = new Vector3d(item.direction); @@ -569,32 +569,32 @@ export class RoomMessageHandler extends Disposable private onFurnitureWallAddEvent(event: FurnitureWallAddEvent): void { - if(!(event instanceof FurnitureWallAddEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureWallAddEvent) || !event.connection || !this._roomCreator) return; const data = event.getParser().item; - if(!data) return; + if (!data) return; this.addRoomObjectFurnitureWall(this._currentRoomId, data); } private onFurnitureWallEvent(event: FurnitureWallEvent): void { - if(!(event instanceof FurnitureWallEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureWallEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const totalObjects = parser.items.length; let iterator = 0; - while(iterator < totalObjects) + while (iterator < totalObjects) { const data = parser.items[iterator]; - if(data) this.addRoomObjectFurnitureWall(this._currentRoomId, data); + if (data) this.addRoomObjectFurnitureWall(this._currentRoomId, data); iterator++; } @@ -602,26 +602,26 @@ export class RoomMessageHandler extends Disposable private onFurnitureWallRemoveEvent(event: FurnitureWallRemoveEvent): void { - if(!(event instanceof FurnitureWallRemoveEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureWallRemoveEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this._roomCreator.removeRoomObjectWall(this._currentRoomId, parser.itemId, parser.userId); } private onFurnitureWallUpdateEvent(event: FurnitureWallUpdateEvent): void { - if(!(event instanceof FurnitureWallUpdateEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureWallUpdateEvent) || !event.connection || !this._roomCreator) return; const wallGeometry = this._roomCreator.getLegacyWallGeometry(this._currentRoomId); - if(!wallGeometry) return; + if (!wallGeometry) return; const item = event.getParser().item; - if(!item) return; + if (!item) return; const location = wallGeometry.getLocation(item.width, item.height, item.localX, item.localY, item.direction); const direction = new Vector3d(wallGeometry.getDirection(item.direction)); @@ -632,7 +632,7 @@ export class RoomMessageHandler extends Disposable private onFurnitureDataEvent(event: FurnitureDataEvent): void { - if(!(event instanceof FurnitureDataEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof FurnitureDataEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); @@ -641,7 +641,7 @@ export class RoomMessageHandler extends Disposable private onItemDataUpdateMessageEvent(event: ItemDataUpdateMessageEvent): void { - if(!(event instanceof ItemDataUpdateMessageEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof ItemDataUpdateMessageEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); @@ -650,7 +650,7 @@ export class RoomMessageHandler extends Disposable private onOneWayDoorStatusMessageEvent(event: OneWayDoorStatusMessageEvent): void { - if(!(event instanceof OneWayDoorStatusMessageEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof OneWayDoorStatusMessageEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); @@ -659,7 +659,7 @@ export class RoomMessageHandler extends Disposable private onDiceValueMessageEvent(event: DiceValueMessageEvent): void { - if(!(event instanceof DiceValueMessageEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof DiceValueMessageEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); @@ -668,36 +668,36 @@ export class RoomMessageHandler extends Disposable private onRoomUnitDanceEvent(event: RoomUnitDanceEvent): void { - if(!(event instanceof RoomUnitDanceEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitDanceEvent) || !event.connection || !this._roomCreator) return; this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, event.getParser().unitId, RoomObjectVariable.FIGURE_DANCE, event.getParser().danceId); } private onRoomUnitEffectEvent(event: RoomUnitEffectEvent): void { - if(!(event instanceof RoomUnitEffectEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitEffectEvent) || !event.connection || !this._roomCreator) return; this._roomCreator.updateRoomObjectUserEffect(this._currentRoomId, event.getParser().unitId, event.getParser().effectId, event.getParser().delay); } private onRoomUnitEvent(event: RoomUnitEvent): void { - if(!(event instanceof RoomUnitEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitEvent) || !event.connection || !this._roomCreator) return; const users = event.getParser().users; - if(!users || !users.length) return; + if (!users || !users.length) return; - for(const user of users) + for (const user of users) { - if(!user) continue; + if (!user) continue; const location = new Vector3d(user.x, user.y, user.z); const direction = new Vector3d(user.dir); this._roomCreator.addRoomObjectUser(this._currentRoomId, user.roomIndex, location, direction, user.dir, user.userType, user.figure); - if(user.webID === this._ownUserId) + if (user.webID === this._ownUserId) { this._roomCreator.setRoomSessionOwnUser(this._currentRoomId, user.roomIndex); this._roomCreator.updateRoomObjectUserOwn(this._currentRoomId, user.roomIndex); @@ -705,9 +705,9 @@ export class RoomMessageHandler extends Disposable this._roomCreator.updateRoomObjectUserFigure(this._currentRoomId, user.roomIndex, user.figure, user.sex, user.subType, user.isRiding); - if(RoomObjectUserType.getTypeString(user.userType) === RoomObjectUserType.PET) + if (RoomObjectUserType.getTypeString(user.userType) === RoomObjectUserType.PET) { - if(this._roomCreator.getPetTypeId(user.figure) === PetType.MONSTERPLANT) + if (this._roomCreator.getPetTypeId(user.figure) === PetType.MONSTERPLANT) { this._roomCreator.updateRoomObjectUserPosture(this._currentRoomId, user.roomIndex, user.petPosture); } @@ -721,46 +721,46 @@ export class RoomMessageHandler extends Disposable private onRoomUnitExpressionEvent(event: RoomUnitExpressionEvent): void { - if(!(event instanceof RoomUnitExpressionEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitExpressionEvent) || !event.connection || !this._roomCreator) return; this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, event.getParser().unitId, RoomObjectVariable.FIGURE_EXPRESSION, event.getParser().expression); } private onRoomUnitHandItemEvent(event: RoomUnitHandItemEvent): void { - if(!(event instanceof RoomUnitHandItemEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitHandItemEvent) || !event.connection || !this._roomCreator) return; this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, event.getParser().unitId, RoomObjectVariable.FIGURE_CARRY_OBJECT, event.getParser().handId); } private onRoomUnitIdleEvent(event: RoomUnitIdleEvent): void { - if(!(event instanceof RoomUnitIdleEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitIdleEvent) || !event.connection || !this._roomCreator) return; this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, event.getParser().unitId, RoomObjectVariable.FIGURE_SLEEP, (event.getParser().isIdle ? 1 : 0)); } private onRoomUnitInfoEvent(event: RoomUnitInfoEvent): void { - if(!(event instanceof RoomUnitInfoEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitInfoEvent) || !event.connection || !this._roomCreator) return; this._roomCreator.updateRoomObjectUserFigure(this._currentRoomId, event.getParser().unitId, event.getParser().figure, event.getParser().gender); } private onRoomUnitNumberEvent(event: RoomUnitNumberEvent): void { - if(!(event instanceof RoomUnitNumberEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitNumberEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, parser.unitId, RoomObjectVariable.FIGURE_NUMBER_VALUE, parser.value); } private onRoomUnitRemoveEvent(event: RoomUnitRemoveEvent): void { - if(!(event instanceof RoomUnitRemoveEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitRemoveEvent) || !event.connection || !this._roomCreator) return; this._roomCreator.removeRoomObjectUser(this._currentRoomId, event.getParser().unitId); @@ -769,32 +769,32 @@ export class RoomMessageHandler extends Disposable private onRoomUnitStatusEvent(event: RoomUnitStatusEvent): void { - if(!(event instanceof RoomUnitStatusEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitStatusEvent) || !event.connection || !this._roomCreator) return; const statuses = event.getParser().statuses; - if(!statuses || !statuses.length) return; + if (!statuses || !statuses.length) return; const roomInstance = this._roomCreator.getRoomInstance(this._currentRoomId); - if(!roomInstance) return; + if (!roomInstance) return; const zScale = (roomInstance.model.getValue(RoomVariableEnum.ROOM_Z_SCALE) || 1); - for(const status of statuses) + for (const status of statuses) { - if(!status) continue; + if (!status) continue; let height = status.height; - if(height) height = (height / zScale); + if (height) height = (height / zScale); const location = new Vector3d(status.x, status.y, (status.z + height)); const direction = new Vector3d(status.direction); let goal: IVector3D = null; - if(status.didMove) goal = new Vector3d(status.targetX, status.targetY, status.targetZ); + if (status.didMove) goal = new Vector3d(status.targetX, status.targetY, status.targetZ); this._roomCreator.updateRoomObjectUserLocation(this._currentRoomId, status.id, location, goal, status.canStandUp, height, direction, status.headDirection); this._roomCreator.updateRoomObjectUserFlatControl(this._currentRoomId, status.id, null); @@ -804,24 +804,24 @@ export class RoomMessageHandler extends Disposable let postureType = RoomObjectVariable.STD; let parameter = ''; - if(status.actions && status.actions.length) + if (status.actions && status.actions.length) { - for(const action of status.actions) + for (const action of status.actions) { - if(!action) continue; + if (!action) continue; - switch(action.action) + switch (action.action) { case 'flatctrl': this._roomCreator.updateRoomObjectUserFlatControl(this._currentRoomId, status.id, action.value); break; case 'sign': - if(status.actions.length === 1) isPosture = false; + if (status.actions.length === 1) isPosture = false; this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, status.id, RoomObjectVariable.FIGURE_SIGN, parseInt(action.value)); break; case 'gst': - if(status.actions.length === 1) isPosture = false; + if (status.actions.length === 1) isPosture = false; this._roomCreator.updateRoomObjectUserPetGesture(this._currentRoomId, status.id, action.value); break; @@ -841,8 +841,8 @@ export class RoomMessageHandler extends Disposable } } - if(postureUpdate) this._roomCreator.updateRoomObjectUserPosture(this._currentRoomId, status.id, postureType, parameter); - else if(isPosture) this._roomCreator.updateRoomObjectUserPosture(this._currentRoomId, status.id, RoomObjectVariable.STD, ''); + if (postureUpdate) this._roomCreator.updateRoomObjectUserPosture(this._currentRoomId, status.id, postureType, parameter); + else if (isPosture) this._roomCreator.updateRoomObjectUserPosture(this._currentRoomId, status.id, RoomObjectVariable.STD, ''); } this.updateGuideMarker(); @@ -850,11 +850,11 @@ export class RoomMessageHandler extends Disposable private onRoomUnitChatEvent(event: RoomUnitChatEvent): void { - if(!event.connection || !this._roomCreator) return; + if (!event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this._roomCreator.updateRoomObjectUserGesture(this._currentRoomId, parser.roomIndex, parser.gesture); this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, parser.roomIndex, RoomObjectVariable.FIGURE_TALK, (parser.message.length / 10)); @@ -862,18 +862,18 @@ export class RoomMessageHandler extends Disposable private onRoomUnitTypingEvent(event: RoomUnitTypingEvent): void { - if(!(event instanceof RoomUnitTypingEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof RoomUnitTypingEvent) || !event.connection || !this._roomCreator) return; this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, event.getParser().unitId, RoomObjectVariable.FIGURE_IS_TYPING, event.getParser().isTyping ? 1 : 0); } private onPetFigureUpdateEvent(event: PetFigureUpdateEvent): void { - if(!(event instanceof PetFigureUpdateEvent) || !event.connection || !this._roomCreator) return; + if (!(event instanceof PetFigureUpdateEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this._roomCreator.updateRoomObjectUserFigure(this._currentRoomId, parser.roomIndex, parser.figureData.figuredata, '', '', parser.isRiding); } @@ -882,30 +882,30 @@ export class RoomMessageHandler extends Disposable { const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, parser.roomIndex, RoomObjectVariable.FIGURE_GAINED_EXPERIENCE, parser.gainedExperience); } private onYouArePlayingGameEvent(event: YouArePlayingGameEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this._roomCreator.setRoomEngineGameMode(this._currentRoomId, parser.isPlaying); } private addRoomObjectFurnitureFloor(roomId: number, data: FurnitureFloorDataParser): void { - if(!data || !this._roomCreator) return; + if (!data || !this._roomCreator) return; const location = new Vector3d(data.x, data.y, data.z); const direction = new Vector3d(data.direction); - if(data.spriteName) + if (data.spriteName) { this._roomCreator.addFurnitureFloorByTypeName(roomId, data.itemId, data.spriteName, location, direction, data.state, data.data, data.extra, data.expires, data.usagePolicy, data.userId, data.username, true, true, data.stackHeight); } @@ -917,15 +917,15 @@ export class RoomMessageHandler extends Disposable private addRoomObjectFurnitureWall(roomId: number, data: FurnitureWallDataParser): void { - if(!data || !this._roomCreator) return; + if (!data || !this._roomCreator) return; const wallGeometry = this._roomCreator.getLegacyWallGeometry(roomId); - if(!wallGeometry) return; + if (!wallGeometry) return; let location: IVector3D = null; - if(!data.isOldFormat) + if (!data.isOldFormat) { location = wallGeometry.getLocation(data.width, data.height, data.localX, data.localY, data.direction); } @@ -941,21 +941,21 @@ export class RoomMessageHandler extends Disposable private onIgnoreResultEvent(event: IgnoreResultEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const roomSession = this._roomCreator.roomSessionManager.getSession(this._currentRoomId); - if(!roomSession) return; + if (!roomSession) return; const userData = roomSession.userDataManager.getUserDataByName(parser.name); - if(!userData) return; + if (!userData) return; - switch(parser.result) + switch (parser.result) { case 1: case 2: @@ -1006,15 +1006,15 @@ export class RoomMessageHandler extends Disposable private setUserGuideStatus(userId: number, status: number): void { - if(!this._roomCreator || !this._roomCreator.roomSessionManager) return; + if (!this._roomCreator || !this._roomCreator.roomSessionManager) return; const roomSession = this._roomCreator.roomSessionManager.getSession(this._currentRoomId); - if(!roomSession) return; + if (!roomSession) return; const userData = roomSession.userDataManager.getDataByType(userId, RoomObjectType.USER); - if(!userData) return; + if (!userData) return; this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, userData.roomIndex, RoomObjectVariable.FIGURE_GUIDE_STATUS, status); } diff --git a/src/nitro/room/RoomObjectEventHandler.ts b/src/nitro/room/RoomObjectEventHandler.ts index b86b6dc7..87acd90a 100644 --- a/src/nitro/room/RoomObjectEventHandler.ts +++ b/src/nitro/room/RoomObjectEventHandler.ts @@ -1,5 +1,5 @@ -import { Disposable } from '../../core/common/disposable/Disposable'; -import { NitroLogger } from '../../core/common/logger/NitroLogger'; +import { Disposable } from '../../core/common/Disposable'; +import { NitroLogger } from '../../core/common/NitroLogger'; import { RoomId } from '../../room'; import { RoomObjectEvent } from '../../room/events/RoomObjectEvent'; import { RoomObjectMouseEvent } from '../../room/events/RoomObjectMouseEvent'; @@ -106,7 +106,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou public dispose(): void { - if(this._eventIds) + if (this._eventIds) { this._eventIds = null; } @@ -120,19 +120,19 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { let selectedData = this.getSelectedRoomObjectData(event.roomId); - if(!selectedData) return; + if (!selectedData) return; - if((selectedData.operation === RoomObjectOperationType.OBJECT_PLACE) && (selectedData.id === event.objectId)) + if ((selectedData.operation === RoomObjectOperationType.OBJECT_PLACE) && (selectedData.id === event.objectId)) { const roomObject = this._roomEngine.getRoomObject(event.roomId, selectedData.id, selectedData.category); - if(roomObject && roomObject.model) + if (roomObject && roomObject.model) { - if(selectedData.category === RoomObjectCategory.FLOOR) + if (selectedData.category === RoomObjectCategory.FLOOR) { const allowedDirections = roomObject.model.getValue(RoomObjectVariable.FURNITURE_ALLOWED_DIRECTIONS); - if(allowedDirections && allowedDirections.length) + if (allowedDirections && allowedDirections.length) { const direction = new Vector3d(allowedDirections[0]); @@ -142,7 +142,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou selectedData = this.getSelectedRoomObjectData(event.roomId); - if(!selectedData) return; + if (!selectedData) return; } } } @@ -153,31 +153,31 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou public processRoomCanvasMouseEvent(event: RoomSpriteMouseEvent, object: IRoomObject, geometry: IRoomGeometry): void { - if(!event || !object) return; + if (!event || !object) return; - if(RoomEnterEffect.isRunning()) return; + if (RoomEnterEffect.isRunning()) return; const type = object.type; let category = this._roomEngine.getRoomObjectCategoryForType(type); - if((category !== RoomObjectCategory.ROOM) && (!this._roomEngine.isPlayingGame() || category !== RoomObjectCategory.UNIT)) category = RoomObjectCategory.MINIMUM; + if ((category !== RoomObjectCategory.ROOM) && (!this._roomEngine.isPlayingGame() || category !== RoomObjectCategory.UNIT)) category = RoomObjectCategory.MINIMUM; const _local_7 = this.getMouseEventId(category, event.type); - if(_local_7 === event.eventId) + if (_local_7 === event.eventId) { - if((event.type === MouseEventType.MOUSE_CLICK) || (event.type === MouseEventType.DOUBLE_CLICK) || (event.type === MouseEventType.MOUSE_DOWN) || (event.type === MouseEventType.MOUSE_UP) || (event.type === MouseEventType.MOUSE_MOVE)) return; + if ((event.type === MouseEventType.MOUSE_CLICK) || (event.type === MouseEventType.DOUBLE_CLICK) || (event.type === MouseEventType.MOUSE_DOWN) || (event.type === MouseEventType.MOUSE_UP) || (event.type === MouseEventType.MOUSE_MOVE)) return; } else { - if(event.eventId) + if (event.eventId) { this.setMouseEventId(category, event.type, event.eventId); } } - if(object.mouseHandler) object.mouseHandler.mouseEvent(event, geometry); + if (object.mouseHandler) object.mouseHandler.mouseEvent(event, geometry); } public processRoomObjectPlacement(placementSource: string, roomId: number, id: number, category: number, typeId: number, extra: string = null, stuffData: IObjectData = null, state: number = -1, frameNumber: number = -1, posture: string = null): boolean @@ -189,7 +189,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this.setSelectedRoomObjectData(roomId, id, category, location, direction, RoomObjectOperationType.OBJECT_PLACE, typeId, extra, stuffData, state, frameNumber, posture); - if(this._roomEngine) + if (this._roomEngine) { this._roomEngine.setObjectMoverIconSprite(typeId, category, false, extra, stuffData, state, frameNumber, posture); this._roomEngine.setObjectMoverIconSpriteVisible(false); @@ -209,7 +209,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { const existing = this._eventIds.get(k); - if(!existing) return null; + if (!existing) return null; return (existing.get(_arg_2) || null); } @@ -218,7 +218,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { let existing = this._eventIds.get(k); - if(!existing) + if (!existing) { existing = new Map(); @@ -232,16 +232,16 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou public handleRoomObjectEvent(event: RoomObjectEvent, roomId: number): void { - if(!event) return; + if (!event) return; - if(event instanceof RoomObjectMouseEvent) + if (event instanceof RoomObjectMouseEvent) { this.handleRoomObjectMouseEvent(event, roomId); return; } - switch(event.type) + switch (event.type) { case RoomObjectStateChangedEvent.STATE_CHANGE: case RoomObjectStateChangedEvent.STATE_RANDOM: @@ -355,9 +355,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleRoomObjectMouseEvent(event: RoomObjectMouseEvent, roomId: number): void { - if(!event || !event.type) return; + if (!event || !event.type) return; - switch(event.type) + switch (event.type) { case RoomObjectMouseEvent.CLICK: this.handleRoomObjectMouseClickEvent(event, roomId); @@ -382,20 +382,20 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleRoomObjectMouseClickEvent(event: RoomObjectMouseEvent, roomId: number): void { - if(!event) return; + if (!event) return; let operation = RoomObjectOperationType.OBJECT_UNDEFINED; const selectedData = this.getSelectedRoomObjectData(roomId); - if(selectedData) operation = selectedData.operation; + if (selectedData) operation = selectedData.operation; let didWalk = false; let didMove = false; - if(this._whereYouClickIsWhereYouGo) + if (this._whereYouClickIsWhereYouGo) { - if(!operation || (operation === RoomObjectOperationType.OBJECT_UNDEFINED)) + if (!operation || (operation === RoomObjectOperationType.OBJECT_UNDEFINED)) { didWalk = this.handleMoveTargetFurni(roomId, event); } @@ -403,50 +403,50 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const category = this._roomEngine.getRoomObjectCategoryForType(event.objectType); - switch(operation) + switch (operation) { case RoomObjectOperationType.OBJECT_MOVE: - if(category === RoomObjectCategory.ROOM) + if (category === RoomObjectCategory.ROOM) { - if(selectedData) + if (selectedData) { this.modifyRoomObject(roomId, selectedData.id, selectedData.category, RoomObjectOperationType.OBJECT_MOVE_TO); } } - else if(category === RoomObjectCategory.UNIT) + else if (category === RoomObjectCategory.UNIT) { - if(selectedData && (event.objectType === RoomObjectUserType.MONSTER_PLANT)) + if (selectedData && (event.objectType === RoomObjectUserType.MONSTER_PLANT)) { this.modifyRoomObject(roomId, selectedData.id, selectedData.category, RoomObjectOperationType.OBJECT_MOVE_TO); } - if(event.eventId) this.setMouseEventId(RoomObjectCategory.ROOM, MouseEventType.MOUSE_CLICK, event.eventId); + if (event.eventId) this.setMouseEventId(RoomObjectCategory.ROOM, MouseEventType.MOUSE_CLICK, event.eventId); this.placeObjectOnUser(roomId, event.objectId, category); } didMove = true; - if(event.objectId !== -1) this.setSelectedObject(roomId, event.objectId, category); + if (event.objectId !== -1) this.setSelectedObject(roomId, event.objectId, category); break; case RoomObjectOperationType.OBJECT_PLACE: - if(category === RoomObjectCategory.ROOM) + if (category === RoomObjectCategory.ROOM) { this.placeObject(roomId, (event instanceof RoomObjectTileMouseEvent), (event instanceof RoomObjectWallMouseEvent)); } - else if(category === RoomObjectCategory.UNIT) + else if (category === RoomObjectCategory.UNIT) { - switch(event.objectType) + switch (event.objectType) { case RoomObjectUserType.MONSTER_PLANT: case RoomObjectUserType.RENTABLE_BOT: this.placeObject(roomId, (event instanceof RoomObjectTileMouseEvent), (event instanceof RoomObjectWallMouseEvent)); break; default: - if(event.eventId) + if (event.eventId) { this.setMouseEventId(RoomObjectCategory.ROOM, MouseEventType.MOUSE_CLICK, event.eventId); } @@ -457,9 +457,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } break; case RoomObjectOperationType.OBJECT_UNDEFINED: - if(category === RoomObjectCategory.ROOM) + if (category === RoomObjectCategory.ROOM) { - if(!didWalk && (event instanceof RoomObjectTileMouseEvent)) this.onRoomObjectTileMouseEvent(roomId, event); + if (!didWalk && (event instanceof RoomObjectTileMouseEvent)) this.onRoomObjectTileMouseEvent(roomId, event); } else { @@ -467,24 +467,24 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou didMove = false; - if(category === RoomObjectCategory.UNIT) + if (category === RoomObjectCategory.UNIT) { - if(event.ctrlKey && !event.altKey && !event.shiftKey && (event.objectType === RoomObjectUserType.RENTABLE_BOT)) + if (event.ctrlKey && !event.altKey && !event.shiftKey && (event.objectType === RoomObjectUserType.RENTABLE_BOT)) { this.modifyRoomObject(roomId, event.objectId, category, RoomObjectOperationType.OBJECT_PICKUP_BOT); } - else if(event.ctrlKey && !event.altKey && !event.shiftKey && (event.objectType === RoomObjectUserType.MONSTER_PLANT)) + else if (event.ctrlKey && !event.altKey && !event.shiftKey && (event.objectType === RoomObjectUserType.MONSTER_PLANT)) { this.modifyRoomObject(roomId, event.objectId, category, RoomObjectOperationType.OBJECT_PICKUP_PET); } - else if(!event.ctrlKey && !event.altKey && event.shiftKey && (event.objectType === RoomObjectUserType.MONSTER_PLANT)) + else if (!event.ctrlKey && !event.altKey && event.shiftKey && (event.objectType === RoomObjectUserType.MONSTER_PLANT)) { this.modifyRoomObject(roomId, event.objectId, category, RoomObjectOperationType.OBJECT_ROTATE_POSITIVE); } - if(!this._roomEngine.isPlayingGame()) + if (!this._roomEngine.isPlayingGame()) { didWalk = true; } @@ -494,27 +494,27 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } } - else if((category === RoomObjectCategory.FLOOR) || (category === RoomObjectCategory.WALL)) + else if ((category === RoomObjectCategory.FLOOR) || (category === RoomObjectCategory.WALL)) { - if(event.altKey || event.ctrlKey || event.shiftKey) + if (event.altKey || event.ctrlKey || event.shiftKey) { - if(!event.ctrlKey && !event.altKey && event.shiftKey) + if (!event.ctrlKey && !event.altKey && event.shiftKey) { - if(category === RoomObjectCategory.FLOOR) + if (category === RoomObjectCategory.FLOOR) { - if(this._roomEngine.events) + if (this._roomEngine.events) { this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.REQUEST_ROTATE, roomId, event.objectId, category)); } } } - else if(event.ctrlKey && !event.altKey && !event.shiftKey) + else if (event.ctrlKey && !event.altKey && !event.shiftKey) { this.modifyRoomObject(roomId, event.objectId, category, RoomObjectOperationType.OBJECT_PICKUP); } - if(!this._roomEngine.isPlayingGame()) + if (!this._roomEngine.isPlayingGame()) { didWalk = true; } @@ -525,14 +525,14 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } } - if(event.eventId) + if (event.eventId) { - if(didWalk) + if (didWalk) { this.setMouseEventId(RoomObjectCategory.ROOM, MouseEventType.MOUSE_CLICK, event.eventId); } - if(didMove) + if (didMove) { this.setMouseEventId(RoomObjectCategory.MINIMUM, MouseEventType.MOUSE_CLICK, event.eventId); } @@ -541,16 +541,16 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou break; } - if(category === RoomObjectCategory.ROOM) + if (category === RoomObjectCategory.ROOM) { const _local_15 = this.getMouseEventId(RoomObjectCategory.MINIMUM, MouseEventType.MOUSE_CLICK); const _local_16 = this.getMouseEventId(RoomObjectCategory.UNIT, MouseEventType.MOUSE_CLICK); - if((_local_15 !== event.eventId) && (_local_16 !== event.eventId) && !didMove) + if ((_local_15 !== event.eventId) && (_local_16 !== event.eventId) && !didMove) { this.deselectObject(roomId); - if(this._roomEngine.events) this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.DESELECTED, roomId, -1, RoomObjectCategory.MINIMUM)); + if (this._roomEngine.events) this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.DESELECTED, roomId, -1, RoomObjectCategory.MINIMUM)); this.setSelectedAvatar(roomId, 0, false); } @@ -559,32 +559,32 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleRoomObjectMouseMoveEvent(event: RoomObjectMouseEvent, roomId: number): void { - if(!event) return; + if (!event) return; let operation = RoomObjectOperationType.OBJECT_UNDEFINED; const selectedData = this.getSelectedRoomObjectData(roomId); - if(selectedData) operation = selectedData.operation; + if (selectedData) operation = selectedData.operation; const category = this._roomEngine.getRoomObjectCategoryForType(event.objectType); - if(this._roomEngine) + if (this._roomEngine) { const roomCursor = this._roomEngine.getRoomObjectCursor(roomId); - if(roomCursor && roomCursor.logic) + if (roomCursor && roomCursor.logic) { let newEvent: ObjectTileCursorUpdateMessage = null; - if(event instanceof RoomObjectTileMouseEvent) + if (event instanceof RoomObjectTileMouseEvent) { newEvent = this.handleMouseOverTile(event, roomId); } - else if(event.object && (event.object.id !== -1)) + else if (event.object && (event.object.id !== -1)) { - if(this._whereYouClickIsWhereYouGo) + if (this._whereYouClickIsWhereYouGo) { newEvent = this.handleMouseOverObject(category, roomId, event); } @@ -599,14 +599,14 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } } - switch(operation) + switch (operation) { case RoomObjectOperationType.OBJECT_MOVE: - if(category === RoomObjectCategory.ROOM) this.handleObjectMove(event, roomId); + if (category === RoomObjectCategory.ROOM) this.handleObjectMove(event, roomId); return; case RoomObjectOperationType.OBJECT_PLACE: - if(category === RoomObjectCategory.ROOM) this.handleObjectPlace(event, roomId); + if (category === RoomObjectCategory.ROOM) this.handleObjectPlace(event, roomId); return; } @@ -614,24 +614,24 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleRoomObjectMouseDownEvent(event: RoomObjectMouseEvent, roomId: number): void { - if(!event) return; + if (!event) return; let operation = RoomObjectOperationType.OBJECT_UNDEFINED; const selectedData = this.getSelectedRoomObjectData(roomId); - if(selectedData) operation = selectedData.operation; + if (selectedData) operation = selectedData.operation; const category = this._roomEngine.getRoomObjectCategoryForType(event.objectType); - switch(operation) + switch (operation) { case RoomObjectOperationType.OBJECT_UNDEFINED: - if((category === RoomObjectCategory.FLOOR) || (category === RoomObjectCategory.WALL) || (event.objectType === RoomObjectUserType.MONSTER_PLANT)) + if ((category === RoomObjectCategory.FLOOR) || (category === RoomObjectCategory.WALL) || (event.objectType === RoomObjectUserType.MONSTER_PLANT)) { - if((event.altKey && !event.ctrlKey && !event.shiftKey) || this.decorateModeMove(event)) + if ((event.altKey && !event.ctrlKey && !event.shiftKey) || this.decorateModeMove(event)) { - if(this._roomEngine.events) this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.REQUEST_MOVE, roomId, event.objectId, category)); + if (this._roomEngine.events) this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.REQUEST_MOVE, roomId, event.objectId, category)); } } return; @@ -640,24 +640,24 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleRoomObjectMouseDownLongEvent(event: RoomObjectMouseEvent, roomId: number): void { - if(!event) return; + if (!event) return; let operation = RoomObjectOperationType.OBJECT_UNDEFINED; const selectedData = this.getSelectedRoomObjectData(roomId); - if(selectedData) operation = selectedData.operation; + if (selectedData) operation = selectedData.operation; const category = this._roomEngine.getRoomObjectCategoryForType(event.objectType); - switch(operation) + switch (operation) { case RoomObjectOperationType.OBJECT_UNDEFINED: - if((category === RoomObjectCategory.FLOOR) || (category === RoomObjectCategory.WALL) || (event.objectType === RoomObjectUserType.MONSTER_PLANT)) + if ((category === RoomObjectCategory.FLOOR) || (category === RoomObjectCategory.WALL) || (event.objectType === RoomObjectUserType.MONSTER_PLANT)) { - if((!event.ctrlKey && !event.shiftKey) || this.decorateModeMove(event)) + if ((!event.ctrlKey && !event.shiftKey) || this.decorateModeMove(event)) { - if(this._roomEngine.events) this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.REQUEST_MANIPULATION, roomId, event.objectId, category)); + if (this._roomEngine.events) this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.REQUEST_MANIPULATION, roomId, event.objectId, category)); } } return; @@ -670,7 +670,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const type = event.objectType; const category = this._roomEngine.getRoomObjectCategoryForType(type); - if(this._roomEngine.events) + if (this._roomEngine.events) { this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.MOUSE_ENTER, roomId, id, category)); } @@ -682,17 +682,17 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const type = event.objectType; const category = this._roomEngine.getRoomObjectCategoryForType(type); - if(category !== RoomObjectCategory.ROOM) + if (category !== RoomObjectCategory.ROOM) { - if(category === RoomObjectCategory.UNIT) + if (category === RoomObjectCategory.UNIT) { const cursor = this._roomEngine.getRoomObjectCursor(roomId); - if(cursor) cursor.processUpdateMessage(new ObjectDataUpdateMessage(0, null)); + if (cursor) cursor.processUpdateMessage(new ObjectDataUpdateMessage(0, null)); } } - if(this._roomEngine.events) + if (this._roomEngine.events) { this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.MOUSE_LEAVE, roomId, id, category)); } @@ -702,9 +702,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private onRoomObjectStateChangedEvent(event: RoomObjectStateChangedEvent, roomId: number): void { - if(!event) return; + if (!event) return; - switch(event.type) + switch (event.type) { case RoomObjectStateChangedEvent.STATE_CHANGE: this.changeObjectState(roomId, event.object.id, event.object.type, event.state, false); @@ -717,9 +717,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private onRoomObjectDimmerStateUpdateEvent(event: RoomObjectDimmerStateUpdateEvent, roomId: number): void { - if(!event) return; + if (!event) return; - switch(event.type) + switch (event.type) { case RoomObjectDimmerStateUpdateEvent.DIMMER_STATE: this._roomEngine.events.dispatchEvent(new RoomEngineDimmerStateEvent(roomId, event.state, event.presetId, event.effectId, event.color, event.brightness)); @@ -729,9 +729,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleSelectedObjectRemove(event: RoomObjectMoveEvent, roomId: number): void { - if(!event || !this._roomEngine) return; + if (!event || !this._roomEngine) return; - switch(event.type) + switch (event.type) { case RoomObjectMoveEvent.POSITION_CHANGED: { const objectId = event.objectId; @@ -740,7 +740,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const object = this._roomEngine.getRoomObject(roomId, objectId, objectCategory); const selectionArrow = this._roomEngine.getRoomObjectSelectionArrow(roomId); - if(object && selectionArrow && selectionArrow.logic) + if (object && selectionArrow && selectionArrow.logic) { const location = object.getLocation(); @@ -756,18 +756,18 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private onRoomObjectWidgetRequestEvent(event: RoomObjectWidgetRequestEvent, roomId: number): void { - if(!event || !this._roomEngine) return; + if (!event || !this._roomEngine) return; const objectId = event.objectId; const objectType = event.objectType; const objectCategory = this._roomEngine.getRoomObjectCategoryForType(objectType); const eventDispatcher = this._roomEngine.events; - if(!eventDispatcher) return; + if (!eventDispatcher) return; - if(RoomId.isRoomPreviewerId(roomId)) return; + if (RoomId.isRoomPreviewerId(roomId)) return; - switch(event.type) + switch (event.type) { case RoomObjectWidgetRequestEvent.OPEN_WIDGET: eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.OPEN_WIDGET, roomId, objectId, objectCategory, ((event.object as IRoomObjectController).logic.widget))); @@ -885,27 +885,27 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private onRoomObjectFurnitureActionEvent(event: RoomObjectFurnitureActionEvent, roomId: number): void { - if(!event) return; + if (!event) return; this.useObject(roomId, event.object.id, event.object.type, event.type); } private handleObjectSoundMachineEvent(event: RoomObjectEvent, roomId: number): void { - if(!event) return; + if (!event) return; const objectCategory = this._roomEngine.getRoomObjectCategoryForType(event.objectType); const selectedData = this.getSelectedRoomObjectData(roomId); - if(selectedData) + if (selectedData) { - if((selectedData.category === objectCategory) && (selectedData.id === event.objectId)) + if ((selectedData.category === objectCategory) && (selectedData.id === event.objectId)) { - if(selectedData.operation === RoomObjectOperationType.OBJECT_PLACE) return; + if (selectedData.operation === RoomObjectOperationType.OBJECT_PLACE) return; } } - switch(event.type) + switch (event.type) { case RoomObjectFurnitureActionEvent.SOUND_MACHINE_INIT: this._roomEngine.events.dispatchEvent(new RoomObjectSoundMachineEvent(RoomObjectSoundMachineEvent.SOUND_MACHINE_INIT, roomId, event.objectId, objectCategory)); @@ -924,20 +924,20 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleObjectJukeboxEvent(event: RoomObjectEvent, roomId: number): void { - if(!event) return; + if (!event) return; const objectCategory = this._roomEngine.getRoomObjectCategoryForType(event.objectType); const selectedData = this.getSelectedRoomObjectData(roomId); - if(selectedData) + if (selectedData) { - if((selectedData.category === objectCategory) && (selectedData.id === event.objectId)) + if ((selectedData.category === objectCategory) && (selectedData.id === event.objectId)) { - if(selectedData.operation === RoomObjectOperationType.OBJECT_PLACE) return; + if (selectedData.operation === RoomObjectOperationType.OBJECT_PLACE) return; } } - switch(event.type) + switch (event.type) { case RoomObjectFurnitureActionEvent.JUKEBOX_INIT: this._roomEngine.events.dispatchEvent(new RoomObjectSoundMachineEvent(RoomObjectSoundMachineEvent.JUKEBOX_INIT, roomId, event.objectId, objectCategory)); @@ -956,9 +956,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private onRoomObjectFloorHoleEvent(event: RoomObjectFloorHoleEvent, roomId: number): void { - if(!event) return; + if (!event) return; - switch(event.type) + switch (event.type) { case RoomObjectFloorHoleEvent.ADD_HOLE: this._roomEngine.addRoomInstanceFloorHole(roomId, event.objectId); @@ -971,16 +971,16 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private onRoomObjectRoomAdEvent(event: RoomObjectRoomAdEvent, roomId: number): void { - if(!event) return; + if (!event) return; let eventType: string = null; - switch(event.type) + switch (event.type) { case RoomObjectRoomAdEvent.ROOM_AD_FURNI_CLICK: this._roomEngine.events.dispatchEvent(event); - if(event.clickUrl && (event.clickUrl.length > 0)) + if (event.clickUrl && (event.clickUrl.length > 0)) { Nitro.instance.createLinkEvent(event.clickUrl); } @@ -988,11 +988,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou eventType = RoomEngineRoomAdEvent.FURNI_CLICK; break; case RoomObjectRoomAdEvent.ROOM_AD_FURNI_DOUBLE_CLICK: - if(event.clickUrl && (event.clickUrl.length > 0)) + if (event.clickUrl && (event.clickUrl.length > 0)) { const catalogPage = 'CATALOG_PAGE'; - if(event.clickUrl.indexOf(catalogPage) === 0) + if (event.clickUrl.indexOf(catalogPage) === 0) { Nitro.instance.createLinkEvent(event.clickUrl.substr(catalogPage.length)); } @@ -1008,14 +1008,14 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou break; } - if(eventType) this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(eventType, roomId, event.objectId, this._roomEngine.getRoomObjectCategoryForType(event.objectType))); + if (eventType) this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(eventType, roomId, event.objectId, this._roomEngine.getRoomObjectCategoryForType(event.objectType))); } private onRoomObjectBadgeAssetEvent(event: RoomObjectBadgeAssetEvent, roomId: number): void { - if(!event || !this._roomEngine) return; + if (!event || !this._roomEngine) return; - switch(event.type) + switch (event.type) { case RoomObjectBadgeAssetEvent.LOAD_BADGE: { const objectId = event.objectId; @@ -1030,7 +1030,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleMousePointer(event: RoomObjectFurnitureActionEvent, roomId: number): void { - if(!event) return; + if (!event) return; this._roomEngine.updateMousePointer(event.type, event.objectId, event.objectType); } @@ -1039,7 +1039,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { const objectCategory = this._roomEngine.getRoomObjectCategoryForType(event.objectType); - switch(event.type) + switch (event.type) { case RoomObjectPlaySoundIdEvent.PLAY_SOUND: this._roomEngine.events.dispatchEvent(new RoomEngineObjectPlaySoundEvent(RoomEngineObjectPlaySoundEvent.PLAY_SOUND, roomId, event.objectId, objectCategory, event.soundId, event.pitch)); @@ -1052,11 +1052,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleRoomObjectSamplePlaybackEvent(event: RoomObjectSamplePlaybackEvent, roomId: number): void { - if(!event) return; + if (!event) return; const objectCategory = this._roomEngine.getRoomObjectCategoryForType(event.objectType); - switch(event.type) + switch (event.type) { case RoomObjectSamplePlaybackEvent.ROOM_OBJECT_INITIALIZED: this._roomEngine.events.dispatchEvent(new RoomEngineSamplePlaybackEvent(RoomEngineSamplePlaybackEvent.ROOM_OBJECT_INITIALIZED, roomId, event.objectId, objectCategory, event.sampleId, event.pitch)); @@ -1075,9 +1075,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private onHSLColorEnableEvent(event: RoomObjectHSLColorEnableEvent, roomId: number): void { - if(!event || !this._roomEngine) return; + if (!event || !this._roomEngine) return; - switch(event.type) + switch (event.type) { case RoomObjectHSLColorEnableEvent.ROOM_BACKGROUND_COLOR: this._roomEngine.events.dispatchEvent(new RoomObjectHSLColorEnabledEvent(RoomObjectHSLColorEnabledEvent.ROOM_BACKGROUND_COLOR, roomId, event.enable, event.hue, event.saturation, event.lightness)); @@ -1087,9 +1087,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private onRoomObjectDataRequestEvent(event: RoomObjectDataRequestEvent, roomId: number): void { - if(!event || !this._roomEngine || !event.object) return; + if (!event || !this._roomEngine || !event.object) return; - switch(event.type) + switch (event.type) { case RoomObjectDataRequestEvent.RODRE_CURRENT_USER_ID: event.object.model.setValue(RoomObjectVariable.SESSION_CURRENT_USER_ID, this._roomEngine.sessionDataManager.userId); @@ -1102,38 +1102,38 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private onRoomObjectTileMouseEvent(roomId: number, event: RoomObjectTileMouseEvent): void { - if(!this._roomEngine || this._roomEngine.isDecorating || !this._roomEngine.roomSessionManager) return; + if (!this._roomEngine || this._roomEngine.isDecorating || !this._roomEngine.roomSessionManager) return; const session = this._roomEngine.roomSessionManager.getSession(roomId); - if(!session || session.isSpectator) return; + if (!session || session.isSpectator) return; this.sendWalkUpdate(event.tileXAsInt, event.tileYAsInt); } private handleObjectMove(event: RoomObjectMouseEvent, roomId: number): void { - if(!event || !this._roomEngine) return; + if (!event || !this._roomEngine) return; const eventDispatcher = this._roomEngine.events; - if(!eventDispatcher) return; + if (!eventDispatcher) return; const selectedData = this.getSelectedRoomObjectData(roomId); - if(!selectedData) return; + if (!selectedData) return; const roomObject = this._roomEngine.getRoomObject(roomId, selectedData.id, selectedData.category); - if(!roomObject) return; + if (!roomObject) return; let _local_6 = true; - if((selectedData.category === RoomObjectCategory.FLOOR) || (selectedData.category === RoomObjectCategory.UNIT)) + if ((selectedData.category === RoomObjectCategory.FLOOR) || (selectedData.category === RoomObjectCategory.UNIT)) { const stackingHeightMap = this._roomEngine.getFurnitureStackingHeightMap(roomId); - if(!(((event instanceof RoomObjectTileMouseEvent)) && (this.handleFurnitureMove(roomObject, selectedData, Math.trunc(event.tileX + 0.5), Math.trunc(event.tileY + 0.5), stackingHeightMap)))) + if (!(((event instanceof RoomObjectTileMouseEvent)) && (this.handleFurnitureMove(roomObject, selectedData, Math.trunc(event.tileX + 0.5), Math.trunc(event.tileY + 0.5), stackingHeightMap)))) { this.handleFurnitureMove(roomObject, selectedData, selectedData.loc.x, selectedData.loc.y, stackingHeightMap); @@ -1141,11 +1141,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } } - else if((selectedData.category === RoomObjectCategory.WALL)) + else if ((selectedData.category === RoomObjectCategory.WALL)) { _local_6 = false; - if(event instanceof RoomObjectWallMouseEvent) + if (event instanceof RoomObjectWallMouseEvent) { const _local_10 = event.wallLocation; const _local_11 = event.wallWidth; @@ -1154,13 +1154,13 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const _local_14 = event.y; const _local_15 = event.direction; - if(this.handleWallItemMove(roomObject, selectedData, _local_10, _local_11, _local_12, _local_13, _local_14, _local_15)) + if (this.handleWallItemMove(roomObject, selectedData, _local_10, _local_11, _local_12, _local_13, _local_14, _local_15)) { _local_6 = true; } } - if(!_local_6) + if (!_local_6) { roomObject.setLocation(selectedData.loc); roomObject.setDirection(selectedData.dir); @@ -1169,7 +1169,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this._roomEngine.updateRoomObjectMask(roomId, selectedData.id, _local_6); } - if(_local_6) + if (_local_6) { this.setFurnitureAlphaMultiplier(roomObject, 0.5); @@ -1185,28 +1185,28 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleObjectPlace(event: RoomObjectMouseEvent, roomId: number): void { - if(!event || !this._roomEngine) return; + if (!event || !this._roomEngine) return; const eventDispatcher = this._roomEngine.events; - if(!eventDispatcher) return; + if (!eventDispatcher) return; let selectedData = this.getSelectedRoomObjectData(roomId); - if(!selectedData) return; + if (!selectedData) return; let roomObject = this._roomEngine.getRoomObject(roomId, selectedData.id, selectedData.category); - if(!roomObject) + if (!roomObject) { - if(event instanceof RoomObjectTileMouseEvent) + if (event instanceof RoomObjectTileMouseEvent) { - if(selectedData.category === RoomObjectCategory.FLOOR) + if (selectedData.category === RoomObjectCategory.FLOOR) { this._roomEngine.addFurnitureFloor(roomId, selectedData.id, selectedData.typeId, selectedData.loc, selectedData.dir, 0, selectedData.stuffData, parseFloat(selectedData.instanceData), -1, 0, 0, '', false); } - else if(selectedData.category === RoomObjectCategory.UNIT) + else if (selectedData.category === RoomObjectCategory.UNIT) { this._roomEngine.addRoomObjectUser(roomId, selectedData.id, new Vector3d(), new Vector3d(180), 180, selectedData.typeId, selectedData.instanceData); @@ -1216,9 +1216,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } } - else if(event instanceof RoomObjectWallMouseEvent) + else if (event instanceof RoomObjectWallMouseEvent) { - if(selectedData.category === RoomObjectCategory.WALL) + if (selectedData.category === RoomObjectCategory.WALL) { this._roomEngine.addFurnitureWall(roomId, selectedData.id, selectedData.typeId, selectedData.loc, selectedData.dir, 0, selectedData.instanceData, 0); } @@ -1226,13 +1226,13 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou roomObject = this._roomEngine.getRoomObject(roomId, selectedData.id, selectedData.category); - if(roomObject) + if (roomObject) { - if(selectedData.category === RoomObjectCategory.FLOOR) + if (selectedData.category === RoomObjectCategory.FLOOR) { const allowedDirections = roomObject.model.getValue(RoomObjectVariable.FURNITURE_ALLOWED_DIRECTIONS); - if(allowedDirections && allowedDirections.length) + if (allowedDirections && allowedDirections.length) { const direction = new Vector3d(allowedDirections[0]); @@ -1242,7 +1242,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou selectedData = this.getSelectedRoomObjectData(roomId); - if(!selectedData) return; + if (!selectedData) return; } } } @@ -1251,15 +1251,15 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this._roomEngine.setObjectMoverIconSpriteVisible(true); } - if(roomObject) + if (roomObject) { let _local_12 = true; const stackingHeightMap = this._roomEngine.getFurnitureStackingHeightMap(roomId); - if(selectedData.category === RoomObjectCategory.FLOOR) + if (selectedData.category === RoomObjectCategory.FLOOR) { - if(!((event instanceof RoomObjectTileMouseEvent) && this.handleFurnitureMove(roomObject, selectedData, Math.trunc(event.tileX + 0.5), Math.trunc(event.tileY + 0.5), stackingHeightMap))) + if (!((event instanceof RoomObjectTileMouseEvent) && this.handleFurnitureMove(roomObject, selectedData, Math.trunc(event.tileX + 0.5), Math.trunc(event.tileY + 0.5), stackingHeightMap))) { this._roomEngine.removeRoomObjectFloor(roomId, selectedData.id); @@ -1267,11 +1267,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } } - else if(selectedData.category === RoomObjectCategory.WALL) + else if (selectedData.category === RoomObjectCategory.WALL) { _local_12 = false; - if(event instanceof RoomObjectWallMouseEvent) + if (event instanceof RoomObjectWallMouseEvent) { const _local_14 = event.wallLocation; const _local_15 = event.wallWidth; @@ -1280,13 +1280,13 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const _local_18 = event.y; const _local_19 = event.direction; - if(this.handleWallItemMove(roomObject, selectedData, _local_14, _local_15, _local_16, _local_17, _local_18, _local_19)) + if (this.handleWallItemMove(roomObject, selectedData, _local_14, _local_15, _local_16, _local_17, _local_18, _local_19)) { _local_12 = true; } } - if(!_local_12) + if (!_local_12) { this._roomEngine.removeRoomObjectWall(roomId, selectedData.id); } @@ -1294,9 +1294,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this._roomEngine.updateRoomObjectMask(roomId, selectedData.id, _local_12); } - else if(selectedData.category === RoomObjectCategory.UNIT) + else if (selectedData.category === RoomObjectCategory.UNIT) { - if(!((event instanceof RoomObjectTileMouseEvent) && this.handleUserPlace(roomObject, Math.trunc(event.tileX + 0.5), Math.trunc(event.tileY + 0.5), this._roomEngine.getLegacyWallGeometry(roomId)))) + if (!((event instanceof RoomObjectTileMouseEvent) && this.handleUserPlace(roomObject, Math.trunc(event.tileX + 0.5), Math.trunc(event.tileY + 0.5), this._roomEngine.getLegacyWallGeometry(roomId)))) { this._roomEngine.removeRoomObjectUser(roomId, selectedData.id); @@ -1310,7 +1310,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleFurnitureMove(roomObject: IRoomObjectController, selectedObjectData: SelectedRoomObjectData, x: number, y: number, stackingHeightMap: FurnitureStackingHeightMap): boolean { - if(!roomObject || !selectedObjectData) return false; + if (!roomObject || !selectedObjectData) return false; const _local_6 = new Vector3d(); _local_6.assign(roomObject.getDirection()); @@ -1324,7 +1324,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou let _local_9 = this.validateFurnitureLocation(roomObject, _local_7, selectedObjectData.loc, selectedObjectData.dir, stackingHeightMap); - if(!_local_9) + if (!_local_9) { _local_8.x = this.getValidRoomObjectDirection(roomObject, true); @@ -1333,7 +1333,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou _local_9 = this.validateFurnitureLocation(roomObject, _local_7, selectedObjectData.loc, selectedObjectData.dir, stackingHeightMap); } - if(!_local_9) + if (!_local_9) { roomObject.setDirection(_local_6); @@ -1342,19 +1342,19 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou roomObject.setLocation(_local_9); - if(_local_8) roomObject.setDirection(_local_8); + if (_local_8) roomObject.setDirection(_local_8); return true; } private handleWallItemMove(k: IRoomObjectController, _arg_2: SelectedRoomObjectData, _arg_3: IVector3D, _arg_4: IVector3D, _arg_5: IVector3D, _arg_6: number, _arg_7: number, _arg_8: number): boolean { - if(!k || !_arg_2) return false; + if (!k || !_arg_2) return false; const _local_9 = new Vector3d(_arg_8); const _local_10 = this.validateWallItemLocation(k, _arg_3, _arg_4, _arg_5, _arg_6, _arg_7, _arg_2); - if(!_local_10) return false; + if (!_local_10) return false; k.setLocation(_local_10); k.setDirection(_local_9); @@ -1364,19 +1364,19 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private validateFurnitureLocation(k: IRoomObject, _arg_2: IVector3D, _arg_3: IVector3D, _arg_4: IVector3D, _arg_5: FurnitureStackingHeightMap): Vector3d { - if(!k || !k.model || !_arg_2) return null; + if (!k || !k.model || !_arg_2) return null; let _local_15: Vector3d = null; const _local_6 = k.getDirection(); - if(!_local_6) return null; + if (!_local_6) return null; - if(!_arg_3 || !_arg_4) return null; + if (!_arg_3 || !_arg_4) return null; - if((_arg_2.x === _arg_3.x) && (_arg_2.y === _arg_3.y)) + if ((_arg_2.x === _arg_3.x) && (_arg_2.y === _arg_3.y)) { - if(_local_6.x === _arg_4.x) + if (_local_6.x === _arg_4.x) { _local_15 = new Vector3d(); @@ -1389,9 +1389,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou let sizeX = k.model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); let sizeY = k.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Y); - if(sizeX < 1) sizeX = 1; + if (sizeX < 1) sizeX = 1; - if(sizeY < 1) sizeY = 1; + if (sizeY < 1) sizeY = 1; const _local_9 = _arg_3.x; const _local_10 = _arg_3.y; @@ -1400,7 +1400,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou let _local_13 = 0; let _local_14 = (Math.trunc((Math.trunc(_local_6.x + 45) % 360) / 90)); - if((_local_14 === 1) || (_local_14 === 3)) + if ((_local_14 === 1) || (_local_14 === 3)) { _local_13 = sizeX; @@ -1410,18 +1410,18 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou _local_14 = Math.trunc((Math.trunc(_arg_4.x + 45) % 360) / 90); - if((_local_14 === 1) || (_local_14 === 3)) + if ((_local_14 === 1) || (_local_14 === 3)) { _local_13 = _local_11; _local_11 = _local_12; _local_12 = _local_13; } - if(_arg_5 && _arg_2) + if (_arg_5 && _arg_2) { const stackable = (k.model.getValue(RoomObjectVariable.FURNITURE_ALWAYS_STACKABLE) === 1); - if(_arg_5.validateLocation(_arg_2.x, _arg_2.y, sizeX, sizeY, _local_9, _local_10, _local_11, _local_12, stackable)) + if (_arg_5.validateLocation(_arg_2.x, _arg_2.y, sizeX, sizeY, _local_9, _local_10, _local_11, _local_12, stackable)) { return new Vector3d(_arg_2.x, _arg_2.y, _arg_5.getTileHeight(_arg_2.x, _arg_2.y)); } @@ -1434,40 +1434,40 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private validateWallItemLocation(k: IRoomObject, _arg_2: IVector3D, _arg_3: IVector3D, _arg_4: IVector3D, _arg_5: number, _arg_6: number, _arg_7: SelectedRoomObjectData): Vector3d { - if((((((k == null) || (k.model == null)) || (_arg_2 == null)) || (_arg_3 == null)) || (_arg_4 == null)) || (_arg_7 == null)) return null; + if ((((((k == null) || (k.model == null)) || (_arg_2 == null)) || (_arg_3 == null)) || (_arg_4 == null)) || (_arg_7 == null)) return null; const _local_8 = k.model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); const _local_9 = k.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Z); const _local_10 = k.model.getValue(RoomObjectVariable.FURNITURE_CENTER_Z); - if((((_arg_5 < (_local_8 / 2)) || (_arg_5 > (_arg_3.length - (_local_8 / 2)))) || (_arg_6 < _local_10)) || (_arg_6 > (_arg_4.length - (_local_9 - _local_10)))) + if ((((_arg_5 < (_local_8 / 2)) || (_arg_5 > (_arg_3.length - (_local_8 / 2)))) || (_arg_6 < _local_10)) || (_arg_6 > (_arg_4.length - (_local_9 - _local_10)))) { - if((_arg_5 < (_local_8 / 2)) && (_arg_5 <= (_arg_3.length - (_local_8 / 2)))) + if ((_arg_5 < (_local_8 / 2)) && (_arg_5 <= (_arg_3.length - (_local_8 / 2)))) { _arg_5 = (_local_8 / 2); } else { - if((_arg_5 >= (_local_8 / 2)) && (_arg_5 > (_arg_3.length - (_local_8 / 2)))) + if ((_arg_5 >= (_local_8 / 2)) && (_arg_5 > (_arg_3.length - (_local_8 / 2)))) { _arg_5 = (_arg_3.length - (_local_8 / 2)); } } - if((_arg_6 < _local_10) && (_arg_6 <= (_arg_4.length - (_local_9 - _local_10)))) + if ((_arg_6 < _local_10) && (_arg_6 <= (_arg_4.length - (_local_9 - _local_10)))) { _arg_6 = _local_10; } else { - if((_arg_6 >= _local_10) && (_arg_6 > (_arg_4.length - (_local_9 - _local_10)))) + if ((_arg_6 >= _local_10) && (_arg_6 > (_arg_4.length - (_local_9 - _local_10)))) { _arg_6 = (_arg_4.length - (_local_9 - _local_10)); } } } - if((((_arg_5 < (_local_8 / 2)) || (_arg_5 > (_arg_3.length - (_local_8 / 2)))) || (_arg_6 < _local_10)) || (_arg_6 > (_arg_4.length - (_local_9 - _local_10)))) + if ((((_arg_5 < (_local_8 / 2)) || (_arg_5 > (_arg_3.length - (_local_8 / 2)))) || (_arg_6 < _local_10)) || (_arg_6 > (_arg_4.length - (_local_9 - _local_10)))) { return null; } @@ -1488,8 +1488,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private useObject(roomId: number, objectId: number, type: string, action: string): void { - if(!this._roomEngine || !this._roomEngine.connection) return; - switch(action) + if (!this._roomEngine || !this._roomEngine.connection) return; + switch (action) { case RoomObjectFurnitureActionEvent.DICE_ACTIVATE: this._roomEngine.connection.send(new FurnitureDiceActivateComposer(objectId)); @@ -1511,11 +1511,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private changeRoomObjectState(roomId: number, objectId: number, category: number, state: number, isRandom: boolean): boolean { - if(!this._roomEngine || !this._roomEngine.connection) return true; + if (!this._roomEngine || !this._roomEngine.connection) return true; - if(category === RoomObjectCategory.FLOOR) + if (category === RoomObjectCategory.FLOOR) { - if(!isRandom) + if (!isRandom) { this._roomEngine.connection.send(new FurnitureMultiStateComposer(objectId, state)); } @@ -1525,7 +1525,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } } - else if(category === RoomObjectCategory.WALL) + else if (category === RoomObjectCategory.WALL) { this._roomEngine.connection.send(new FurnitureWallMultiStateComposer(objectId, state)); } @@ -1535,26 +1535,26 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private sendWalkUpdate(x: number, y: number): void { - if(!this._roomEngine || !this._roomEngine.connection) return; + if (!this._roomEngine || !this._roomEngine.connection) return; this._roomEngine.connection.send(new RoomUnitWalkComposer(x, y)); } private handleMouseOverObject(category: number, roomId: number, event: RoomObjectMouseEvent): ObjectTileCursorUpdateMessage { - if(category !== RoomObjectCategory.FLOOR) return null; + if (category !== RoomObjectCategory.FLOOR) return null; const roomObject = this._roomEngine.getRoomObject(roomId, event.objectId, RoomObjectCategory.FLOOR); - if(!roomObject) return null; + if (!roomObject) return null; const location = this.getActiveSurfaceLocation(roomObject, event); - if(!location) return null; + if (!location) return null; const furnitureHeightMap = this._roomEngine.getFurnitureStackingHeightMap(roomId); - if(!furnitureHeightMap) return null; + if (!furnitureHeightMap) return null; const x = location.x; const y = location.y; @@ -1565,12 +1565,12 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleMoveTargetFurni(k: number, _arg_2: RoomObjectMouseEvent): boolean { - if((_arg_2.objectType === RoomObjectUserType.USER) || (_arg_2.objectType === RoomObjectUserType.PET) || (_arg_2.objectType === RoomObjectUserType.BOT) || (_arg_2.objectType === RoomObjectUserType.RENTABLE_BOT) || (_arg_2.objectType === RoomObjectUserType.MONSTER_PLANT)) return; + if ((_arg_2.objectType === RoomObjectUserType.USER) || (_arg_2.objectType === RoomObjectUserType.PET) || (_arg_2.objectType === RoomObjectUserType.BOT) || (_arg_2.objectType === RoomObjectUserType.RENTABLE_BOT) || (_arg_2.objectType === RoomObjectUserType.MONSTER_PLANT)) return; const _local_3 = this._roomEngine.getRoomObject(k, _arg_2.objectId, RoomObjectCategory.FLOOR); const _local_4 = this.getActiveSurfaceLocation(_local_3, _arg_2); - if(_local_4) + if (_local_4) { this.sendWalkUpdate(_local_4.x, _local_4.y); @@ -1582,17 +1582,17 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private getActiveSurfaceLocation(k: IRoomObject, _arg_2: RoomObjectMouseEvent): Vector3d { - if(!k || !_arg_2) return null; + if (!k || !_arg_2) return null; const furniData = this._roomEngine.sessionDataManager.getFloorItemDataByName(k.type); - if(!furniData) return null; + if (!furniData) return null; - if(!furniData.canStandOn && !furniData.canSitOn && !furniData.canLayOn) return null; + if (!furniData.canStandOn && !furniData.canSitOn && !furniData.canLayOn) return null; const model = k.model; - if(!model) return null; + if (!model) return null; const location = k.getLocation(); const direction = k.getDirection(); @@ -1601,14 +1601,14 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou let sizeY = model.getValue(RoomObjectVariable.FURNITURE_SIZE_Y); const sizeZ = model.getValue(RoomObjectVariable.FURNITURE_SIZE_Z); - if((direction.x === 90) || (direction.x === 270)) [sizeX, sizeY] = [sizeY, sizeX]; + if ((direction.x === 90) || (direction.x === 270)) [sizeX, sizeY] = [sizeY, sizeX]; - if(sizeX < 1) sizeX = 1; - if(sizeY < 1) sizeY = 1; + if (sizeX < 1) sizeX = 1; + if (sizeY < 1) sizeY = 1; const renderingCanvas = this._roomEngine.getActiveRoomInstanceRenderingCanvas(); - if(!renderingCanvas) return null; + if (!renderingCanvas) return null; const scale = renderingCanvas.geometry.scale; const _local_13 = furniData.canSitOn ? 0.5 : 0; @@ -1621,44 +1621,44 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou let _local_20 = false; - if((_local_18 < location.x) || (_local_18 >= (location.x + sizeX))) _local_20 = true; - else if((_local_19 < location.y) || (_local_19 >= (location.y + sizeY))) _local_20 = true; + if ((_local_18 < location.x) || (_local_18 >= (location.x + sizeX))) _local_20 = true; + else if ((_local_19 < location.y) || (_local_19 >= (location.y + sizeY))) _local_20 = true; const _local_21 = furniData.canSitOn ? (sizeZ - 0.5) : sizeZ; - if(!_local_20) return new Vector3d(_local_18, _local_19, _local_21); + if (!_local_20) return new Vector3d(_local_18, _local_19, _local_21); return null; } private handleMouseOverTile(k: RoomObjectTileMouseEvent, roomId: number): ObjectTileCursorUpdateMessage { - if(this._whereYouClickIsWhereYouGo) + if (this._whereYouClickIsWhereYouGo) { return new ObjectTileCursorUpdateMessage(new Vector3d(k.tileXAsInt, k.tileYAsInt, k.tileZAsInt), 0, true, k.eventId); } const roomObject = this._roomEngine.getRoomObjectCursor(roomId); - if(roomObject && roomObject.visualization) + if (roomObject && roomObject.visualization) { const _local_4 = k.tileXAsInt; const _local_5 = k.tileYAsInt; const _local_6 = k.tileZAsInt; const _local_7 = this._roomEngine.getRoomInstance(roomId); - if(_local_7) + if (_local_7) { const _local_8 = this._roomEngine.getRoomTileObjectMap(roomId); - if(_local_8) + if (_local_8) { const _local_9 = _local_8.getObjectIntTile(_local_4, _local_5); const _local_10 = this._roomEngine.getFurnitureStackingHeightMap(roomId); - if(_local_10) + if (_local_10) { - if(_local_9 && _local_9.model && (_local_9.model.getValue(RoomObjectVariable.FURNITURE_IS_VARIABLE_HEIGHT) > 0)) + if (_local_9 && _local_9.model && (_local_9.model.getValue(RoomObjectVariable.FURNITURE_IS_VARIABLE_HEIGHT) > 0)) { const _local_11 = _local_10.getTileHeight(_local_4, _local_5); const _local_12 = this._roomEngine.getLegacyWallGeometry(roomId).getHeight(_local_4, _local_5); @@ -1679,7 +1679,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { const selectedData = this.getSelectedRoomObjectData(roomId); - if(!selectedData) return; + if (!selectedData) return; let roomObject: IRoomObjectController = null; let objectId = selectedData.id; @@ -1691,24 +1691,24 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou let direction = 0; let wallLocation = ''; - if(this._roomEngine && this._roomEngine.connection) + if (this._roomEngine && this._roomEngine.connection) { roomObject = this._roomEngine.getRoomObject(roomId, objectId, category); - if(roomObject) + if (roomObject) { const location = roomObject.getLocation(); direction = roomObject.getDirection().x; - if((category === RoomObjectCategory.FLOOR) || (category === RoomObjectCategory.UNIT)) + if ((category === RoomObjectCategory.FLOOR) || (category === RoomObjectCategory.UNIT)) { x = location.x; y = location.y; z = location.z; } - else if(category === RoomObjectCategory.WALL) + else if (category === RoomObjectCategory.WALL) { x = location.x; y = location.y; @@ -1716,29 +1716,29 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const wallGeometry = this._roomEngine.getLegacyWallGeometry(roomId); - if(wallGeometry) wallLocation = wallGeometry.getOldLocationString(location, direction); + if (wallGeometry) wallLocation = wallGeometry.getOldLocationString(location, direction); } direction = ((((direction / 45) % 8) + 8) % 8); - if((objectId < 0) && (category === RoomObjectCategory.UNIT)) objectId = (objectId * -1); + if ((objectId < 0) && (category === RoomObjectCategory.UNIT)) objectId = (objectId * -1); - if(this._objectPlacementSource !== RoomObjectPlacementSource.CATALOG) + if (this._objectPlacementSource !== RoomObjectPlacementSource.CATALOG) { - if(category === RoomObjectCategory.UNIT) + if (category === RoomObjectCategory.UNIT) { - if(selectedData.typeId === RoomObjectType.PET) + if (selectedData.typeId === RoomObjectType.PET) { this._roomEngine.connection.send(new PetPlaceComposer(objectId, Math.trunc(x), Math.trunc(y))); } - else if(selectedData.typeId === RoomObjectType.RENTABLE_BOT) + else if (selectedData.typeId === RoomObjectType.RENTABLE_BOT) { this._roomEngine.connection.send(new BotPlaceComposer(objectId, Math.trunc(x), Math.trunc(y))); } } - else if(roomObject.model.getValue(RoomObjectVariable.FURNITURE_IS_STICKIE) !== undefined) + else if (roomObject.model.getValue(RoomObjectVariable.FURNITURE_IS_STICKIE) !== undefined) { this._roomEngine.connection.send(new FurniturePostItPlaceComposer(objectId, wallLocation)); } @@ -1755,7 +1755,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this.resetSelectedObjectData(roomId); - if(this._roomEngine && this._roomEngine.events) + if (this._roomEngine && this._roomEngine.events) { const placedInRoom = (roomObject && (roomObject.id === selectedData.id)); @@ -1765,23 +1765,23 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou public modifyRoomObject(roomId: number, objectId: number, category: number, operation: string): boolean { - if(!this._roomEngine) return false; + if (!this._roomEngine) return false; const roomObject = this._roomEngine.getRoomObject(roomId, objectId, category); - if(!roomObject) return false; + if (!roomObject) return false; let _local_9 = true; - switch(operation) + switch (operation) { case RoomObjectOperationType.OBJECT_ROTATE_POSITIVE: case RoomObjectOperationType.OBJECT_ROTATE_NEGATIVE: - if(this._roomEngine.connection) + if (this._roomEngine.connection) { let direction = 0; - if(operation == RoomObjectOperationType.OBJECT_ROTATE_NEGATIVE) + if (operation == RoomObjectOperationType.OBJECT_ROTATE_NEGATIVE) { direction = this.getValidRoomObjectDirection(roomObject, false); } @@ -1793,19 +1793,19 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const x = roomObject.getLocation().x; const y = roomObject.getLocation().y; - if(this.isValidLocation(roomObject, new Vector3d(direction), this._roomEngine.getFurnitureStackingHeightMap(roomId))) + if (this.isValidLocation(roomObject, new Vector3d(direction), this._roomEngine.getFurnitureStackingHeightMap(roomId))) { direction = Math.trunc((direction / 45)); - if(roomObject.type === RoomObjectUserType.MONSTER_PLANT) + if (roomObject.type === RoomObjectUserType.MONSTER_PLANT) { const roomSession = this._roomEngine.roomSessionManager.getSession(roomId); - if(roomSession) + if (roomSession) { const userData = roomSession.userDataManager.getUserDataByIndex(objectId); - if(userData) + if (userData) { this._roomEngine.connection.send(new PetMoveComposer(userData.webID, Math.trunc(x), Math.trunc(y), direction)); } @@ -1820,14 +1820,14 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou break; case RoomObjectOperationType.OBJECT_EJECT: case RoomObjectOperationType.OBJECT_PICKUP: - if(this._roomEngine.connection) this._roomEngine.connection.send(new FurniturePickupComposer(category, objectId)); + if (this._roomEngine.connection) this._roomEngine.connection.send(new FurniturePickupComposer(category, objectId)); break; case RoomObjectOperationType.OBJECT_PICKUP_PET: - if(this._roomEngine.connection) + if (this._roomEngine.connection) { const session = this._roomEngine.roomSessionManager.getSession(roomId); - if(session) + if (session) { const userData = session.userDataManager.getUserDataByIndex(objectId); @@ -1836,11 +1836,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } break; case RoomObjectOperationType.OBJECT_PICKUP_BOT: - if(this._roomEngine.connection) + if (this._roomEngine.connection) { const session = this._roomEngine.roomSessionManager.getSession(roomId); - if(session) + if (session) { const userData = session.userDataManager.getUserDataByIndex(objectId); @@ -1862,9 +1862,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this.setFurnitureAlphaMultiplier(roomObject, 1); this._roomEngine.removeObjectMoverIconSprite(); - if(this._roomEngine.connection) + if (this._roomEngine.connection) { - if(category === RoomObjectCategory.FLOOR) + if (category === RoomObjectCategory.FLOOR) { const angle = ((roomObject.getDirection().x) % 360); const location = roomObject.getLocation(); @@ -1873,20 +1873,20 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this._roomEngine.connection.send(new FurnitureFloorUpdateComposer(objectId, location.x, location.y, direction)); } - else if(category === RoomObjectCategory.WALL) + else if (category === RoomObjectCategory.WALL) { const angle = ((roomObject.getDirection().x) % 360); const wallGeometry = this._roomEngine.getLegacyWallGeometry(roomId); - if(wallGeometry) + if (wallGeometry) { const location = wallGeometry.getOldLocationString(roomObject.getLocation(), angle); - if(location) this._roomEngine.connection.send(new FurnitureWallUpdateComposer(objectId, location)); + if (location) this._roomEngine.connection.send(new FurnitureWallUpdateComposer(objectId, location)); } } - else if(category === RoomObjectCategory.UNIT) + else if (category === RoomObjectCategory.UNIT) { const angle = ((roomObject.getDirection().x) % 360); const location = roomObject.getLocation(); @@ -1894,11 +1894,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const race = parseInt(roomObject.model.getValue(RoomObjectVariable.RACE)); const roomSession = this._roomEngine.roomSessionManager.getSession(roomId); - if(roomSession) + if (roomSession) { const userData = roomSession.userDataManager.getUserDataByIndex(objectId); - if(userData) this._roomEngine.connection.send(new PetMoveComposer(userData.webID, location.x, location.y, direction)); + if (userData) this._roomEngine.connection.send(new PetMoveComposer(userData.webID, location.x, location.y, direction)); } } } @@ -1907,23 +1907,23 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou } } - if(_local_9) this.resetSelectedObjectData(roomId); + if (_local_9) this.resetSelectedObjectData(roomId); return true; } public modifyRoomObjectDataWithMap(roomId: number, objectId: number, category: number, operation: string, data: Map): boolean { - if(!this._roomEngine) return false; + if (!this._roomEngine) return false; const roomObject = this._roomEngine.getRoomObject(roomId, objectId, category); - if(!roomObject) return false; + if (!roomObject) return false; - switch(operation) + switch (operation) { case RoomObjectOperationType.OBJECT_SAVE_STUFF_DATA: - if(this._roomEngine.connection) + if (this._roomEngine.connection) { this._roomEngine.connection.send(new SetObjectDataMessageComposer(objectId, data)); } @@ -1935,7 +1935,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou public modifyWallItemData(roomId: number, objectId: number, colorHex: string, text: string): boolean { - if(!this._roomEngine || !this._roomEngine.connection) return false; + if (!this._roomEngine || !this._roomEngine.connection) return false; this._roomEngine.connection.send(new SetItemDataMessageComposer(objectId, colorHex, text)); @@ -1944,7 +1944,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou public deleteWallItem(roomId: number, itemId: number): boolean { - if(!this._roomEngine || !this._roomEngine.connection) return false; + if (!this._roomEngine || !this._roomEngine.connection) return false; this._roomEngine.connection.send(new RemoveWallItemComposer(itemId)); @@ -1953,13 +1953,13 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou public getValidRoomObjectDirection(k: IRoomObjectController, _arg_2: boolean): number { - if(!k || !k.model) return 0; + if (!k || !k.model) return 0; let _local_6 = 0; let _local_7 = 0; let allowedDirections: number[] = []; - if(k.type === RoomObjectUserType.MONSTER_PLANT) + if (k.type === RoomObjectUserType.MONSTER_PLANT) { allowedDirections = k.model.getValue(RoomObjectVariable.PET_ALLOWED_DIRECTIONS); } @@ -1970,18 +1970,18 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou let direction = k.getDirection().x; - if(allowedDirections && allowedDirections.length) + if (allowedDirections && allowedDirections.length) { _local_6 = allowedDirections.indexOf(direction); - if(_local_6 < 0) + if (_local_6 < 0) { _local_6 = 0; _local_7 = 0; - while(_local_7 < allowedDirections.length) + while (_local_7 < allowedDirections.length) { - if(direction <= allowedDirections[_local_7]) break; + if (direction <= allowedDirections[_local_7]) break; _local_6++; _local_7++; @@ -1990,7 +1990,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou _local_6 = (_local_6 % allowedDirections.length); } - if(_arg_2) _local_6 = ((_local_6 + 1) % allowedDirections.length); + if (_arg_2) _local_6 = ((_local_6 + 1) % allowedDirections.length); else _local_6 = (((_local_6 - 1) + allowedDirections.length) % allowedDirections.length); direction = allowedDirections[_local_6]; @@ -2001,38 +2001,38 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private isValidLocation(object: IRoomObject, goalDirection: IVector3D, stackingHeightMap: FurnitureStackingHeightMap): boolean { - if(!object || !object.model || !goalDirection) return false; + if (!object || !object.model || !goalDirection) return false; const direction = object.getDirection(); const location = object.getLocation(); - if(!direction || !location) return false; + if (!direction || !location) return false; - if((direction.x % 180) === (goalDirection.x % 180)) return true; + if ((direction.x % 180) === (goalDirection.x % 180)) return true; let sizeX = object.model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); let sizeY = object.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Y); - if(sizeX < 1) sizeX = 1; + if (sizeX < 1) sizeX = 1; - if(sizeY < 1) sizeY = 1; + if (sizeY < 1) sizeY = 1; let _local_8 = sizeX; let _local_9 = sizeY; let _local_11 = (Math.trunc((Math.trunc((goalDirection.x + 45)) % 360) / 90)); - if((_local_11 === 1) || (_local_11 === 3)) [sizeX, sizeY] = [sizeY, sizeX]; + if ((_local_11 === 1) || (_local_11 === 3)) [sizeX, sizeY] = [sizeY, sizeX]; _local_11 = (Math.trunc((Math.trunc((direction.x + 45)) % 360) / 90)); - if(((_local_11 === 1) || (_local_11 === 3))) [_local_8, _local_9] = [_local_9, _local_8]; + if (((_local_11 === 1) || (_local_11 === 3))) [_local_8, _local_9] = [_local_9, _local_8]; - if(stackingHeightMap && location) + if (stackingHeightMap && location) { const alwaysStackable = (object.model.getValue(RoomObjectVariable.FURNITURE_ALWAYS_STACKABLE) === 1); - if(stackingHeightMap.validateLocation(location.x, location.y, sizeX, sizeY, location.x, location.y, _local_8, _local_9, alwaysStackable, location.z)) return true; + if (stackingHeightMap.validateLocation(location.x, location.y, sizeX, sizeY, location.x, location.y, _local_8, _local_9, alwaysStackable, location.z)) return true; } return false; @@ -2042,31 +2042,31 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { const _local_4 = this.getSelectedRoomObjectData(roomId); - if(!_local_4) return; + if (!_local_4) return; const _local_5 = (this._roomEngine.getRoomObject(roomId, objectId, category) as IRoomObjectController); - if(!_local_5) return; + if (!_local_5) return; - if(!this._roomEngine || !this._roomEngine.events) return; + if (!this._roomEngine || !this._roomEngine.events) return; this._roomEngine.events.dispatchEvent(new RoomEngineObjectPlacedOnUserEvent(RoomEngineObjectEvent.PLACED_ON_USER, roomId, objectId, category, _local_4.id, _local_4.category)); } public setSelectedObject(roomId: number, objectId: number, category: number): void { - if(!this._roomEngine) return; + if (!this._roomEngine) return; const eventDispatcher = this._roomEngine.events; - if(!eventDispatcher) return; + if (!eventDispatcher) return; - switch(category) + switch (category) { case RoomObjectCategory.UNIT: case RoomObjectCategory.FLOOR: case RoomObjectCategory.WALL: - if(category === RoomObjectCategory.UNIT) + if (category === RoomObjectCategory.UNIT) { this.deselectObject(roomId); this.setSelectedAvatar(roomId, objectId, true); @@ -2075,13 +2075,13 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { this.setSelectedAvatar(roomId, 0, false); - if(objectId !== this._selectedObjectId) + if (objectId !== this._selectedObjectId) { this.deselectObject(roomId); const roomObject = this._roomEngine.getRoomObject(roomId, objectId, category); - if(roomObject && roomObject.logic) + if (roomObject && roomObject.logic) { roomObject.logic.processUpdateMessage(new ObjectSelectedMessage(true)); @@ -2099,11 +2099,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private deselectObject(roomId: number): void { - if(this._selectedObjectId === -1) return; + if (this._selectedObjectId === -1) return; const object = this._roomEngine.getRoomObject(roomId, this._selectedObjectId, this._selectedObjectCategory); - if(object && object.logic) + if (object && object.logic) { object.logic.processUpdateMessage(new ObjectSelectedMessage(false)); @@ -2114,12 +2114,12 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou public setSelectedAvatar(k: number, _arg_2: number, _arg_3: boolean): void { - if(!this._roomEngine) return; + if (!this._roomEngine) return; const _local_4 = RoomObjectCategory.UNIT; const _local_5 = this._roomEngine.getRoomObject(k, this._selectedAvatarId, _local_4); - if(_local_5 && _local_5.logic) + if (_local_5 && _local_5.logic) { _local_5.logic.processUpdateMessage(new ObjectAvatarSelectedMessage(false)); @@ -2128,11 +2128,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou let _local_6 = false; - if(_arg_3) + if (_arg_3) { const _local_5 = this._roomEngine.getRoomObject(k, _arg_2, _local_4); - if(_local_5 && _local_5.logic) + if (_local_5 && _local_5.logic) { _local_5.logic.processUpdateMessage(new ObjectAvatarSelectedMessage(true)); @@ -2142,34 +2142,34 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const location = _local_5.getLocation(); - if(location) this._roomEngine.connection.send(new RoomUnitLookComposer(~~(location.x), ~~(location.y))); + if (location) this._roomEngine.connection.send(new RoomUnitLookComposer(~~(location.x), ~~(location.y))); } } const selectionArrow = this._roomEngine.getRoomObjectSelectionArrow(k); - if(selectionArrow && selectionArrow.logic) + if (selectionArrow && selectionArrow.logic) { - if(_local_6 && !this._roomEngine.isPlayingGame()) selectionArrow.logic.processUpdateMessage(new ObjectVisibilityUpdateMessage(ObjectVisibilityUpdateMessage.ENABLED)); + if (_local_6 && !this._roomEngine.isPlayingGame()) selectionArrow.logic.processUpdateMessage(new ObjectVisibilityUpdateMessage(ObjectVisibilityUpdateMessage.ENABLED)); else selectionArrow.logic.processUpdateMessage(new ObjectVisibilityUpdateMessage(ObjectVisibilityUpdateMessage.DISABLED)); } } private resetSelectedObjectData(roomId: number): void { - if(!this._roomEngine) return; + if (!this._roomEngine) return; this._roomEngine.removeObjectMoverIconSprite(); const selectedData = this.getSelectedRoomObjectData(roomId); - if(selectedData) + if (selectedData) { - if((selectedData.operation === RoomObjectOperationType.OBJECT_MOVE) || (selectedData.operation === RoomObjectOperationType.OBJECT_MOVE_TO)) + if ((selectedData.operation === RoomObjectOperationType.OBJECT_MOVE) || (selectedData.operation === RoomObjectOperationType.OBJECT_MOVE_TO)) { const roomObject = this._roomEngine.getRoomObject(roomId, selectedData.id, selectedData.category); - if(roomObject && (selectedData.operation !== RoomObjectOperationType.OBJECT_MOVE_TO)) + if (roomObject && (selectedData.operation !== RoomObjectOperationType.OBJECT_MOVE_TO)) { roomObject.setLocation(selectedData.loc); roomObject.setDirection(selectedData.dir); @@ -2177,7 +2177,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this.setFurnitureAlphaMultiplier(roomObject, 1); - if(selectedData.category === RoomObjectCategory.WALL) + if (selectedData.category === RoomObjectCategory.WALL) { this._roomEngine.updateRoomObjectMask(roomId, selectedData.id, true); } @@ -2185,12 +2185,12 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this.updateSelectedObjectData(roomId, selectedData.id, selectedData.category, selectedData.loc, selectedData.dir, RoomObjectOperationType.OBJECT_MOVE, selectedData.typeId, selectedData.instanceData, selectedData.stuffData, selectedData.state, selectedData.animFrame, selectedData.posture); } - else if((selectedData.operation === RoomObjectOperationType.OBJECT_PLACE)) + else if ((selectedData.operation === RoomObjectOperationType.OBJECT_PLACE)) { const objectId = selectedData.id; const category = selectedData.category; - switch(category) + switch (category) { case RoomObjectCategory.FLOOR: this._roomEngine.removeRoomObjectFloor(roomId, objectId); @@ -2210,14 +2210,14 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private getSelectedRoomObjectData(roomId: number): SelectedRoomObjectData { - if(!this._roomEngine) return null; + if (!this._roomEngine) return null; return this._roomEngine.getSelectedRoomObjectData(roomId); } private setFurnitureAlphaMultiplier(object: IRoomObjectController, multiplier: number): void { - if(!object || !object.model) return; + if (!object || !object.model) return; object.model.setValue(RoomObjectVariable.FURNITURE_ALPHA_MULTIPLIER, multiplier); } @@ -2238,7 +2238,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { this.resetSelectedObjectData(roomId); - if(!this._roomEngine) return; + if (!this._roomEngine) return; const selectedData = new SelectedRoomObjectData(id, category, operation, location, direction, typeId, instanceData, stuffData, state, frameNumber, posture); @@ -2247,7 +2247,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private updateSelectedObjectData(roomId: number, id: number, category: number, location: IVector3D, direction: IVector3D, operation: string, typeId: number = 0, instanceData: string = null, stuffData: IObjectData = null, state: number = -1, frameNumber: number = -1, posture: string = null): void { - if(!this._roomEngine) return null; + if (!this._roomEngine) return null; const selectedData = new SelectedRoomObjectData(id, category, operation, location, direction, typeId, instanceData, stuffData, state, frameNumber, posture); @@ -2256,7 +2256,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleUserPlace(roomObject: IRoomObjectController, x: number, y: number, wallGeometry: LegacyWallGeometry): boolean { - if(!wallGeometry.isRoomTile(x, y)) return false; + if (!wallGeometry.isRoomTile(x, y)) return false; roomObject.setLocation(new Vector3d(x, y, wallGeometry.getHeight(x, y))); diff --git a/src/nitro/room/RoomObjectLogicFactory.ts b/src/nitro/room/RoomObjectLogicFactory.ts index e5cbea72..29f22ff8 100644 --- a/src/nitro/room/RoomObjectLogicFactory.ts +++ b/src/nitro/room/RoomObjectLogicFactory.ts @@ -1,6 +1,6 @@ -import { NitroLogger } from '../../core/common/logger/NitroLogger'; +import { IEventDispatcher } from '../../api'; +import { NitroLogger } from '../../core/common/NitroLogger'; import { EventDispatcher } from '../../core/events/EventDispatcher'; -import { IEventDispatcher } from '../../core/events/IEventDispatcher'; import { IRoomObjectEventHandler } from '../../room/object/logic/IRoomObjectEventHandler'; import { IRoomObjectLogicFactory } from '../../room/object/logic/IRoomObjectLogicFactory'; import { RoomObjectLogicBase } from '../../room/object/logic/RoomObjectLogicBase'; @@ -74,23 +74,23 @@ export class RoomObjectLogicFactory implements IRoomObjectLogicFactory { const logic = this.getLogicType(type); - if(!logic) return null; + if (!logic) return null; const instance = (new logic() as IRoomObjectEventHandler); - if(!instance) return null; + if (!instance) return null; instance.eventDispatcher = this._events; - if(!this._cachedEvents.get(type)) + if (!this._cachedEvents.get(type)) { this._cachedEvents.set(type, true); const eventTypes = instance.getEventTypes(); - for(const eventType of eventTypes) + for (const eventType of eventTypes) { - if(!eventType) continue; + if (!eventType) continue; this.registerEventType(eventType); } @@ -101,13 +101,13 @@ export class RoomObjectLogicFactory implements IRoomObjectLogicFactory private registerEventType(type: string): void { - if(this._registeredEvents.get(type)) return; + if (this._registeredEvents.get(type)) return; this._registeredEvents.set(type, true); - for(const func of this._functions) + for (const func of this._functions) { - if(!func) continue; + if (!func) continue; this._events.addEventListener(type, func); } @@ -115,15 +115,15 @@ export class RoomObjectLogicFactory implements IRoomObjectLogicFactory public registerEventFunction(func: Function): void { - if(!func) return; + if (!func) return; - if(this._functions.indexOf(func) >= 0) return; + if (this._functions.indexOf(func) >= 0) return; this._functions.push(func); - for(const eventType of this._registeredEvents.keys()) + for (const eventType of this._registeredEvents.keys()) { - if(!eventType) continue; + if (!eventType) continue; this._events.addEventListener(eventType, func); } @@ -131,17 +131,17 @@ export class RoomObjectLogicFactory implements IRoomObjectLogicFactory public removeEventFunction(func: Function): void { - if(!func) return; + if (!func) return; const index = this._functions.indexOf(func); - if(index === -1) return; + if (index === -1) return; this._functions.splice(index, 1); - for(const event of this._registeredEvents.keys()) + for (const event of this._registeredEvents.keys()) { - if(!event) continue; + if (!event) continue; this._events.removeEventListener(event, func); } @@ -149,11 +149,11 @@ export class RoomObjectLogicFactory implements IRoomObjectLogicFactory public getLogicType(type: string): typeof RoomObjectLogicBase { - if(!type) return null; + if (!type) return null; let logic: typeof RoomObjectLogicBase = null; - switch(type) + switch (type) { case RoomObjectLogicType.ROOM: logic = RoomLogic; @@ -357,7 +357,7 @@ export class RoomObjectLogicFactory implements IRoomObjectLogicFactory break; } - if(!logic) + if (!logic) { NitroLogger.warn('Unknown Logic', type); diff --git a/src/nitro/room/object/RoomObjectVisualizationFactory.ts b/src/nitro/room/object/RoomObjectVisualizationFactory.ts index 0a0ee92a..066e95d3 100644 --- a/src/nitro/room/object/RoomObjectVisualizationFactory.ts +++ b/src/nitro/room/object/RoomObjectVisualizationFactory.ts @@ -1,5 +1,5 @@ import { IAssetData } from '../../../api'; -import { NitroLogger } from '../../../core/common/logger/NitroLogger'; +import { NitroLogger } from '../../../core/common/NitroLogger'; import { IRoomObjectGraphicVisualization } from '../../../room/object/visualization/IRoomObjectGraphicVisualization'; import { IObjectVisualizationData } from '../../../room/object/visualization/IRoomObjectVisualizationData'; import { IRoomObjectVisualizationFactory } from '../../../room/object/visualization/IRoomObjectVisualizationFactory'; diff --git a/src/nitro/room/object/data/IObjectData.ts b/src/nitro/room/object/data/IObjectData.ts index 1df0cc76..879e137d 100644 --- a/src/nitro/room/object/data/IObjectData.ts +++ b/src/nitro/room/object/data/IObjectData.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../api'; import { IRoomObjectModel } from '../../../../room/object/IRoomObjectModel'; export interface IObjectData diff --git a/src/nitro/room/object/data/ObjectDataBase.ts b/src/nitro/room/object/data/ObjectDataBase.ts index 44d54284..076fef18 100644 --- a/src/nitro/room/object/data/ObjectDataBase.ts +++ b/src/nitro/room/object/data/ObjectDataBase.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../api'; import { IRoomObjectModel } from '../../../../room/object/IRoomObjectModel'; import { RoomObjectVariable } from '../RoomObjectVariable'; import { IObjectData } from './IObjectData'; @@ -19,7 +19,7 @@ export class ObjectDataBase implements IObjectData public parseWrapper(wrapper: IMessageDataWrapper): void { - if((this._flags & ObjectDataFlags.UNIQUE_SET) > 0) + if ((this._flags & ObjectDataFlags.UNIQUE_SET) > 0) { this._uniqueNumber = wrapper.readInt(); this._uniqueSeries = wrapper.readInt(); @@ -34,7 +34,7 @@ export class ObjectDataBase implements IObjectData public writeRoomObjectModel(model: IRoomObjectModel): void { - if(!model) return; + if (!model) return; model.setValue(RoomObjectVariable.FURNITURE_UNIQUE_SERIAL_NUMBER, this._uniqueNumber); model.setValue(RoomObjectVariable.FURNITURE_UNIQUE_EDITION_SIZE, this._uniqueSeries); diff --git a/src/nitro/room/object/data/type/CrackableDataType.ts b/src/nitro/room/object/data/type/CrackableDataType.ts index e4378ea1..c120fc52 100644 --- a/src/nitro/room/object/data/type/CrackableDataType.ts +++ b/src/nitro/room/object/data/type/CrackableDataType.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IRoomObjectModel } from '../../../../../room/object/IRoomObjectModel'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; @@ -24,7 +24,7 @@ export class CrackableDataType extends ObjectDataBase implements IObjectData public parseWrapper(wrapper: IMessageDataWrapper): void { - if(!wrapper) return; + if (!wrapper) return; this._state = wrapper.readString(); this._hits = wrapper.readInt(); @@ -71,4 +71,4 @@ export class CrackableDataType extends ObjectDataBase implements IObjectData { return this._target; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/data/type/EmptyDataType.ts b/src/nitro/room/object/data/type/EmptyDataType.ts index 905a7c4d..0ba8ab5e 100644 --- a/src/nitro/room/object/data/type/EmptyDataType.ts +++ b/src/nitro/room/object/data/type/EmptyDataType.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IRoomObjectModel } from '../../../../../room/object/IRoomObjectModel'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; @@ -13,7 +13,7 @@ export class EmptyDataType extends ObjectDataBase implements IObjectData public parseWrapper(wrapper: IMessageDataWrapper): void { - if(!wrapper) return; + if (!wrapper) return; this._state = ''; @@ -36,4 +36,4 @@ export class EmptyDataType extends ObjectDataBase implements IObjectData { return super.compare(data); } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/data/type/HighScoreDataType.ts b/src/nitro/room/object/data/type/HighScoreDataType.ts index 99167e9a..18da147c 100644 --- a/src/nitro/room/object/data/type/HighScoreDataType.ts +++ b/src/nitro/room/object/data/type/HighScoreDataType.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IRoomObjectModel } from '../../../../../room/object/IRoomObjectModel'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; @@ -27,7 +27,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData public parseWrapper(wrapper: IMessageDataWrapper): void { - if(!wrapper) return; + if (!wrapper) return; this._state = wrapper.readString(); this._scoreType = wrapper.readInt(); @@ -35,7 +35,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData let totalScores = wrapper.readInt(); - while(totalScores > 0) + while (totalScores > 0) { const data = new HighScoreData(); @@ -43,7 +43,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData let totalUsers = wrapper.readInt(); - while(totalUsers > 0) + while (totalUsers > 0) { data.addUsername(wrapper.readString()); @@ -68,7 +68,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData let i = 0; - while(i < totalEntries) + while (i < totalEntries) { const data = new HighScoreData(); @@ -91,13 +91,13 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData model.setValue(RoomObjectVariable.FURNITURE_HIGHSCORE_SCORE_TYPE, this._scoreType); model.setValue(RoomObjectVariable.FURNITURE_HIGHSCORE_CLEAR_TYPE, this._clearType); - if(this._entries) + if (this._entries) { model.setValue(RoomObjectVariable.FURNITURE_HIGHSCORE_DATA_ENTRY_COUNT, this._entries.length); let i = 0; - while(i < this._entries.length) + while (i < this._entries.length) { const entry = this._entries[i]; diff --git a/src/nitro/room/object/data/type/LegacyDataType.ts b/src/nitro/room/object/data/type/LegacyDataType.ts index c2c66951..f143f4c2 100644 --- a/src/nitro/room/object/data/type/LegacyDataType.ts +++ b/src/nitro/room/object/data/type/LegacyDataType.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IRoomObjectModel } from '../../../../../room/object/IRoomObjectModel'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; @@ -20,7 +20,7 @@ export class LegacyDataType extends ObjectDataBase implements IObjectData public parseWrapper(wrapper: IMessageDataWrapper): void { - if(!wrapper) return; + if (!wrapper) return; this._data = wrapper.readString(); @@ -56,4 +56,4 @@ export class LegacyDataType extends ObjectDataBase implements IObjectData { this._data = data; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/data/type/MapDataType.ts b/src/nitro/room/object/data/type/MapDataType.ts index bcdaebc9..e72ca7c7 100644 --- a/src/nitro/room/object/data/type/MapDataType.ts +++ b/src/nitro/room/object/data/type/MapDataType.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IRoomObjectModel } from '../../../../../room/object/IRoomObjectModel'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; @@ -23,13 +23,13 @@ export class MapDataType extends ObjectDataBase public parseWrapper(wrapper: IMessageDataWrapper): void { - if(!wrapper) return; + if (!wrapper) return; this._data = {}; const totalSets = wrapper.readInt(); - if(totalSets) for(let i = 0; i < totalSets; i++) this._data[wrapper.readString()] = wrapper.readString(); + if (totalSets) for (let i = 0; i < totalSets; i++) this._data[wrapper.readString()] = wrapper.readString(); super.parseWrapper(wrapper); } @@ -51,11 +51,11 @@ export class MapDataType extends ObjectDataBase public getLegacyString(): string { - if(!this._data) return ''; + if (!this._data) return ''; const state = this._data[MapDataType.STATE]; - if(state === undefined || state === null) return ''; + if (state === undefined || state === null) return ''; return state; } @@ -72,11 +72,11 @@ export class MapDataType extends ObjectDataBase public get rarityLevel(): number { - if(!this._data) return -1; + if (!this._data) return -1; const state = this._data[MapDataType.RARITY]; - if(state === undefined || state === null) return -1; + if (state === undefined || state === null) return -1; return parseInt(state); } diff --git a/src/nitro/room/object/data/type/NumberDataType.ts b/src/nitro/room/object/data/type/NumberDataType.ts index d7a806e1..69db36a6 100644 --- a/src/nitro/room/object/data/type/NumberDataType.ts +++ b/src/nitro/room/object/data/type/NumberDataType.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IRoomObjectModel } from '../../../../../room/object/IRoomObjectModel'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; @@ -22,13 +22,13 @@ export class NumberDataType extends ObjectDataBase public parseWrapper(wrapper: IMessageDataWrapper): void { - if(!wrapper) return; + if (!wrapper) return; this._data = []; const totalNumbers = wrapper.readInt(); - if(totalNumbers) for(let i = 0; i < totalNumbers; i++) this._data.push(wrapper.readInt()); + if (totalNumbers) for (let i = 0; i < totalNumbers; i++) this._data.push(wrapper.readInt()); super.parseWrapper(wrapper); } @@ -50,26 +50,26 @@ export class NumberDataType extends ObjectDataBase public getLegacyString(): string { - if(!this._data || !this._data.length) return ''; + if (!this._data || !this._data.length) return ''; return this._data[NumberDataType.STATE].toString(); } public compare(data: IObjectData): boolean { - if(!(data instanceof NumberDataType)) return false; + if (!(data instanceof NumberDataType)) return false; let i = 0; - while(i < this._data.length) + while (i < this._data.length) { - if(i === 0) + if (i === 0) { // } else { - if(this._data[i] !== data.getValue(i)) return false; + if (this._data[i] !== data.getValue(i)) return false; } i++; @@ -80,12 +80,12 @@ export class NumberDataType extends ObjectDataBase public getValue(index: number): number { - if(!this._data || !this._data.length) return -1; + if (!this._data || !this._data.length) return -1; const value = this._data[index]; - if(value === undefined || value === null) return -1; + if (value === undefined || value === null) return -1; return value; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/data/type/StringDataType.ts b/src/nitro/room/object/data/type/StringDataType.ts index f63dd3d8..431de63d 100644 --- a/src/nitro/room/object/data/type/StringDataType.ts +++ b/src/nitro/room/object/data/type/StringDataType.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IRoomObjectModel } from '../../../../../room/object/IRoomObjectModel'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; @@ -22,13 +22,13 @@ export class StringDataType extends ObjectDataBase public parseWrapper(wrapper: IMessageDataWrapper): void { - if(!wrapper) return; + if (!wrapper) return; this._data = []; const totalStrings = wrapper.readInt(); - if(totalStrings) for(let i = 0; i < totalStrings; i++) this._data.push(wrapper.readString()); + if (totalStrings) for (let i = 0; i < totalStrings; i++) this._data.push(wrapper.readString()); super.parseWrapper(wrapper); } @@ -50,26 +50,26 @@ export class StringDataType extends ObjectDataBase public getLegacyString(): string { - if(!this._data || !this._data.length) return ''; + if (!this._data || !this._data.length) return ''; return this._data[StringDataType.STATE]; } public compare(data: IObjectData): boolean { - if(!(data instanceof StringDataType)) return false; + if (!(data instanceof StringDataType)) return false; let i = 0; - while(i < this._data.length) + while (i < this._data.length) { - if(i === 0) + if (i === 0) { // } else { - if(this._data[i] !== data.getValue(i)) return false; + if (this._data[i] !== data.getValue(i)) return false; } i++; diff --git a/src/nitro/room/object/data/type/VoteDataType.ts b/src/nitro/room/object/data/type/VoteDataType.ts index eb735c4a..52c4139f 100644 --- a/src/nitro/room/object/data/type/VoteDataType.ts +++ b/src/nitro/room/object/data/type/VoteDataType.ts @@ -1,4 +1,4 @@ -import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from '../../../../../api'; import { IRoomObjectModel } from '../../../../../room/object/IRoomObjectModel'; import { RoomObjectVariable } from '../../RoomObjectVariable'; import { IObjectData } from '../IObjectData'; @@ -22,7 +22,7 @@ export class VoteDataType extends ObjectDataBase public parseWrapper(wrapper: IMessageDataWrapper): void { - if(!wrapper) return; + if (!wrapper) return; this._state = wrapper.readString(); this._result = wrapper.readInt(); @@ -63,4 +63,4 @@ export class VoteDataType extends ObjectDataBase { return this._result; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/visualization/avatar/AvatarVisualizationData.ts b/src/nitro/room/object/visualization/avatar/AvatarVisualizationData.ts index a60b647d..66367bc8 100644 --- a/src/nitro/room/object/visualization/avatar/AvatarVisualizationData.ts +++ b/src/nitro/room/object/visualization/avatar/AvatarVisualizationData.ts @@ -1,6 +1,6 @@ import { Resource, Texture } from '@pixi/core'; import { IAssetData } from '../../../../../api'; -import { Disposable } from '../../../../../core/common/disposable/Disposable'; +import { Disposable } from '../../../../../core/common/Disposable'; import { IObjectVisualizationData } from '../../../../../room/object/visualization/IRoomObjectVisualizationData'; import { AvatarScaleType } from '../../../../avatar/enum/AvatarScaleType'; import { IAvatarEffectListener } from '../../../../avatar/IAvatarEffectListener'; diff --git a/src/nitro/room/object/visualization/room/RoomVisualizationData.ts b/src/nitro/room/object/visualization/room/RoomVisualizationData.ts index bbc3cb0a..4322dd77 100644 --- a/src/nitro/room/object/visualization/room/RoomVisualizationData.ts +++ b/src/nitro/room/object/visualization/room/RoomVisualizationData.ts @@ -1,5 +1,5 @@ import { IAssetData, IGraphicAssetCollection } from '../../../../../api'; -import { Disposable } from '../../../../../core/common/disposable/Disposable'; +import { Disposable } from '../../../../../core/common/Disposable'; import { IObjectVisualizationData } from '../../../../../room/object/visualization/IRoomObjectVisualizationData'; import { PlaneMaskManager } from './mask/PlaneMaskManager'; import { LandscapeRasterizer } from './rasterizer/animated/LandscapeRasterizer'; diff --git a/src/nitro/room/object/visualization/room/rasterizer/animated/PlaneVisualizationAnimationLayer.ts b/src/nitro/room/object/visualization/room/rasterizer/animated/PlaneVisualizationAnimationLayer.ts index 2d5b0ec4..cbb18dc0 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/animated/PlaneVisualizationAnimationLayer.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/animated/PlaneVisualizationAnimationLayer.ts @@ -1,7 +1,6 @@ import { Graphics } from '@pixi/graphics'; import { Matrix } from '@pixi/math'; -import { IGraphicAssetCollection } from '../../../../../../../api'; -import { IDisposable } from '../../../../../../../core/common/disposable/IDisposable'; +import { IDisposable, IGraphicAssetCollection } from '../../../../../../../api'; import { IVector3D } from '../../../../../../../room/utils/IVector3D'; import { AnimationItem } from './AnimationItem'; diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualization.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualization.ts index cd56f61f..5ef6f18a 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualization.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualization.ts @@ -1,6 +1,5 @@ import { Graphics } from '@pixi/graphics'; -import { IGraphicAssetCollection } from '../../../../../../../api'; -import { IDisposable } from '../../../../../../../core/common/disposable/IDisposable'; +import { IDisposable, IGraphicAssetCollection } from '../../../../../../../api'; import { IRoomGeometry } from '../../../../../../../room/utils/IRoomGeometry'; import { IVector3D } from '../../../../../../../room/utils/IVector3D'; import { Vector3d } from '../../../../../../../room/utils/Vector3d'; diff --git a/src/nitro/room/utils/TileObjectMap.ts b/src/nitro/room/utils/TileObjectMap.ts index 989e77b2..a432a6a3 100644 --- a/src/nitro/room/utils/TileObjectMap.ts +++ b/src/nitro/room/utils/TileObjectMap.ts @@ -1,4 +1,4 @@ -import { NitroLogger } from '../../../core/common/logger/NitroLogger'; +import { NitroLogger } from '../../../core/common/NitroLogger'; import { IRoomObject } from '../../../room/object/IRoomObject'; import { RoomObjectVariable } from '../object/RoomObjectVariable'; @@ -14,7 +14,7 @@ export class TileObjectMap let index = 0; - while(index < _arg_2) + while (index < _arg_2) { this._tileObjectMap.set(index, new Map()); @@ -27,9 +27,9 @@ export class TileObjectMap public clear(): void { - for(const k of this._tileObjectMap.values()) + for (const k of this._tileObjectMap.values()) { - if(!k) continue; + if (!k) continue; k.clear(); } @@ -41,7 +41,7 @@ export class TileObjectMap { this.clear(); - for(const _local_2 of k) this.addRoomObject(_local_2); + for (const _local_2 of k) this.addRoomObject(_local_2); } public dispose(): void @@ -53,11 +53,11 @@ export class TileObjectMap public getObjectIntTile(k: number, _arg_2: number): IRoomObject { - if((((k >= 0) && (k < this._width)) && (_arg_2 >= 0)) && (_arg_2 < this._height)) + if ((((k >= 0) && (k < this._width)) && (_arg_2 >= 0)) && (_arg_2 < this._height)) { const existing = this._tileObjectMap.get(_arg_2); - if(existing) return existing.get(k); + if (existing) return existing.get(k); } return null; @@ -65,51 +65,51 @@ export class TileObjectMap public setObjectInTile(k: number, _arg_2: number, _arg_3: IRoomObject): void { - if(!_arg_3.isReady) + if (!_arg_3.isReady) { NitroLogger.log('Assigning non initialized object to tile object map!'); return; } - if((((k >= 0) && (k < this._width)) && (_arg_2 >= 0)) && (_arg_2 < this._height)) + if ((((k >= 0) && (k < this._width)) && (_arg_2 >= 0)) && (_arg_2 < this._height)) { const existing = this._tileObjectMap.get(_arg_2); - if(existing) existing.set(k, _arg_3); + if (existing) existing.set(k, _arg_3); } } public addRoomObject(k: IRoomObject): void { - if(!k || !k.model || !k.isReady) return; + if (!k || !k.model || !k.isReady) return; const location = k.getLocation(); const direction = k.getDirection(); - if(!location || !direction) return; + if (!location || !direction) return; let sizeX = k.model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); let sizeY = k.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Y); - if(sizeX < 1) sizeX = 1; - if(sizeY < 1) sizeY = 1; + if (sizeX < 1) sizeX = 1; + if (sizeY < 1) sizeY = 1; const directionNumber = ((Math.trunc((direction.x + 45)) % 360) / 90); - if((directionNumber === 1) || (directionNumber === 3)) [sizeX, sizeY] = [sizeY, sizeX]; + if ((directionNumber === 1) || (directionNumber === 3)) [sizeX, sizeY] = [sizeY, sizeX]; let y = location.y; - while(y < (location.y + sizeY)) + while (y < (location.y + sizeY)) { let x = location.x; - while(x < (location.x + sizeX)) + while (x < (location.x + sizeX)) { const roomObject = this.getObjectIntTile(x, y); - if((!(roomObject)) || ((!(roomObject === k)) && (roomObject.getLocation().z <= location.z))) + if ((!(roomObject)) || ((!(roomObject === k)) && (roomObject.getLocation().z <= location.z))) { this.setObjectInTile(x, y, k); } diff --git a/src/nitro/session/GroupInformationManager.ts b/src/nitro/session/GroupInformationManager.ts index 169a2325..3fefe409 100644 --- a/src/nitro/session/GroupInformationManager.ts +++ b/src/nitro/session/GroupInformationManager.ts @@ -1,5 +1,4 @@ -import { IDisposable } from '../../core/common/disposable/IDisposable'; -import { IMessageEvent } from '../../core/communication/messages/IMessageEvent'; +import { IDisposable, IMessageEvent } from '../../api'; import { RoomReadyMessageEvent } from '../communication'; import { HabboGroupBadgesMessageEvent } from '../communication/messages/incoming/user/HabboGroupBadgesMessageEvent'; import { GetHabboGroupBadgesMessageComposer } from '../communication/messages/outgoing/user/GetHabboGroupBadgesMessageComposer'; @@ -20,24 +19,24 @@ export class GroupInformationManager implements IDisposable public init(): void { - if(this._sessionDataManager && this._sessionDataManager.communication) + if (this._sessionDataManager && this._sessionDataManager.communication) { this._messages = [ new RoomReadyMessageEvent(this.onRoomReadyMessageEvent.bind(this)), new HabboGroupBadgesMessageEvent(this.onGroupBadgesEvent.bind(this)) ]; - for(const message of this._messages) this._sessionDataManager.communication.registerMessageEvent(message); + for (const message of this._messages) this._sessionDataManager.communication.registerMessageEvent(message); } } public dispose(): void { - if(this.disposed) return; + if (this.disposed) return; - if(this._messages && this._messages.length) + if (this._messages && this._messages.length) { - for(const message of this._messages) this._sessionDataManager.communication.removeMessageEvent(message); + for (const message of this._messages) this._sessionDataManager.communication.removeMessageEvent(message); this._messages = null; } @@ -55,7 +54,7 @@ export class GroupInformationManager implements IDisposable { const parser = event.getParser(); - for(const [ groupId, badgeId ] of parser.badges.entries()) this._groupBadges.set(groupId, badgeId); + for (const [groupId, badgeId] of parser.badges.entries()) this._groupBadges.set(groupId, badgeId); } public getGroupBadge(groupId: number): string diff --git a/src/nitro/session/IRoomHandlerListener.ts b/src/nitro/session/IRoomHandlerListener.ts index 85730476..ae59a696 100644 --- a/src/nitro/session/IRoomHandlerListener.ts +++ b/src/nitro/session/IRoomHandlerListener.ts @@ -1,4 +1,4 @@ -import { IEventDispatcher } from '../../core/events/IEventDispatcher'; +import { IEventDispatcher } from '../../api'; import { IRoomSession } from './IRoomSession'; export interface IRoomHandlerListener @@ -7,4 +7,4 @@ export interface IRoomHandlerListener sessionUpdate(id: number, type: string): void; sessionReinitialize(fromRoomId: number, toRoomId: number): void; events: IEventDispatcher; -} \ No newline at end of file +} diff --git a/src/nitro/session/IRoomSession.ts b/src/nitro/session/IRoomSession.ts index 314333a7..40ac41e2 100644 --- a/src/nitro/session/IRoomSession.ts +++ b/src/nitro/session/IRoomSession.ts @@ -1,5 +1,4 @@ -import { IDisposable } from '../../core/common/disposable/IDisposable'; -import { IConnection } from '../../core/communication/connections/IConnection'; +import { IConnection, IDisposable } from '../../api'; import { RoomModerationSettings } from '../communication/messages/incoming/roomsettings/RoomModerationSettings'; import { UserDataManager } from './UserDataManager'; diff --git a/src/nitro/session/IRoomSessionManager.ts b/src/nitro/session/IRoomSessionManager.ts index cf98881f..6885fd7f 100644 --- a/src/nitro/session/IRoomSessionManager.ts +++ b/src/nitro/session/IRoomSessionManager.ts @@ -1,4 +1,4 @@ -import { INitroManager } from '../../core/common/INitroManager'; +import { INitroManager } from '../../api'; import { INitroCommunicationManager } from '../communication/INitroCommunicationManager'; import { IRoomSession } from './IRoomSession'; @@ -10,4 +10,4 @@ export interface IRoomSessionManager extends INitroManager removeSession(id: number, openLandingView?: boolean): void; communication: INitroCommunicationManager; viewerSession: IRoomSession; -} \ No newline at end of file +} diff --git a/src/nitro/session/ISessionDataManager.ts b/src/nitro/session/ISessionDataManager.ts index 0720265d..17ae5256 100644 --- a/src/nitro/session/ISessionDataManager.ts +++ b/src/nitro/session/ISessionDataManager.ts @@ -1,5 +1,5 @@ import { Resource, Texture } from '@pixi/core'; -import { INitroManager } from '../../core/common/INitroManager'; +import { INitroManager } from '../../api'; import { INitroCommunicationManager } from '../communication/INitroCommunicationManager'; import { IFurnitureData } from './furniture/IFurnitureData'; import { IFurnitureDataListener } from './furniture/IFurnitureDataListener'; diff --git a/src/nitro/session/IgnoredUsersManager.ts b/src/nitro/session/IgnoredUsersManager.ts index e5243136..66e9f5fe 100644 --- a/src/nitro/session/IgnoredUsersManager.ts +++ b/src/nitro/session/IgnoredUsersManager.ts @@ -1,5 +1,4 @@ -import { IDisposable } from '../../core/common/disposable/IDisposable'; -import { IMessageEvent } from '../../core/communication/messages/IMessageEvent'; +import { IDisposable, IMessageEvent } from '../../api'; import { IgnoredUsersEvent } from '../communication/messages/incoming/user/IgnoredUsersEvent'; import { IgnoreResultEvent } from '../communication/messages/incoming/user/IgnoreResultEvent'; import { GetIgnoredUsersComposer } from '../communication/messages/outgoing/user/data/GetIgnoredUsersComposer'; @@ -23,24 +22,24 @@ export class IgnoredUsersManager implements IDisposable public init(): void { - if(this._sessionDataManager && this._sessionDataManager.communication) + if (this._sessionDataManager && this._sessionDataManager.communication) { this._messages = [ new IgnoredUsersEvent(this.onIgnoredUsersEvent.bind(this)), new IgnoreResultEvent(this.onIgnoreResultEvent.bind(this)) ]; - for(const message of this._messages) this._sessionDataManager.communication.registerMessageEvent(message); + for (const message of this._messages) this._sessionDataManager.communication.registerMessageEvent(message); } } public dispose(): void { - if(this.disposed) return; + if (this.disposed) return; - if(this._messages && this._messages.length) + if (this._messages && this._messages.length) { - for(const message of this._messages) this._sessionDataManager.communication.removeMessageEvent(message); + for (const message of this._messages) this._sessionDataManager.communication.removeMessageEvent(message); this._messages = null; } @@ -55,26 +54,26 @@ export class IgnoredUsersManager implements IDisposable private onIgnoredUsersEvent(event: IgnoredUsersEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this._ignoredUsers = parser.ignoredUsers; } private onIgnoreResultEvent(event: IgnoreResultEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const name = parser.name; - switch(parser.result) + switch (parser.result) { case 0: return; @@ -93,14 +92,14 @@ export class IgnoredUsersManager implements IDisposable private addUserToIgnoreList(name: string): void { - if(this._ignoredUsers.indexOf(name) < 0) this._ignoredUsers.push(name); + if (this._ignoredUsers.indexOf(name) < 0) this._ignoredUsers.push(name); } private removeUserFromIgnoreList(name: string): void { const index = this._ignoredUsers.indexOf(name); - if(index >= 0) this._ignoredUsers.splice(index, 1); + if (index >= 0) this._ignoredUsers.splice(index, 1); } public ignoreUserId(id: number): void diff --git a/src/nitro/session/RoomSession.ts b/src/nitro/session/RoomSession.ts index 71c13bce..f4f57f79 100644 --- a/src/nitro/session/RoomSession.ts +++ b/src/nitro/session/RoomSession.ts @@ -1,5 +1,5 @@ -import { Disposable } from '../../core/common/disposable/Disposable'; -import { IConnection } from '../../core/communication/connections/IConnection'; +import { IConnection } from '../../api'; +import { Disposable } from '../../core/common/Disposable'; import { CompostPlantMessageComposer, FurnitureMultiStateComposer, HarvestPetMessageComposer, PetMountComposer, PollAnswerComposer, PollRejectComposer, PollStartComposer, RemovePetSaddleComposer, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer } from '../communication'; import { RoomModerationSettings } from '../communication/messages/incoming/roomsettings/RoomModerationSettings'; import { RoomDoorbellAccessComposer } from '../communication/messages/outgoing/room/access/RoomDoorbellAccessComposer'; @@ -76,7 +76,7 @@ export class RoomSession extends Disposable implements IRoomSession protected onDispose(): void { - if(this._userData) + if (this._userData) { this._userData.dispose(); @@ -88,16 +88,16 @@ export class RoomSession extends Disposable implements IRoomSession public setConnection(connection: IConnection): void { - if(this._connection || !connection) return; + if (this._connection || !connection) return; this._connection = connection; - if(this._userData) this._userData.setConnection(connection); + if (this._userData) this._userData.setConnection(connection); } public setControllerLevel(level: number): void { - if((level >= RoomControllerLevel.NONE) && (level <= RoomControllerLevel.MODERATOR)) + if ((level >= RoomControllerLevel.NONE) && (level <= RoomControllerLevel.MODERATOR)) { this._controllerLevel = level; @@ -119,7 +119,7 @@ export class RoomSession extends Disposable implements IRoomSession public start(): boolean { - if(this._state !== RoomSessionEvent.CREATED || !this._connection) return false; + if (this._state !== RoomSessionEvent.CREATED || !this._connection) return false; this._state = RoomSessionEvent.STARTED; @@ -128,7 +128,7 @@ export class RoomSession extends Disposable implements IRoomSession private enterRoom(): boolean { - if(!this._connection) return false; + if (!this._connection) return false; this._connection.send(new RoomEnterComposer(this._roomId, this._password)); @@ -137,7 +137,7 @@ export class RoomSession extends Disposable implements IRoomSession public reset(roomId: number): void { - if(roomId === this._roomId) return; + if (roomId === this._roomId) return; this._roomId = roomId; } @@ -159,7 +159,7 @@ export class RoomSession extends Disposable implements IRoomSession public sendChatTypingMessage(isTyping: boolean): void { - if(isTyping) this._connection.send(new RoomUnitTypingStartComposer()); + if (isTyping) this._connection.send(new RoomUnitTypingStartComposer()); else this._connection.send(new RoomUnitTypingStopComposer()); } @@ -180,7 +180,7 @@ export class RoomSession extends Disposable implements IRoomSession public sendSignMessage(sign: number): void { - if((sign < 0) || (sign > 17)) return; + if ((sign < 0) || (sign > 17)) return; this._connection.send(new RoomUnitSignComposer(sign)); } @@ -255,21 +255,21 @@ export class RoomSession extends Disposable implements IRoomSession public pickupPet(id: number): void { - if(!this._connection) return; + if (!this._connection) return; this._connection.send(new PetRemoveComposer(id)); } public pickupBot(id: number): void { - if(!this._connection) return; + if (!this._connection) return; this._connection.send(new BotRemoveComposer(id)); } public requestMoodlightSettings(): void { - if(!this._connection) return; + if (!this._connection) return; this._connection.send(new MoodlightSettingsComposer()); } diff --git a/src/nitro/session/SessionDataManager.ts b/src/nitro/session/SessionDataManager.ts index 2c764940..90d301e1 100644 --- a/src/nitro/session/SessionDataManager.ts +++ b/src/nitro/session/SessionDataManager.ts @@ -1,6 +1,6 @@ import { Resource, Texture } from '@pixi/core'; +import { IMessageComposer } from '../../api'; import { NitroManager } from '../../core/common/NitroManager'; -import { IMessageComposer } from '../../core/communication/messages/IMessageComposer'; import { NitroEvent } from '../../core/events/NitroEvent'; import { FigureUpdateEvent, MysteryBoxKeysEvent } from '../communication'; import { INitroCommunicationManager } from '../communication/INitroCommunicationManager'; @@ -143,14 +143,14 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana { this.destroyFurnitureData(); - if(this._ignoredUsersManager) + if (this._ignoredUsersManager) { this._ignoredUsersManager.dispose(); this._ignoredUsersManager = null; } - if(this._groupInformationManager) + if (this._groupInformationManager) { this._groupInformationManager.dispose(); @@ -196,7 +196,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private loadBadgeImageManager(): void { - if(this._badgeImageManager) return; + if (this._badgeImageManager) return; this._badgeImageManager = new BadgeImageManager(Nitro.instance.core.asset, this); this._badgeImageManager.init(); @@ -204,34 +204,34 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana public hasProductData(listener: IProductDataListener): boolean { - if(this._productsReady) return true; + if (this._productsReady) return true; - if(listener && (this._pendingProductListeners.indexOf(listener) === -1)) this._pendingProductListeners.push(listener); + if (listener && (this._pendingProductListeners.indexOf(listener) === -1)) this._pendingProductListeners.push(listener); return false; } public getAllFurnitureData(listener: IFurnitureDataListener): IFurnitureData[] { - if(!this._furnitureReady) + if (!this._furnitureReady) { - if(this._pendingFurnitureListeners.indexOf(listener) === -1) this._pendingFurnitureListeners.push(listener); + if (this._pendingFurnitureListeners.indexOf(listener) === -1) this._pendingFurnitureListeners.push(listener); return null; } const furnitureData: IFurnitureData[] = []; - for(const data of this._floorItems.values()) + for (const data of this._floorItems.values()) { - if(!data) continue; + if (!data) continue; furnitureData.push(data); } - for(const data of this._wallItems.values()) + for (const data of this._wallItems.values()) { - if(!data) continue; + if (!data) continue; furnitureData.push(data); } @@ -241,18 +241,18 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana public removePendingFurniDataListener(listener: IFurnitureDataListener): void { - if(!this._pendingFurnitureListeners) return; + if (!this._pendingFurnitureListeners) return; const index = this._pendingFurnitureListeners.indexOf(listener); - if(index === -1) return; + if (index === -1) return; this._pendingFurnitureListeners.splice(index, 1); } private onUserFigureEvent(event: FigureUpdateEvent): void { - if(!event || !event.connection) return; + if (!event || !event.connection) return; this._figure = event.getParser().figure; this._gender = event.getParser().gender; @@ -262,13 +262,13 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private onUserInfoEvent(event: UserInfoEvent): void { - if(!event || !event.connection) return; + if (!event || !event.connection) return; this.resetUserInfo(); const userInfo = event.getParser().userInfo; - if(!userInfo) return; + if (!userInfo) return; this._userId = userInfo.userId; this._name = userInfo.username; @@ -285,7 +285,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private onUserPermissionsEvent(event: UserPermissionsEvent): void { - if(!event || !event.connection) return; + if (!event || !event.connection) return; this._clubLevel = event.getParser().clubLevel; this._securityLevel = event.getParser().securityLevel; @@ -294,11 +294,11 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private onAvailabilityStatusMessageEvent(event: AvailabilityStatusMessageEvent): void { - if(!event || !event.connection) return; + if (!event || !event.connection) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this._systemOpen = parser.isOpen; this._systemShutdown = parser.onShutdown; @@ -307,13 +307,13 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private onChangeNameUpdateEvent(event: ChangeUserNameResultMessageEvent): void { - if(!event || !event.connection) return; + if (!event || !event.connection) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; - if(parser.resultCode !== ChangeUserNameResultMessageEvent.NAME_OK) return; + if (parser.resultCode !== ChangeUserNameResultMessageEvent.NAME_OK) return; this._canChangeName = false; @@ -322,13 +322,13 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private onUserNameChangeMessageEvent(event: UserNameChangeMessageEvent): void { - if(!event || !event.connection) return; + if (!event || !event.connection) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; - if(parser.webId !== this.userId) return; + if (parser.webId !== this.userId) return; this._name = parser.newName; this._canChangeName = false; @@ -338,11 +338,11 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private onRoomModelNameEvent(event: RoomReadyMessageEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; HabboWebTools.roomVisited(parser.roomId); } @@ -353,13 +353,13 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana this._furnitureReady = true; - if(!this._furnitureListenersNotified) + if (!this._furnitureListenersNotified) { this._furnitureListenersNotified = true; - if(this._pendingFurnitureListeners && this._pendingFurnitureListeners.length) + if (this._pendingFurnitureListeners && this._pendingFurnitureListeners.length) { - for(const listener of this._pendingFurnitureListeners) listener && listener.loadFurnitureData(); + for (const listener of this._pendingFurnitureListeners) listener && listener.loadFurnitureData(); } } @@ -372,29 +372,29 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana this._productsReady = true; - for(const listener of this._pendingProductListeners) listener && listener.loadProductData(); + for (const listener of this._pendingProductListeners) listener && listener.loadProductData(); this._pendingProductListeners = []; } private onInClientLinkEvent(event: InClientLinkEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; Nitro.instance.createLinkEvent(parser.link); } private onMysteryBoxKeysEvent(event: MysteryBoxKeysEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this.events.dispatchEvent(new MysteryBoxKeysUpdateEvent(parser.boxColor, parser.keyColor)); } @@ -403,7 +403,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana { this._noobnessLevel = event.getParser().noobnessLevel; - if(this._noobnessLevel !== NoobnessLevelEnum.OLD_IDENTITY) + if (this._noobnessLevel !== NoobnessLevelEnum.OLD_IDENTITY) { Nitro.instance.core.configuration.setValue('new.identity', 1); } @@ -419,7 +419,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private destroyFurnitureData(): void { - if(!this._furnitureData) return; + if (!this._furnitureData) return; this._furnitureData.dispose(); @@ -428,7 +428,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private destroyProductData(): void { - if(!this._productData) return; + if (!this._productData) return; this._productData.dispose(); @@ -439,18 +439,18 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana { const existing = this._floorItems.get(id); - if(!existing) return null; + if (!existing) return null; return existing; } public getFloorItemDataByName(name: string): IFurnitureData { - if(!name || !this._floorItems || !this._floorItems.size) return null; + if (!name || !this._floorItems || !this._floorItems.size) return null; - for(const item of this._floorItems.values()) + for (const item of this._floorItems.values()) { - if(!item || (item.className !== name)) continue; + if (!item || (item.className !== name)) continue; return item; } @@ -460,18 +460,18 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana { const existing = this._wallItems.get(id); - if(!existing) return null; + if (!existing) return null; return existing; } public getWallItemDataByName(name: string): IFurnitureData { - if(!name || !this._wallItems || !this._wallItems.size) return null; + if (!name || !this._wallItems || !this._wallItems.size) return null; - for(const item of this._wallItems.values()) + for (const item of this._wallItems.values()) { - if(!item || (item.className !== name)) continue; + if (!item || (item.className !== name)) continue; return item; } @@ -479,7 +479,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana public getProductData(type: string): IProductData { - if(!this._productsReady) this.loadProductData(); + if (!this._productsReady) this.loadProductData(); return this._products.get(type); } @@ -521,7 +521,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana public giveRespect(userId: number): void { - if((userId < 0) || (this._respectsLeft <= 0)) return; + if ((userId < 0) || (this._respectsLeft <= 0)) return; this.send(new UserRespectComposer(userId)); @@ -530,7 +530,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana public givePetRespect(petId: number): void { - if((petId < 0) || (this._respectsPetLeft <= 0)) return; + if ((petId < 0) || (this._respectsPetLeft <= 0)) return; this.send(new PetRespectComposer(petId)); diff --git a/src/nitro/session/UserDataManager.ts b/src/nitro/session/UserDataManager.ts index f06f6a8b..a2dbb764 100644 --- a/src/nitro/session/UserDataManager.ts +++ b/src/nitro/session/UserDataManager.ts @@ -1,5 +1,5 @@ -import { Disposable } from '../../core/common/disposable/Disposable'; -import { IConnection } from '../../core/communication/connections/IConnection'; +import { IConnection } from '../../api'; +import { Disposable } from '../../core/common/Disposable'; import { RequestPetInfoComposer } from '../communication/messages/outgoing/pet/RequestPetInfoComposer'; import { UserCurrentBadgesComposer } from '../communication/messages/outgoing/user/data/UserCurrentBadgesComposer'; import { RoomUserData } from './RoomUserData'; @@ -62,11 +62,11 @@ export class UserDataManager extends Disposable { const existing = this._userDataByType.get(type); - if(!existing) return null; + if (!existing) return null; const userData = existing.get(webID); - if(!userData) return null; + if (!userData) return null; return userData; } @@ -75,16 +75,16 @@ export class UserDataManager extends Disposable { const existing = this._userDataByRoomIndex.get(roomIndex); - if(!existing) return null; + if (!existing) return null; return existing; } public getUserDataByName(name: string): RoomUserData { - for(const userData of this._userDataByRoomIndex.values()) + for (const userData of this._userDataByRoomIndex.values()) { - if(!userData || (userData.name !== name)) continue; + if (!userData || (userData.name !== name)) continue; return userData; } @@ -94,13 +94,13 @@ export class UserDataManager extends Disposable public updateUserData(data: RoomUserData): void { - if(!data) return; + if (!data) return; this.removeUserData(data.roomIndex); let existingType = this._userDataByType.get(data.type); - if(!existingType) + if (!existingType) { existingType = new Map(); @@ -116,25 +116,25 @@ export class UserDataManager extends Disposable { const existing = this.getUserDataByIndex(roomIndex); - if(!existing) return; + if (!existing) return; this._userDataByRoomIndex.delete(roomIndex); const existingType = this._userDataByType.get(existing.type); - if(existingType) existingType.delete(existing.webID); + if (existingType) existingType.delete(existing.webID); } public getUserBadges(userId: number): string[] { - if(this._connection) + if (this._connection) { this._connection.send(new UserCurrentBadgesComposer(userId)); } const badges = this._userBadges.get(userId); - if(!badges) return []; + if (!badges) return []; return badges; } @@ -148,7 +148,7 @@ export class UserDataManager extends Disposable { const userData = this.getUserDataByIndex(roomIndex); - if(!userData) return; + if (!userData) return; userData.figure = figure; userData.sex = sex; @@ -160,7 +160,7 @@ export class UserDataManager extends Disposable { const userData = this.getUserDataByIndex(roomIndex); - if(!userData) return; + if (!userData) return; userData.name = name; } @@ -169,7 +169,7 @@ export class UserDataManager extends Disposable { const userData = this.getUserDataByIndex(roomIndex); - if(!userData) return; + if (!userData) return; userData.custom = custom; } @@ -178,7 +178,7 @@ export class UserDataManager extends Disposable { const userData = this.getUserDataByIndex(roomIndex); - if(!userData) return; + if (!userData) return; userData.activityPoints = score; } @@ -187,14 +187,14 @@ export class UserDataManager extends Disposable { const userData = this.getUserDataByIndex(roomIndex); - if(userData) userData.petLevel = level; + if (userData) userData.petLevel = level; } public updatePetBreedingStatus(roomIndex: number, canBreed: boolean, canHarvest: boolean, canRevive: boolean, hasBreedingPermission: boolean): void { const userData = this.getUserDataByIndex(roomIndex); - if(!userData) return; + if (!userData) return; userData.canBreed = canBreed; userData.canHarvest = canHarvest; @@ -204,11 +204,11 @@ export class UserDataManager extends Disposable public requestPetInfo(id: number): void { - if(!this._connection) return; + if (!this._connection) return; const petData = this.getPetData(id); - if(!petData) return; + if (!petData) return; this._connection.send(new RequestPetInfoComposer(id)); } diff --git a/src/nitro/session/badge/BadgeImageManager.ts b/src/nitro/session/badge/BadgeImageManager.ts index 7f142e29..1d8f0da7 100644 --- a/src/nitro/session/badge/BadgeImageManager.ts +++ b/src/nitro/session/badge/BadgeImageManager.ts @@ -1,12 +1,10 @@ import { Resource, Texture } from '@pixi/core'; -import { IAssetManager } from '../../../api'; -import { IMessageEvent } from '../../../core/communication/messages/IMessageEvent'; +import { IAssetManager, IDisposable, IMessageEvent } from '../../../api'; import { NitroContainer, NitroTexture } from '../../../core/utils'; import { NitroSprite } from '../../../core/utils/proxy/NitroSprite'; import { GroupBadgePartsEvent } from '../../communication/messages/incoming/group/GroupBadgePartsEvent'; import { Nitro } from '../../Nitro'; import { BadgeImageReadyEvent } from '../events/BadgeImageReadyEvent'; -import { IDisposable } from './../../../core/common/disposable/IDisposable'; import { TextureUtils } from './../../../room/utils/TextureUtils'; import { SessionDataManager } from './../SessionDataManager'; import { BadgeInfo } from './BadgeInfo'; diff --git a/src/nitro/session/furniture/FurnitureDataLoader.ts b/src/nitro/session/furniture/FurnitureDataLoader.ts index 43441986..41c61908 100644 --- a/src/nitro/session/furniture/FurnitureDataLoader.ts +++ b/src/nitro/session/furniture/FurnitureDataLoader.ts @@ -1,4 +1,4 @@ -import { NitroLogger } from '../../../core/common/logger/NitroLogger'; +import { NitroLogger } from '../../../core/common/NitroLogger'; import { EventDispatcher } from '../../../core/events/EventDispatcher'; import { NitroEvent } from '../../../core/events/NitroEvent'; import { INitroLocalizationManager } from '../../localization/INitroLocalizationManager'; @@ -28,7 +28,7 @@ export class FurnitureDataLoader extends EventDispatcher public loadFurnitureData(url: string): void { - if(!url) return; + if (!url) return; fetch(url) .then(response => response.json()) @@ -38,20 +38,20 @@ export class FurnitureDataLoader extends EventDispatcher private onFurnitureDataLoaded(data: { [index: string]: any }): void { - if(!data) return; + if (!data) return; - if((typeof data.roomitemtypes == 'undefined') || (typeof data.wallitemtypes == 'undefined')) this._nitroLogger.warn('Could not find `roomitemtypes` or `wallitemtypes` in furnidata.'); + if ((typeof data.roomitemtypes == 'undefined') || (typeof data.wallitemtypes == 'undefined')) this._nitroLogger.warn('Could not find `roomitemtypes` or `wallitemtypes` in furnidata.'); - if(data.roomitemtypes) this.parseFloorItems(data.roomitemtypes); + if (data.roomitemtypes) this.parseFloorItems(data.roomitemtypes); - if(data.wallitemtypes) this.parseWallItems(data.wallitemtypes); + if (data.wallitemtypes) this.parseWallItems(data.wallitemtypes); this.dispatchEvent(new NitroEvent(FurnitureDataLoader.FURNITURE_DATA_READY)); } private onFurnitureDataError(error: Error): void { - if(!error) return; + if (!error) return; console.error(error); @@ -60,21 +60,21 @@ export class FurnitureDataLoader extends EventDispatcher private parseFloorItems(data: any): void { - if(!data || !data.furnitype) return; + if (!data || !data.furnitype) return; - for(const furniture of data.furnitype) + for (const furniture of data.furnitype) { - if(!furniture) continue; + if (!furniture) continue; const colors: number[] = []; - if(furniture.partcolors) + if (furniture.partcolors) { - for(const color of furniture.partcolors.color) + for (const color of furniture.partcolors.color) { let colorCode = (color as string); - if(colorCode.charAt(0) === '#') + if (colorCode.charAt(0) === '#') { colorCode = colorCode.replace('#', ''); @@ -102,11 +102,11 @@ export class FurnitureDataLoader extends EventDispatcher private parseWallItems(data: any): void { - if(!data || !data.furnitype) return; + if (!data || !data.furnitype) return; - for(const furniture of data.furnitype) + for (const furniture of data.furnitype) { - if(!furniture) continue; + if (!furniture) continue; const furnitureData = new FurnitureData(FurnitureType.WALL, furniture.id, furniture.classname, furniture.classname, furniture.category, furniture.name, furniture.description, furniture.revision, 0, 0, 0, null, false, 0, furniture.adurl, furniture.offerid, furniture.buyout, furniture.rentofferid, furniture.rentbuyout, furniture.bc, null, furniture.specialtype, false, false, false, furniture.excludeddynamic, furniture.furniline, furniture.environment, furniture.rare); @@ -118,9 +118,9 @@ export class FurnitureDataLoader extends EventDispatcher private updateLocalizations(furniture: FurnitureData): void { - if(!this._localization) return; + if (!this._localization) return; - switch(furniture.type) + switch (furniture.type) { case FurnitureType.FLOOR: this._localization.setValue(('roomItem.name.' + furniture.id), furniture.name); diff --git a/src/nitro/session/handler/BaseHandler.ts b/src/nitro/session/handler/BaseHandler.ts index 23d7d660..4121c51b 100644 --- a/src/nitro/session/handler/BaseHandler.ts +++ b/src/nitro/session/handler/BaseHandler.ts @@ -1,5 +1,5 @@ -import { Disposable } from '../../../core/common/disposable/Disposable'; -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; +import { Disposable } from '../../../core/common/Disposable'; import { IRoomHandlerListener } from '../IRoomHandlerListener'; export class BaseHandler extends Disposable @@ -42,4 +42,4 @@ export class BaseHandler extends Disposable { return this._roomId; } -} \ No newline at end of file +} diff --git a/src/nitro/session/handler/GenericErrorHandler.ts b/src/nitro/session/handler/GenericErrorHandler.ts index 004e4cfd..b091062a 100644 --- a/src/nitro/session/handler/GenericErrorHandler.ts +++ b/src/nitro/session/handler/GenericErrorHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { GenericErrorEvent } from '../../communication/messages/incoming/generic/GenericErrorEvent'; import { GenericErrorEnum } from '../enum/GenericErrorEnum'; import { RoomSessionErrorMessageEvent } from '../events/RoomSessionErrorMessageEvent'; @@ -16,19 +16,19 @@ export class GenericErrorHandler extends BaseHandler private onRoomGenericError(event: GenericErrorEvent): void { - if(!(event instanceof GenericErrorEvent)) return; + if (!(event instanceof GenericErrorEvent)) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const roomSession = this.listener.getSession(this.roomId); - if(!roomSession) return; + if (!roomSession) return; let type: string = null; - switch(parser.errorCode) + switch (parser.errorCode) { case GenericErrorEnum.KICKED_OUT_OF_ROOM: type = RoomSessionErrorMessageEvent.RSEME_KICKED; @@ -37,7 +37,7 @@ export class GenericErrorHandler extends BaseHandler return; } - if(!type || type.length == 0) return; + if (!type || type.length == 0) return; this.listener.events.dispatchEvent(new RoomSessionErrorMessageEvent(type, roomSession)); } diff --git a/src/nitro/session/handler/PollHandler.ts b/src/nitro/session/handler/PollHandler.ts index bc83b052..6f034fe1 100644 --- a/src/nitro/session/handler/PollHandler.ts +++ b/src/nitro/session/handler/PollHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { PollContentsEvent } from '../../communication/messages/incoming/poll/PollContentsEvent'; import { PollErrorEvent } from '../../communication/messages/incoming/poll/PollErrorEvent'; import { PollOfferEvent } from '../../communication/messages/incoming/poll/PollOfferEvent'; @@ -19,15 +19,15 @@ export class PollHandler extends BaseHandler private onPollContentsEvent(event: PollContentsEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const pollEvent = new RoomSessionPollEvent(RoomSessionPollEvent.CONTENT, session, parser.id); @@ -42,15 +42,15 @@ export class PollHandler extends BaseHandler private onPollOfferEvent(event: PollOfferEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const pollEvent = new RoomSessionPollEvent(RoomSessionPollEvent.OFFER, session, parser.id); @@ -62,15 +62,15 @@ export class PollHandler extends BaseHandler private onPollErrorEvent(event: PollErrorEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const pollEvent = new RoomSessionPollEvent(RoomSessionPollEvent.ERROR, session, -1); pollEvent.headline = '???'; diff --git a/src/nitro/session/handler/RoomChatHandler.ts b/src/nitro/session/handler/RoomChatHandler.ts index 596251f8..61058381 100644 --- a/src/nitro/session/handler/RoomChatHandler.ts +++ b/src/nitro/session/handler/RoomChatHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { FloodControlEvent } from '../../communication/messages/incoming/room/unit/chat/FloodControlEvent'; import { RemainingMuteEvent } from '../../communication/messages/incoming/room/unit/chat/RemainingMuteEvent'; import { RoomUnitChatEvent } from '../../communication/messages/incoming/room/unit/chat/RoomUnitChatEvent'; @@ -33,20 +33,20 @@ export class RoomChatHandler extends BaseHandler private onRoomUnitChatEvent(event: RoomUnitChatEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; let chatType: number = RoomSessionChatEvent.CHAT_TYPE_SPEAK; - if(event instanceof RoomUnitChatShoutEvent) chatType = RoomSessionChatEvent.CHAT_TYPE_SHOUT; - else if(event instanceof RoomUnitChatWhisperEvent) chatType = RoomSessionChatEvent.CHAT_TYPE_WHISPER; + if (event instanceof RoomUnitChatShoutEvent) chatType = RoomSessionChatEvent.CHAT_TYPE_SHOUT; + else if (event instanceof RoomUnitChatWhisperEvent) chatType = RoomSessionChatEvent.CHAT_TYPE_WHISPER; const chatEvent = new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, parser.roomIndex, parser.message, chatType, parser.bubble); @@ -55,86 +55,86 @@ export class RoomChatHandler extends BaseHandler private onRoomUnitHandItemReceivedEvent(event: RoomUnitHandItemReceivedEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, parser.giverUserId, '', RoomSessionChatEvent.CHAT_TYPE_HAND_ITEM_RECEIVED, SystemChatStyleEnum.GENERIC, null, parser.handItemType)); } private onRespectReceivedEvent(event: RespectReceivedEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const userData = session.userDataManager.getUserData(parser.userId); - if(!userData) return; + if (!userData) return; this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, userData.roomIndex, '', RoomSessionChatEvent.CHAT_TYPE_RESPECT, SystemChatStyleEnum.GENERIC)); } private onPetRespectNoficationEvent(event: PetRespectNoficationEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const petData = session.userDataManager.getPetData(parser.petData.id); - if(!petData) return; + if (!petData) return; let chatType = RoomSessionChatEvent.CHAT_TYPE_PETRESPECT; - if(parser.isTreat) chatType = RoomSessionChatEvent.CHAT_TYPE_PETTREAT; + if (parser.isTreat) chatType = RoomSessionChatEvent.CHAT_TYPE_PETTREAT; this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, petData.roomIndex, '', chatType, SystemChatStyleEnum.GENERIC)); } private onPetSupplementedNotificationEvent(event: PetSupplementedNotificationEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const petData = session.userDataManager.getPetData(parser.petId); - if(!petData) return; + if (!petData) return; let userRoomIndex = -1; const userData = session.userDataManager.getUserData(parser.userId); - if(userData) userRoomIndex = userData.roomIndex; + if (userData) userRoomIndex = userData.roomIndex; let chatType = RoomSessionChatEvent.CHAT_TYPE_PETREVIVE; - switch(parser.supplementType) + switch (parser.supplementType) { case PetSupplementTypeEnum.REVIVE: chatType = RoomSessionChatEvent.CHAT_TYPE_PETREVIVE; @@ -152,15 +152,15 @@ export class RoomChatHandler extends BaseHandler private onFloodControlEvent(event: FloodControlEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const seconds = parser.seconds; @@ -169,15 +169,15 @@ export class RoomChatHandler extends BaseHandler private onRemainingMuteEvent(event: RemainingMuteEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, session.ownRoomIndex, '', RoomSessionChatEvent.CHAT_TYPE_MUTE_REMAINING, SystemChatStyleEnum.GENERIC, null, parser.seconds)); } diff --git a/src/nitro/session/handler/RoomDataHandler.ts b/src/nitro/session/handler/RoomDataHandler.ts index 23941da1..f73f0004 100644 --- a/src/nitro/session/handler/RoomDataHandler.ts +++ b/src/nitro/session/handler/RoomDataHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { GetGuestRoomResultEvent } from '../../communication/messages/incoming/navigator/GetGuestRoomResultEvent'; import { RoomSessionEvent } from '../events/RoomSessionEvent'; import { RoomSessionPropertyUpdateEvent } from '../events/RoomSessionPropertyUpdateEvent'; @@ -16,17 +16,17 @@ export class RoomDataHandler extends BaseHandler private onGetGuestRoomResultEvent(event: GetGuestRoomResultEvent): void { - if(!(event instanceof GetGuestRoomResultEvent)) return; + if (!(event instanceof GetGuestRoomResultEvent)) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; - if(parser.roomForward) return; + if (parser.roomForward) return; const roomSession = this.listener.getSession(this.roomId); - if(!roomSession) return; + if (!roomSession) return; const roomData = parser.data; diff --git a/src/nitro/session/handler/RoomDimmerPresetsHandler.ts b/src/nitro/session/handler/RoomDimmerPresetsHandler.ts index a89e6896..0a6a80da 100644 --- a/src/nitro/session/handler/RoomDimmerPresetsHandler.ts +++ b/src/nitro/session/handler/RoomDimmerPresetsHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { RoomDimmerPresetsEvent } from '../../communication/messages/incoming/room/furniture/RoomDimmerPresetsMessageEvent'; import { RoomSessionDimmerPresetsEvent } from '../events/RoomSessionDimmerPresetsEvent'; import { IRoomHandlerListener } from '../IRoomHandlerListener'; @@ -15,15 +15,15 @@ export class RoomDimmerPresetsHandler extends BaseHandler private onRoomDimmerPresets(event: RoomDimmerPresetsEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const presetEvent = new RoomSessionDimmerPresetsEvent(RoomSessionDimmerPresetsEvent.ROOM_DIMMER_PRESETS, session); @@ -31,11 +31,11 @@ export class RoomDimmerPresetsHandler extends BaseHandler let i = 0; - while(i < parser.presetCount) + while (i < parser.presetCount) { const preset = parser.getPreset(i); - if(preset) presetEvent.storePreset(preset.id, preset.type, preset.color, preset.brightness); + if (preset) presetEvent.storePreset(preset.id, preset.type, preset.color, preset.brightness); i++; } diff --git a/src/nitro/session/handler/RoomPermissionsHandler.ts b/src/nitro/session/handler/RoomPermissionsHandler.ts index 1767da09..675a9c4f 100644 --- a/src/nitro/session/handler/RoomPermissionsHandler.ts +++ b/src/nitro/session/handler/RoomPermissionsHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { RoomRightsClearEvent } from '../../communication/messages/incoming/room/access/rights/RoomRightsClearEvent'; import { RoomRightsEvent } from '../../communication/messages/incoming/room/access/rights/RoomRightsEvent'; import { RoomRightsOwnerEvent } from '../../communication/messages/incoming/room/access/rights/RoomRightsOwnerEvent'; @@ -19,34 +19,34 @@ export class RoomPermissionsHandler extends BaseHandler private onRoomRightsEvent(event: RoomRightsEvent): void { - if(!(event instanceof RoomRightsEvent)) return; + if (!(event instanceof RoomRightsEvent)) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; session.setControllerLevel(event.getParser().controllerLevel); } private onRoomRightsClearEvent(event: RoomRightsClearEvent): void { - if(!(event instanceof RoomRightsClearEvent)) return; + if (!(event instanceof RoomRightsClearEvent)) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; session.setControllerLevel(RoomControllerLevel.NONE); } private onRoomRightsOwnerEvent(event: RoomRightsOwnerEvent): void { - if(!(event instanceof RoomRightsOwnerEvent)) return; + if (!(event instanceof RoomRightsOwnerEvent)) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; session.setRoomOwner(); } -} \ No newline at end of file +} diff --git a/src/nitro/session/handler/RoomPresentHandler.ts b/src/nitro/session/handler/RoomPresentHandler.ts index f24e68b2..6cde937f 100644 --- a/src/nitro/session/handler/RoomPresentHandler.ts +++ b/src/nitro/session/handler/RoomPresentHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { PresentOpenedMessageEvent } from '../../communication/messages/incoming/inventory/furni/gifts/PresentOpenedMessageEvent'; import { RoomSessionPresentEvent } from '../events/RoomSessionPresentEvent'; import { IRoomHandlerListener } from '../IRoomHandlerListener'; @@ -10,24 +10,24 @@ export class RoomPresentHandler extends BaseHandler { super(connection, listener); - if(!connection) return; + if (!connection) return; connection.addMessageEvent(new PresentOpenedMessageEvent(this.onFurnitureGiftOpenedEvent.bind(this))); } private onFurnitureGiftOpenedEvent(event: PresentOpenedMessageEvent): void { - if(!event) return; + if (!event) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; - if(this.listener && this.listener.events) this.listener.events.dispatchEvent( + if (this.listener && this.listener.events) this.listener.events.dispatchEvent( new RoomSessionPresentEvent(RoomSessionPresentEvent.RSPE_PRESENT_OPENED, session, parser.classId, parser.itemType, parser.productCode, parser.placedItemId, parser.placedItemType, parser.placedInRoom, parser.petFigureString)); diff --git a/src/nitro/session/handler/RoomSessionHandler.ts b/src/nitro/session/handler/RoomSessionHandler.ts index 91e747fc..df99c600 100644 --- a/src/nitro/session/handler/RoomSessionHandler.ts +++ b/src/nitro/session/handler/RoomSessionHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { DesktopViewEvent } from '../../communication/messages/incoming/desktop/DesktopViewEvent'; import { FlatAccessDeniedMessageEvent } from '../../communication/messages/incoming/navigator/FlatAccessDeniedMessageEvent'; import { RoomDoorbellAcceptedEvent } from '../../communication/messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent'; @@ -31,19 +31,19 @@ export class RoomSessionHandler extends BaseHandler private onRoomEnterEvent(event: RoomEnterEvent): void { - if(!(event instanceof RoomEnterEvent)) return; + if (!(event instanceof RoomEnterEvent)) return; - if(this.listener) this.listener.sessionUpdate(this.roomId, RoomSessionHandler.RS_CONNECTED); + if (this.listener) this.listener.sessionUpdate(this.roomId, RoomSessionHandler.RS_CONNECTED); } private onRoomReadyMessageEvent(event: RoomReadyMessageEvent): void { - if(!(event instanceof RoomReadyMessageEvent)) return; + if (!(event instanceof RoomReadyMessageEvent)) return; const fromRoomId = this.roomId; const toRoomId = event.getParser().roomId; - if(this.listener) + if (this.listener) { this.listener.sessionReinitialize(fromRoomId, toRoomId); this.listener.sessionUpdate(this.roomId, RoomSessionHandler.RS_READY); @@ -52,32 +52,32 @@ export class RoomSessionHandler extends BaseHandler private onDesktopViewEvent(event: DesktopViewEvent): void { - if(!(event instanceof DesktopViewEvent)) return; + if (!(event instanceof DesktopViewEvent)) return; - if(this.listener) this.listener.sessionUpdate(this.roomId, RoomSessionHandler.RS_DISCONNECTED); + if (this.listener) this.listener.sessionUpdate(this.roomId, RoomSessionHandler.RS_DISCONNECTED); } private onRoomDoorbellAcceptedEvent(event: RoomDoorbellAcceptedEvent): void { - if(!(event instanceof RoomDoorbellAcceptedEvent) || !this.listener) return; + if (!(event instanceof RoomDoorbellAcceptedEvent) || !this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const username = parser.userName; - if(!username || !username.length) + if (!username || !username.length) { this.connection.send(new GoToFlatMessageComposer(this.roomId)); } else { - if(this.listener.events) + if (this.listener.events) { const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; this.listener.events.dispatchEvent(new RoomSessionDoorbellEvent(RoomSessionDoorbellEvent.RSDE_ACCEPTED, session, username)); } @@ -86,25 +86,25 @@ export class RoomSessionHandler extends BaseHandler private onRoomDoorbellRejectedEvent(event: FlatAccessDeniedMessageEvent): void { - if(!(event instanceof FlatAccessDeniedMessageEvent) || !this.listener) return; + if (!(event instanceof FlatAccessDeniedMessageEvent) || !this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const username = parser.userName; - if(!username || !username.length) + if (!username || !username.length) { this.listener.sessionUpdate(this.roomId, RoomSessionHandler.RS_DISCONNECTED); } else { - if(this.listener.events) + if (this.listener.events) { const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; this.listener.events.dispatchEvent(new RoomSessionDoorbellEvent(RoomSessionDoorbellEvent.RSDE_REJECTED, session, username)); } @@ -113,11 +113,11 @@ export class RoomSessionHandler extends BaseHandler private onYouAreSpectatorMessageEvent(event: YouAreSpectatorMessageEvent): void { - if(this.listener) + if (this.listener) { const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; session.isSpectator = true; this.listener.events.dispatchEvent(new RoomSessionSpectatorModeEvent(RoomSessionSpectatorModeEvent.SPECTATOR_MODE, session)); diff --git a/src/nitro/session/handler/RoomUsersHandler.ts b/src/nitro/session/handler/RoomUsersHandler.ts index db1a6647..a4dd99c4 100644 --- a/src/nitro/session/handler/RoomUsersHandler.ts +++ b/src/nitro/session/handler/RoomUsersHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { PetFigureUpdateEvent } from '../../communication'; import { NewFriendRequestEvent } from '../../communication/messages/incoming/friendlist/NewFriendRequestEvent'; import { DoorbellMessageEvent } from '../../communication/messages/incoming/navigator/DoorbellMessageEvent'; @@ -51,21 +51,21 @@ export class RoomUsersHandler extends BaseHandler private onRoomUnitEvent(event: RoomUnitEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const users = event.getParser().users; const usersToAdd: RoomUserData[] = []; - if(users && users.length) + if (users && users.length) { - for(const user of users) + for (const user of users) { - if(!user) continue; + if (!user) continue; const userData = new RoomUserData(user.roomIndex); @@ -92,7 +92,7 @@ export class RoomUsersHandler extends BaseHandler userData.botSkills = user.botSkills; userData.isModerator = user.isModerator; - if(!session.userDataManager.getUserData(user.roomIndex)) usersToAdd.push(userData); + if (!session.userDataManager.getUserData(user.roomIndex)) usersToAdd.push(userData); session.userDataManager.updateUserData(userData); } @@ -103,15 +103,15 @@ export class RoomUsersHandler extends BaseHandler private onRoomUnitInfoEvent(event: RoomUnitInfoEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; session.userDataManager.updateFigure(parser.unitId, parser.figure, parser.gender, false, false); session.userDataManager.updateMotto(parser.unitId, parser.motto); @@ -123,41 +123,41 @@ export class RoomUsersHandler extends BaseHandler private onRoomUnitRemoveEvent(event: RoomUnitRemoveEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; session.userDataManager.removeUserData(event.getParser().unitId); } private onRoomUnitDanceEvent(event: RoomUnitDanceEvent): void { - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; this.listener.events.dispatchEvent(new RoomSessionDanceEvent(session, parser.unitId, parser.danceId)); } private onUserCurrentBadgesEvent(event: UserCurrentBadgesEvent): void { - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; session.userDataManager.setUserBadges(parser.userId, parser.badges); @@ -166,49 +166,49 @@ export class RoomUsersHandler extends BaseHandler private onRoomDoorbellEvent(event: DoorbellMessageEvent): void { - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const username = parser.userName; - if(!username || !username.length) return; + if (!username || !username.length) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; this.listener.events.dispatchEvent(new RoomSessionDoorbellEvent(RoomSessionDoorbellEvent.DOORBELL, session, username)); } private onUserNameChangeMessageEvent(event: UserNameChangeMessageEvent): void { - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; session.userDataManager.updateName(parser.id, parser.newName); } private onNewFriendRequestEvent(event: NewFriendRequestEvent): void { - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const request = parser.request; @@ -217,15 +217,15 @@ export class RoomUsersHandler extends BaseHandler private onPetInfoEvent(event: PetInfoEvent): void { - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const petData = new RoomPetData(); @@ -261,15 +261,15 @@ export class RoomUsersHandler extends BaseHandler private onPetStatusUpdateEvent(event: PetStatusUpdateEvent): void { - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; session.userDataManager.updatePetBreedingStatus(parser.roomIndex, parser.canBreed, parser.canHarvest, parser.canRevive, parser.hasBreedingPermission); @@ -278,15 +278,15 @@ export class RoomUsersHandler extends BaseHandler private onPetFigureUpdateEvent(event: PetFigureUpdateEvent): void { - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const figure = parser.figureData.figuredata; @@ -297,21 +297,21 @@ export class RoomUsersHandler extends BaseHandler private onPetPlacingError(event: PetPlacingErrorEvent): void { - if(!event) return; + if (!event) return; - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; let type: string = null; - switch(parser.errorCode) + switch (parser.errorCode) { case 0: type = RoomSessionErrorMessageEvent.RSEME_PETS_FORBIDDEN_IN_HOTEL; @@ -333,28 +333,28 @@ export class RoomUsersHandler extends BaseHandler break; } - if(!type || type.length == 0) return; + if (!type || type.length == 0) return; this.listener.events.dispatchEvent(new RoomSessionErrorMessageEvent(type, session)); } private onBotError(event: BotErrorEvent): void { - if(!event) return; + if (!event) return; - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; let type: string = null; - switch(parser.errorCode) + switch (parser.errorCode) { case 0: type = RoomSessionErrorMessageEvent.RSEME_BOTS_FORBIDDEN_IN_HOTEL; @@ -373,23 +373,23 @@ export class RoomUsersHandler extends BaseHandler break; } - if(!type || type.length == 0) return; + if (!type || type.length == 0) return; this.listener.events.dispatchEvent(new RoomSessionErrorMessageEvent(type, session)); } private onFavoriteMembershipUpdateMessageEvent(event: FavoriteMembershipUpdateMessageEvent): void { - if(!this.listener) return; + if (!this.listener) return; const parser = event.getParser(); const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const userData = session.userDataManager.getUserDataByIndex(parser.roomIndex); - if(!userData) return; + if (!userData) return; userData.groupId = parser.groupId; userData.groupName = parser.groupName; diff --git a/src/nitro/session/handler/WordQuizHandler.ts b/src/nitro/session/handler/WordQuizHandler.ts index 57a1544e..6e91bb59 100644 --- a/src/nitro/session/handler/WordQuizHandler.ts +++ b/src/nitro/session/handler/WordQuizHandler.ts @@ -1,4 +1,4 @@ -import { IConnection } from '../../../core/communication/connections/IConnection'; +import { IConnection } from '../../../api'; import { QuestionAnsweredEvent } from '../../communication/messages/incoming/poll/QuestionAnsweredEvent'; import { QuestionEvent } from '../../communication/messages/incoming/poll/QuestionEvent'; import { QuestionFinishedEvent } from '../../communication/messages/incoming/poll/QuestionFinishedEvent'; @@ -19,15 +19,15 @@ export class WordQuizHandler extends BaseHandler private onQuestionEvent(event: QuestionEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const quizEvent = new RoomSessionWordQuizEvent(RoomSessionWordQuizEvent.QUESTION, session, parser.pollId); @@ -42,15 +42,15 @@ export class WordQuizHandler extends BaseHandler private onQuestionAnsweredEvent(event: QuestionAnsweredEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const quizEvent = new RoomSessionWordQuizEvent(RoomSessionWordQuizEvent.ANSWERED, session, parser.userId); @@ -63,15 +63,15 @@ export class WordQuizHandler extends BaseHandler private onQuestionFinishedEvent(event: QuestionFinishedEvent): void { - if(!this.listener) return; + if (!this.listener) return; const session = this.listener.getSession(this.roomId); - if(!session) return; + if (!session) return; const parser = event.getParser(); - if(!parser) return; + if (!parser) return; const quizEvent = new RoomSessionWordQuizEvent(RoomSessionWordQuizEvent.FINISHED, session); quizEvent.questionId = parser.questionId; diff --git a/src/nitro/session/product/IProductDataListener.ts b/src/nitro/session/product/IProductDataListener.ts index 81aa76f9..463b1e54 100644 --- a/src/nitro/session/product/IProductDataListener.ts +++ b/src/nitro/session/product/IProductDataListener.ts @@ -1,4 +1,4 @@ -import { IDisposable } from '../../../core/common/disposable/IDisposable'; +import { IDisposable } from '../../../api'; export interface IProductDataListener extends IDisposable { diff --git a/src/nitro/sound/ISoundManager.ts b/src/nitro/sound/ISoundManager.ts index 10974468..7b7031e0 100644 --- a/src/nitro/sound/ISoundManager.ts +++ b/src/nitro/sound/ISoundManager.ts @@ -1,4 +1,4 @@ -import { INitroManager } from '../../core/common/INitroManager'; +import { INitroManager } from '../../api'; import { IMusicManager } from './music/IMusicManager'; export interface ISoundManager extends INitroManager diff --git a/src/nitro/sound/music/IMusicManager.ts b/src/nitro/sound/music/IMusicManager.ts index 45dd629e..f23ad0b2 100644 --- a/src/nitro/sound/music/IMusicManager.ts +++ b/src/nitro/sound/music/IMusicManager.ts @@ -1,4 +1,4 @@ -import { INitroManager } from '../../../core/common/INitroManager'; +import { INitroManager } from '../../../api'; export interface IMusicManager extends INitroManager diff --git a/src/nitro/utils/HabboWebTools.ts b/src/nitro/utils/HabboWebTools.ts index 945c1f5a..8ff84bbe 100644 --- a/src/nitro/utils/HabboWebTools.ts +++ b/src/nitro/utils/HabboWebTools.ts @@ -1,4 +1,4 @@ -import { NitroLogger } from '../../core/common/logger/NitroLogger'; +import { NitroLogger } from '../../core/common/NitroLogger'; import { LegacyExternalInterface } from '../externalInterface/LegacyExternalInterface'; export class HabboWebTools @@ -11,7 +11,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('logEventLog', data); } @@ -27,7 +27,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('openPage', pageUrl); } @@ -52,7 +52,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('heartBeat'); } @@ -68,7 +68,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { HabboWebTools.openPage(pageUrl); } @@ -84,7 +84,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('closeWebPageAndRestoreClient'); } @@ -96,11 +96,11 @@ export class HabboWebTools } } - public static openHabblet(name: string, param: string=null): void + public static openHabblet(name: string, param: string = null): void { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('openHabblet', name, param); } @@ -112,11 +112,11 @@ export class HabboWebTools } } - public static closeHabblet(name: string, param: string=null): void + public static closeHabblet(name: string, param: string = null): void { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('closeHabblet', name, param); } @@ -132,7 +132,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('disconnect', reasonCode, reasonString); } @@ -148,7 +148,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.callGame('showGame', gameUrl); } @@ -164,7 +164,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.callGame('hideGame'); } @@ -180,7 +180,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('openExternalLink', escape(url)); } @@ -200,7 +200,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('roomVisited', roomId); } @@ -220,7 +220,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('openMinimail', target); } @@ -240,7 +240,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('openNews'); } @@ -260,7 +260,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('closeNews'); } @@ -280,7 +280,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('openAvatars'); } @@ -300,7 +300,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('openRoomEnterAd'); } @@ -320,7 +320,7 @@ export class HabboWebTools { try { - if(LegacyExternalInterface.available) + if (LegacyExternalInterface.available) { LegacyExternalInterface.call('updateFigure', figure); } diff --git a/src/room/IRoomInstance.ts b/src/room/IRoomInstance.ts index d22f420f..4a77e8d7 100644 --- a/src/room/IRoomInstance.ts +++ b/src/room/IRoomInstance.ts @@ -1,4 +1,4 @@ -import { IDisposable } from '../core/common/disposable/IDisposable'; +import { IDisposable } from '../api'; import { IRoomInstanceContainer } from './IRoomInstanceContainer'; import { IRoomObjectManager } from './IRoomObjectManager'; import { IRoomObject } from './object/IRoomObject'; @@ -25,4 +25,4 @@ export interface IRoomInstance extends IDisposable renderer: IRoomRendererBase; managers: Map; model: IRoomObjectModel; -} \ No newline at end of file +} diff --git a/src/room/IRoomManager.ts b/src/room/IRoomManager.ts index a3e06e56..5e9f6e47 100644 --- a/src/room/IRoomManager.ts +++ b/src/room/IRoomManager.ts @@ -1,5 +1,4 @@ -import { INitroManager } from '../core/common/INitroManager'; -import { IEventDispatcher } from '../core/events/IEventDispatcher'; +import { IEventDispatcher, INitroManager } from '../api'; import { RoomContentLoader } from '../nitro/room/RoomContentLoader'; import { IRoomInstance } from './IRoomInstance'; import { IRoomObject } from './object/IRoomObject'; @@ -16,4 +15,4 @@ export interface IRoomManager extends INitroManager update(time: number, update?: boolean): void; rooms: Map; events: IEventDispatcher; -} \ No newline at end of file +} diff --git a/src/room/RoomInstance.ts b/src/room/RoomInstance.ts index dbab9f1d..bcf39de3 100644 --- a/src/room/RoomInstance.ts +++ b/src/room/RoomInstance.ts @@ -1,4 +1,4 @@ -import { Disposable } from '../core/common/disposable/Disposable'; +import { Disposable } from '../core/common/Disposable'; import { IRoomInstance } from './IRoomInstance'; import { IRoomInstanceContainer } from './IRoomInstanceContainer'; import { IRoomObjectManager } from './IRoomObjectManager'; @@ -42,29 +42,29 @@ export class RoomInstance extends Disposable implements IRoomInstance public setRenderer(renderer: IRoomRendererBase): void { - if(renderer === this._renderer) return; + if (renderer === this._renderer) return; - if(this._renderer) this.destroyRenderer(); + if (this._renderer) this.destroyRenderer(); this._renderer = renderer; - if(!this._renderer) return; + if (!this._renderer) return; this._renderer.reset(); - if(this._managers.size) + if (this._managers.size) { - for(const manager of this._managers.values()) + for (const manager of this._managers.values()) { - if(!manager) continue; + if (!manager) continue; const objects = manager.objects; - if(!objects.length) continue; + if (!objects.length) continue; - for(const object of objects.getValues()) + for (const object of objects.getValues()) { - if(!object) continue; + if (!object) continue; this._renderer.addObject(object); } @@ -74,7 +74,7 @@ export class RoomInstance extends Disposable implements IRoomInstance private destroyRenderer(): void { - if(!this._renderer) return; + if (!this._renderer) return; this._renderer.dispose(); @@ -85,7 +85,7 @@ export class RoomInstance extends Disposable implements IRoomInstance { const manager = this._managers.get(category); - if(!manager) return null; + if (!manager) return null; return manager; } @@ -94,11 +94,11 @@ export class RoomInstance extends Disposable implements IRoomInstance { let manager = this.getManager(category); - if(manager) return manager; + if (manager) return manager; manager = this._container.createRoomObjectManager(category); - if(!manager) return null; + if (!manager) return null; this._managers.set(category, manager); @@ -109,7 +109,7 @@ export class RoomInstance extends Disposable implements IRoomInstance { const manager = this.getManager(category); - if(!manager) return 0; + if (!manager) return 0; return manager.totalObjects; } @@ -118,11 +118,11 @@ export class RoomInstance extends Disposable implements IRoomInstance { const manager = this.getManager(category); - if(!manager) return null; + if (!manager) return null; const object = manager.getObject(id); - if(!object) return null; + if (!object) return null; return object; } @@ -138,11 +138,11 @@ export class RoomInstance extends Disposable implements IRoomInstance { const manager = this.getManager(category); - if(!manager) return null; + if (!manager) return null; const object = manager.getObjectByIndex(index); - if(!object) return null; + if (!object) return null; return object; } @@ -151,20 +151,20 @@ export class RoomInstance extends Disposable implements IRoomInstance { const manager = this.getManagerOrCreate(category); - if(!manager) return null; + if (!manager) return null; const object = manager.createObject(id, stateCount, type); - if(!object) return null; + if (!object) return null; - if(this._renderer) this._renderer.addObject(object); + if (this._renderer) this._renderer.addObject(object); return object; } public createRoomObjectAndInitalize(objectId: number, type: string, category: number): IRoomObject { - if(!this._container) return null; + if (!this._container) return null; return this._container.createRoomObjectAndInitalize(this._id, objectId, type, category); } @@ -173,34 +173,34 @@ export class RoomInstance extends Disposable implements IRoomInstance { const manager = this.getManager(category); - if(!manager) return; + if (!manager) return; const object = manager.getObject(id); - if(!object) return; + if (!object) return; object.tearDown(); - if(this._renderer) this._renderer.removeObject(object); + if (this._renderer) this._renderer.removeObject(object); manager.removeObject(id); } public removeAllManagers(): void { - for(const manager of this._managers.values()) + for (const manager of this._managers.values()) { - if(!manager) continue; + if (!manager) continue; - if(this._renderer) + if (this._renderer) { const objects = manager.objects; - if(objects.length) + if (objects.length) { - for(const object of objects.getValues()) + for (const object of objects.getValues()) { - if(!object) continue; + if (!object) continue; this._renderer.removeObject(object); } @@ -217,7 +217,7 @@ export class RoomInstance extends Disposable implements IRoomInstance { const index = this._updateCategories.indexOf(category); - if(index >= 0) return; + if (index >= 0) return; this._updateCategories.push(category); } @@ -226,26 +226,26 @@ export class RoomInstance extends Disposable implements IRoomInstance { const index = this._updateCategories.indexOf(category); - if(index === -1) return; + if (index === -1) return; this._updateCategories.splice(index, 1); } public update(time: number, update: boolean = false): void { - for(const category of this._updateCategories) + for (const category of this._updateCategories) { const manager = this.getManager(category); - if(!manager) continue; + if (!manager) continue; const objects = manager.objects; - if(!objects.length) continue; + if (!objects.length) continue; - for(const object of objects.getValues()) + for (const object of objects.getValues()) { - if(!object) continue; + if (!object) continue; const logic = object.logic; @@ -258,15 +258,15 @@ export class RoomInstance extends Disposable implements IRoomInstance public hasUninitializedObjects(): boolean { - for(const manager of this._managers.values()) + for (const manager of this._managers.values()) { - if(!manager) continue; + if (!manager) continue; - for(const object of manager.objects.getValues()) + for (const object of manager.objects.getValues()) { - if(!object) continue; + if (!object) continue; - if(!object.isReady) return true; + if (!object.isReady) return true; } } @@ -297,4 +297,4 @@ export class RoomInstance extends Disposable implements IRoomInstance { return this._model; } -} \ No newline at end of file +} diff --git a/src/room/object/IRoomObject.ts b/src/room/object/IRoomObject.ts index 7f3a3148..42e088f4 100644 --- a/src/room/object/IRoomObject.ts +++ b/src/room/object/IRoomObject.ts @@ -1,4 +1,4 @@ -import { IDisposable } from '../../core/common/disposable/IDisposable'; +import { IDisposable } from '../../api'; import { IVector3D } from '../utils/IVector3D'; import { IRoomObjectModel } from './IRoomObjectModel'; import { IRoomObjectMouseHandler } from './logic/IRoomObjectMouseHandler'; @@ -19,4 +19,4 @@ export interface IRoomObject extends IDisposable direction: IVector3D; updateCounter: number; isReady: boolean; -} \ No newline at end of file +} diff --git a/src/room/object/RoomObject.ts b/src/room/object/RoomObject.ts index bb7d7064..7e79f501 100644 --- a/src/room/object/RoomObject.ts +++ b/src/room/object/RoomObject.ts @@ -1,4 +1,4 @@ -import { Disposable } from '../../core/common/disposable/Disposable'; +import { Disposable } from '../../core/common/Disposable'; import { RoomObjectUpdateMessage } from '../messages/RoomObjectUpdateMessage'; import { IVector3D } from '../utils/IVector3D'; import { Vector3d } from '../utils/Vector3d'; @@ -51,7 +51,7 @@ export class RoomObject extends Disposable implements IRoomObjectController let i = (stateCount - 1); - while(i >= 0) + while (i >= 0) { this._states[i] = 0; @@ -66,7 +66,7 @@ export class RoomObject extends Disposable implements IRoomObjectController this.setVisualization(null); this.setLogic(null); - if(this._model) this._model.dispose(); + if (this._model) this._model.dispose(); super.onDispose(); } @@ -78,9 +78,9 @@ export class RoomObject extends Disposable implements IRoomObjectController public setLocation(vector: IVector3D): void { - if(!vector) return; + if (!vector) return; - if((vector.x === this._location.x) && (vector.y === this._location.y) && (vector.z === this._location.z)) return; + if ((vector.x === this._location.x) && (vector.y === this._location.y) && (vector.z === this._location.z)) return; this._location.x = vector.x; this._location.y = vector.y; @@ -96,9 +96,9 @@ export class RoomObject extends Disposable implements IRoomObjectController public setDirection(vector: IVector3D): void { - if(!vector) return; + if (!vector) return; - if((vector.x === this._direction.x) && (vector.y === this._direction.y) && (vector.z === this._direction.z)) return; + if ((vector.x === this._direction.x) && (vector.y === this._direction.y) && (vector.z === this._direction.z)) return; this._direction.x = (((vector.x % 360) + 360) % 360); this._direction.y = (((vector.y % 360) + 360) % 360); @@ -109,7 +109,7 @@ export class RoomObject extends Disposable implements IRoomObjectController public getState(index: number = 0): number { - if((index >= 0) && (index < this._states.length)) + if ((index >= 0) && (index < this._states.length)) { return this._states[index]; } @@ -119,9 +119,9 @@ export class RoomObject extends Disposable implements IRoomObjectController public setState(state: number, index: number = 0): boolean { - if((index >= 0) && (index < this._states.length)) + if ((index >= 0) && (index < this._states.length)) { - if(this._states[index] !== state) + if (this._states[index] !== state) { this._states[index] = state; @@ -136,22 +136,22 @@ export class RoomObject extends Disposable implements IRoomObjectController public setVisualization(visualization: IRoomObjectVisualization): void { - if(this._visualization === visualization) return; + if (this._visualization === visualization) return; - if(this._visualization) this._visualization.dispose(); + if (this._visualization) this._visualization.dispose(); this._visualization = visualization; - if(this._visualization) this._visualization.object = this; + if (this._visualization) this._visualization.object = this; } public setLogic(logic: IRoomObjectEventHandler): void { - if(this._logic === logic) return; + if (this._logic === logic) return; const eventHandler = this._logic; - if(eventHandler) + if (eventHandler) { this._logic = null; @@ -160,11 +160,11 @@ export class RoomObject extends Disposable implements IRoomObjectController this._logic = logic; - if(this._logic) + if (this._logic) { this._logic.setObject(this); - while(this._pendingLogicMessages.length) + while (this._pendingLogicMessages.length) { const message = this._pendingLogicMessages.shift(); @@ -175,14 +175,14 @@ export class RoomObject extends Disposable implements IRoomObjectController public processUpdateMessage(message: RoomObjectUpdateMessage): void { - if(this._logic) return this._logic.processUpdateMessage(message); + if (this._logic) return this._logic.processUpdateMessage(message); this._pendingLogicMessages.push(message); } public tearDown(): void { - if(this._logic) this._logic.tearDown(); + if (this._logic) this._logic.tearDown(); } public get id(): number @@ -249,4 +249,4 @@ export class RoomObject extends Disposable implements IRoomObjectController { this._isReady = flag; } -} \ No newline at end of file +} diff --git a/src/room/object/logic/IRoomObjectEventHandler.ts b/src/room/object/logic/IRoomObjectEventHandler.ts index e0e87b0c..7feee3cc 100644 --- a/src/room/object/logic/IRoomObjectEventHandler.ts +++ b/src/room/object/logic/IRoomObjectEventHandler.ts @@ -1,5 +1,4 @@ -import { IDisposable } from '../../../core/common/disposable/IDisposable'; -import { IEventDispatcher } from '../../../core/events/IEventDispatcher'; +import { IDisposable, IEventDispatcher } from '../../../api'; import { RoomObjectUpdateMessage } from '../../messages/RoomObjectUpdateMessage'; import { IRoomObjectController } from '../IRoomObjectController'; import { IRoomObjectMouseHandler } from './IRoomObjectMouseHandler'; @@ -17,4 +16,4 @@ export interface IRoomObjectEventHandler extends IRoomObjectMouseHandler, IDispo eventDispatcher: IEventDispatcher; widget: string; contextMenu: string; -} \ No newline at end of file +} diff --git a/src/room/object/logic/IRoomObjectLogicFactory.ts b/src/room/object/logic/IRoomObjectLogicFactory.ts index 9054553d..f3314a9d 100644 --- a/src/room/object/logic/IRoomObjectLogicFactory.ts +++ b/src/room/object/logic/IRoomObjectLogicFactory.ts @@ -1,4 +1,4 @@ -import { IEventDispatcher } from '../../../core/events/IEventDispatcher'; +import { IEventDispatcher } from '../../../api'; import { IRoomObjectEventHandler } from './IRoomObjectEventHandler'; export interface IRoomObjectLogicFactory @@ -7,4 +7,4 @@ export interface IRoomObjectLogicFactory registerEventFunction(func: Function): void; removeEventFunction(func: Function): void; events: IEventDispatcher; -} \ No newline at end of file +} diff --git a/src/room/object/logic/RoomObjectLogicBase.ts b/src/room/object/logic/RoomObjectLogicBase.ts index 9eda0d8e..d59845e7 100644 --- a/src/room/object/logic/RoomObjectLogicBase.ts +++ b/src/room/object/logic/RoomObjectLogicBase.ts @@ -1,5 +1,5 @@ -import { Disposable } from '../../../core/common/disposable/Disposable'; -import { IEventDispatcher } from '../../../core/events/IEventDispatcher'; +import { IEventDispatcher } from '../../../api'; +import { Disposable } from '../../../core/common/Disposable'; import { RoomSpriteMouseEvent } from '../../events/RoomSpriteMouseEvent'; import { RoomObjectUpdateMessage } from '../../messages/RoomObjectUpdateMessage'; import { IRoomGeometry } from '../../utils/IRoomGeometry'; @@ -42,7 +42,7 @@ export class RoomObjectLogicBase extends Disposable implements IRoomObjectEventH public processUpdateMessage(message: RoomObjectUpdateMessage): void { - if(!message || !this._object) return; + if (!message || !this._object) return; this._object.setLocation(message.location); this._object.setDirection(message.direction); @@ -57,9 +57,9 @@ export class RoomObjectLogicBase extends Disposable implements IRoomObjectEventH { const types = k.concat(); - for(const type of _arg_2) + for (const type of _arg_2) { - if(!type || (types.indexOf(type) >= 0)) continue; + if (!type || (types.indexOf(type) >= 0)) continue; types.push(type); } @@ -79,14 +79,14 @@ export class RoomObjectLogicBase extends Disposable implements IRoomObjectEventH public setObject(object: IRoomObjectController): void { - if(this._object === object) return; + if (this._object === object) return; - if(this._object) + if (this._object) { this._object.setLogic(null); } - if(!object) + if (!object) { this.dispose(); @@ -133,4 +133,4 @@ export class RoomObjectLogicBase extends Disposable implements IRoomObjectEventH { return this._time; } -} \ No newline at end of file +}