mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
remove duplicate class
This commit is contained in:
parent
8a12122547
commit
913aa27a9d
@ -1,91 +0,0 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core';
|
||||
|
||||
export class GroupDataParser
|
||||
{
|
||||
private _id: number;
|
||||
private _title: string;
|
||||
private _badge: string;
|
||||
private _colorA: string;
|
||||
private _colorB: string;
|
||||
private _ownerOrFavorite: boolean;
|
||||
private _ownerId: number;
|
||||
private _hasForum: boolean;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
if(!wrapper) throw new Error('invalid_wrapper');
|
||||
|
||||
this.flush();
|
||||
this.parse(wrapper);
|
||||
}
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._id = 0;
|
||||
this._title = null;
|
||||
this._badge = null;
|
||||
this._colorA = null;
|
||||
this._colorB = null;
|
||||
this._ownerOrFavorite = null;
|
||||
this._ownerId = 0;
|
||||
this._hasForum = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._id = wrapper.readInt();
|
||||
this._title = wrapper.readString();
|
||||
this._badge = wrapper.readString();
|
||||
this._colorA = wrapper.readString();
|
||||
this._colorB = wrapper.readString();
|
||||
this._ownerOrFavorite = wrapper.readBoolean();
|
||||
this._ownerId = wrapper.readInt();
|
||||
this._hasForum = wrapper.readBoolean();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get title(): string
|
||||
{
|
||||
return this._title;
|
||||
}
|
||||
|
||||
public get badge(): string
|
||||
{
|
||||
return this._badge;
|
||||
}
|
||||
|
||||
public get colorA(): string
|
||||
{
|
||||
return this._colorA;
|
||||
}
|
||||
|
||||
public get colorB(): string
|
||||
{
|
||||
return this._colorB;
|
||||
}
|
||||
|
||||
public get ownerOrFavorite(): boolean
|
||||
{
|
||||
return this._ownerOrFavorite;
|
||||
}
|
||||
|
||||
public get ownerId(): number
|
||||
{
|
||||
return this._ownerId;
|
||||
}
|
||||
|
||||
public get hasForum(): boolean
|
||||
{
|
||||
return this._hasForum;
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
||||
import { GroupDataParser } from '../../group/utils/GroupDataParser';
|
||||
import { HabboGroupEntryData } from '../HabboGroupEntryData';
|
||||
|
||||
export class UserProfileParser implements IMessageParser
|
||||
{
|
||||
@ -13,7 +13,7 @@ export class UserProfileParser implements IMessageParser
|
||||
private _isMyFriend: boolean;
|
||||
private _requestSent: boolean;
|
||||
private _isOnline: boolean;
|
||||
private _groups: GroupDataParser[];
|
||||
private _groups: HabboGroupEntryData[];
|
||||
private _secondsSinceLastVisit: number;
|
||||
private _openProfileWindow: boolean;
|
||||
|
||||
@ -54,7 +54,7 @@ export class UserProfileParser implements IMessageParser
|
||||
|
||||
for(let i = 0; i < groupsCount; i++)
|
||||
{
|
||||
this._groups.push(new GroupDataParser(wrapper));
|
||||
this._groups.push(new HabboGroupEntryData(wrapper));
|
||||
}
|
||||
|
||||
this._secondsSinceLastVisit = wrapper.readInt();
|
||||
@ -113,7 +113,7 @@ export class UserProfileParser implements IMessageParser
|
||||
return this._isOnline;
|
||||
}
|
||||
|
||||
public get groups(): GroupDataParser[]
|
||||
public get groups(): HabboGroupEntryData[]
|
||||
{
|
||||
return this._groups;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user