diff --git a/src/nitro/communication/messages/incoming/inventory/badges/_Str_8120.ts b/src/nitro/communication/messages/incoming/inventory/badges/_Str_8120.ts index f3413334..71b80984 100644 --- a/src/nitro/communication/messages/incoming/inventory/badges/_Str_8120.ts +++ b/src/nitro/communication/messages/incoming/inventory/badges/_Str_8120.ts @@ -1,16 +1,16 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { BadgeReceivedParser } from 'nitro-renderer/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser'; +import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { _Str_7491 } from '../../../parser/inventory/badges/_Str_7491'; export class _Str_8120 extends MessageEvent implements IMessageEvent { constructor(callBack: Function) { - super(callBack, _Str_7491); + super(callBack, BadgeReceivedParser); } - public getParser(): _Str_7491 + public getParser(): BadgeReceivedParser { - return this.parser as _Str_7491; + return this.parser as BadgeReceivedParser; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/incoming/inventory/badges/_Str_8179.ts b/src/nitro/communication/messages/incoming/inventory/badges/_Str_8179.ts index 15feb804..4128d05c 100644 --- a/src/nitro/communication/messages/incoming/inventory/badges/_Str_8179.ts +++ b/src/nitro/communication/messages/incoming/inventory/badges/_Str_8179.ts @@ -1,16 +1,16 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { IsBadgeRequestFulfilledParser } from 'nitro-renderer/src/nitro/communication/messages/parser/inventory/badges/IsBadgeRequestFulfilledParser'; +import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { _Str_9135 } from '../../../parser/inventory/badges/_Str_9135'; export class _Str_8179 extends MessageEvent implements IMessageEvent { constructor(callBack: Function) { - super(callBack, _Str_9135); + super(callBack, IsBadgeRequestFulfilledParser); } - public getParser(): _Str_9135 + public getParser(): IsBadgeRequestFulfilledParser { - return this.parser as _Str_9135; + return this.parser as IsBadgeRequestFulfilledParser; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/incoming/inventory/badges/_Str_8980.ts b/src/nitro/communication/messages/incoming/inventory/badges/_Str_8980.ts index 75597335..72178d60 100644 --- a/src/nitro/communication/messages/incoming/inventory/badges/_Str_8980.ts +++ b/src/nitro/communication/messages/incoming/inventory/badges/_Str_8980.ts @@ -1,16 +1,16 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { BadgePointLimitsParser } from 'nitro-renderer/src/nitro/communication/messages/parser/inventory/badges/BadgePointLimitsParser'; +import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { _Str_7305 } from '../../../parser/inventory/badges/_Str_7305'; export class _Str_8980 extends MessageEvent implements IMessageEvent { constructor(callBack: Function) { - super(callBack, _Str_7305); + super(callBack, BadgePointLimitsParser); } - public getParser(): _Str_7305 + public getParser(): BadgePointLimitsParser { - return this.parser as _Str_7305; + return this.parser as BadgePointLimitsParser; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/parser/inventory/badges/_Str_7446.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts similarity index 75% rename from src/nitro/communication/messages/parser/inventory/badges/_Str_7446.ts rename to src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts index 775d3382..c6d29381 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/_Str_7446.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts @@ -1,6 +1,6 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; +import { IMessageDataWrapper } from 'nitro-renderer/src/core/communication/messages/IMessageDataWrapper'; -export class _Str_7446 +export class BadgeAndPointLimit { private _badgeId: string; private _limit: number; @@ -22,4 +22,4 @@ export class _Str_7446 { return this._limit; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/parser/inventory/badges/_Str_7305.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgePointLimitsParser.ts similarity index 51% rename from src/nitro/communication/messages/parser/inventory/badges/_Str_7305.ts rename to src/nitro/communication/messages/parser/inventory/badges/BadgePointLimitsParser.ts index c3f977d8..f06d8be9 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/_Str_7305.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgePointLimitsParser.ts @@ -1,10 +1,10 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser'; -import { _Str_7446 } from './_Str_7446'; +import { IMessageDataWrapper } from 'nitro-renderer/src/core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from 'nitro-renderer/src/core/communication/messages/IMessageParser'; +import { BadgeAndPointLimit } from 'nitro-renderer/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit'; -export class _Str_7305 implements IMessageParser +export class BadgePointLimitsParser implements IMessageParser { - private _data: _Str_7446[]; + private _data: BadgeAndPointLimit[]; public flush(): boolean { @@ -28,7 +28,7 @@ export class _Str_7305 implements IMessageParser while(_local_6 < _local_5) { - this._data.push(new _Str_7446(_local_4, wrapper)); + this._data.push(new BadgeAndPointLimit(_local_4, wrapper)); _local_6++; } @@ -39,8 +39,8 @@ export class _Str_7305 implements IMessageParser return true; } - public get data(): _Str_7446[] + public get data(): BadgeAndPointLimit[] { return this._data; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts new file mode 100644 index 00000000..90d226ab --- /dev/null +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts @@ -0,0 +1,36 @@ +import { IMessageDataWrapper } from 'nitro-renderer/src/core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from 'nitro-renderer/src/core/communication/messages/IMessageParser'; + +export class BadgeReceivedParser implements IMessageParser +{ + private _badgeId: number; + private _badgeCode: string; + + public flush(): boolean + { + this._badgeId = 0; + this._badgeCode = null; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._badgeId = wrapper.readInt(); + this._badgeCode = wrapper.readString(); + + return true; + } + + public get badgeId(): number + { + return this._badgeId; + } + + public get badgeCode(): string + { + return this._badgeCode; + } +} diff --git a/src/nitro/communication/messages/parser/inventory/badges/IsBadgeRequestFulfilledParser.ts b/src/nitro/communication/messages/parser/inventory/badges/IsBadgeRequestFulfilledParser.ts new file mode 100644 index 00000000..c089af44 --- /dev/null +++ b/src/nitro/communication/messages/parser/inventory/badges/IsBadgeRequestFulfilledParser.ts @@ -0,0 +1,33 @@ +import { IMessageDataWrapper } from 'nitro-renderer/src/core/communication/messages/IMessageDataWrapper'; +import { IMessageParser } from 'nitro-renderer/src/core/communication/messages/IMessageParser'; + +export class IsBadgeRequestFulfilledParser implements IMessageParser +{ + private _requestCode: string; + private _fulfilled: boolean; + + public flush(): boolean + { + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if(!wrapper) return false; + + this._requestCode = wrapper.readString(); + this._fulfilled = wrapper.readBoolean(); + + return true; + } + + public get requestCode(): string + { + return this._requestCode; + } + + public get fulfilled(): boolean + { + return this._fulfilled; + } +} diff --git a/src/nitro/communication/messages/parser/inventory/badges/_Str_7491.ts b/src/nitro/communication/messages/parser/inventory/badges/_Str_7491.ts deleted file mode 100644 index e6eb6a18..00000000 --- a/src/nitro/communication/messages/parser/inventory/badges/_Str_7491.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser'; - -export class _Str_7491 implements IMessageParser -{ - private _badgeId: number; - private _Str_2722: string; - - public flush(): boolean - { - this._badgeId = 0; - this._Str_2722 = null; - - return true; - } - - public parse(wrapper: IMessageDataWrapper): boolean - { - if(!wrapper) return false; - - this._badgeId = wrapper.readInt(); - this._Str_2722 = wrapper.readString(); - - return true; - } - - public get badgeId(): number - { - return this._badgeId; - } - - public get _Str_2494(): string - { - return this._Str_2722; - } -} \ No newline at end of file diff --git a/src/nitro/communication/messages/parser/inventory/badges/_Str_9135.ts b/src/nitro/communication/messages/parser/inventory/badges/_Str_9135.ts deleted file mode 100644 index 29ffa69c..00000000 --- a/src/nitro/communication/messages/parser/inventory/badges/_Str_9135.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; -import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser'; - -export class _Str_9135 implements IMessageParser -{ - private _Str_10244: string; - private _Str_22220: boolean; - - public flush(): boolean - { - return true; - } - - public parse(wrapper: IMessageDataWrapper): boolean - { - if(!wrapper) return false; - - this._Str_10244 = wrapper.readString(); - this._Str_22220 = wrapper.readBoolean(); - - return true; - } - - public get _Str_25181(): string - { - return this._Str_10244; - } - - public get _Str_25366(): boolean - { - return this._Str_22220; - } -} \ No newline at end of file diff --git a/src/nitro/communication/messages/parser/inventory/badges/index.ts b/src/nitro/communication/messages/parser/inventory/badges/index.ts index b849f91b..5ba16864 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/index.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/index.ts @@ -1,5 +1,5 @@ +export * from './BadgeAndPointLimit'; +export * from './BadgePointLimitsParser'; +export * from './BadgeReceivedParser'; export * from './BadgesParser'; -export * from './_Str_7305'; -export * from './_Str_7446'; -export * from './_Str_7491'; -export * from './_Str_9135'; +export * from './IsBadgeRequestFulfilledParser'; diff --git a/src/nitro/session/IgnoredUsersManager.ts b/src/nitro/session/IgnoredUsersManager.ts index bb356045..a3360676 100644 --- a/src/nitro/session/IgnoredUsersManager.ts +++ b/src/nitro/session/IgnoredUsersManager.ts @@ -79,24 +79,24 @@ export class IgnoredUsersManager implements IDisposable case 0: return; case 1: - this._Str_19721(name); + this.addUserToIgnoreList(name); return; case 2: - this._Str_19721(name); + this.addUserToIgnoreList(name); this._ignoredUsers.shift(); return; case 3: - this._Str_23631(name); + this.removeUserFromIgnoreList(name); return; } } - private _Str_19721(name: string): void + private addUserToIgnoreList(name: string): void { if(this._ignoredUsers.indexOf(name) < 0) this._ignoredUsers.push(name); } - private _Str_23631(name: string): void + private removeUserFromIgnoreList(name: string): void { const index = this._ignoredUsers.indexOf(name);