mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-30 03:00:51 +01:00
cleaned IsBadgeRequestFulfilledParser
This commit is contained in:
parent
2dd8306c3b
commit
75f15cc73f
@ -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 { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||||
import { _Str_7491 } from '../../../parser/inventory/badges/_Str_7491';
|
|
||||||
|
|
||||||
export class _Str_8120 extends MessageEvent implements IMessageEvent
|
export class _Str_8120 extends MessageEvent implements IMessageEvent
|
||||||
{
|
{
|
||||||
constructor(callBack: Function)
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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 { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||||
import { _Str_9135 } from '../../../parser/inventory/badges/_Str_9135';
|
|
||||||
|
|
||||||
export class _Str_8179 extends MessageEvent implements IMessageEvent
|
export class _Str_8179 extends MessageEvent implements IMessageEvent
|
||||||
{
|
{
|
||||||
constructor(callBack: Function)
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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 { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||||
import { _Str_7305 } from '../../../parser/inventory/badges/_Str_7305';
|
|
||||||
|
|
||||||
export class _Str_8980 extends MessageEvent implements IMessageEvent
|
export class _Str_8980 extends MessageEvent implements IMessageEvent
|
||||||
{
|
{
|
||||||
constructor(callBack: Function)
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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 _badgeId: string;
|
||||||
private _limit: number;
|
private _limit: number;
|
@ -1,10 +1,10 @@
|
|||||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
import { IMessageDataWrapper } from 'nitro-renderer/src/core/communication/messages/IMessageDataWrapper';
|
||||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
import { IMessageParser } from 'nitro-renderer/src/core/communication/messages/IMessageParser';
|
||||||
import { _Str_7446 } from './_Str_7446';
|
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
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
@ -28,7 +28,7 @@ export class _Str_7305 implements IMessageParser
|
|||||||
|
|
||||||
while(_local_6 < _local_5)
|
while(_local_6 < _local_5)
|
||||||
{
|
{
|
||||||
this._data.push(new _Str_7446(_local_4, wrapper));
|
this._data.push(new BadgeAndPointLimit(_local_4, wrapper));
|
||||||
|
|
||||||
_local_6++;
|
_local_6++;
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ export class _Str_7305 implements IMessageParser
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get data(): _Str_7446[]
|
public get data(): BadgeAndPointLimit[]
|
||||||
{
|
{
|
||||||
return this._data;
|
return this._data;
|
||||||
}
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +1,5 @@
|
|||||||
|
export * from './BadgeAndPointLimit';
|
||||||
|
export * from './BadgePointLimitsParser';
|
||||||
|
export * from './BadgeReceivedParser';
|
||||||
export * from './BadgesParser';
|
export * from './BadgesParser';
|
||||||
export * from './_Str_7305';
|
export * from './IsBadgeRequestFulfilledParser';
|
||||||
export * from './_Str_7446';
|
|
||||||
export * from './_Str_7491';
|
|
||||||
export * from './_Str_9135';
|
|
||||||
|
@ -79,24 +79,24 @@ export class IgnoredUsersManager implements IDisposable
|
|||||||
case 0:
|
case 0:
|
||||||
return;
|
return;
|
||||||
case 1:
|
case 1:
|
||||||
this._Str_19721(name);
|
this.addUserToIgnoreList(name);
|
||||||
return;
|
return;
|
||||||
case 2:
|
case 2:
|
||||||
this._Str_19721(name);
|
this.addUserToIgnoreList(name);
|
||||||
this._ignoredUsers.shift();
|
this._ignoredUsers.shift();
|
||||||
return;
|
return;
|
||||||
case 3:
|
case 3:
|
||||||
this._Str_23631(name);
|
this.removeUserFromIgnoreList(name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_19721(name: string): void
|
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 _Str_23631(name: string): void
|
private removeUserFromIgnoreList(name: string): void
|
||||||
{
|
{
|
||||||
const index = this._ignoredUsers.indexOf(name);
|
const index = this._ignoredUsers.indexOf(name);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user