mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-30 03:00:51 +01:00
removed duplicate packets
This commit is contained in:
parent
80cb55ea2c
commit
9637be2008
@ -1,44 +0,0 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
|
||||
export class CallForHelpCategoryData
|
||||
{
|
||||
private _name: string;
|
||||
private _topics: CallForHelpTopicData[];
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._topics = [];
|
||||
this._name = wrapper.readString();
|
||||
const count = wrapper.readInt();
|
||||
let i = 0;
|
||||
while(i < count)
|
||||
{
|
||||
const name = wrapper.readString();
|
||||
const id = wrapper.readInt();
|
||||
const unknown = wrapper.readString();
|
||||
this._topics.push({
|
||||
name,
|
||||
id,
|
||||
consequence: unknown
|
||||
});
|
||||
i++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public get topics(): CallForHelpTopicData[]
|
||||
{
|
||||
return this._topics;
|
||||
}
|
||||
|
||||
public get name(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
}
|
||||
|
||||
interface CallForHelpTopicData {
|
||||
name: string;
|
||||
id: number;
|
||||
consequence: string;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CfhTopicsInitMessageParser } from '../../parser/help/CfhTopicsInitMessageParser';
|
||||
|
||||
export class CfhTopicsInitEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CfhTopicsInitMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CfhTopicsInitMessageParser
|
||||
{
|
||||
return this.parser as CfhTopicsInitMessageParser;
|
||||
}
|
||||
}
|
@ -1,4 +1,2 @@
|
||||
export * from './CallForHelpCategoryData';
|
||||
export * from './CallForHelpResultMessageEvent';
|
||||
export * from './CfhTopicsInitEvent';
|
||||
export * from './TalentTrackEvent';
|
||||
|
@ -2,6 +2,7 @@ export * from './advertisement';
|
||||
export * from './availability';
|
||||
export * from './avatar';
|
||||
export * from './bots';
|
||||
export * from './callforhelp';
|
||||
export * from './camera';
|
||||
export * from './catalog';
|
||||
export * from './client';
|
||||
|
@ -1,31 +0,0 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { CallForHelpCategoryData } from '../../incoming/help/CallForHelpCategoryData';
|
||||
|
||||
export class CfhTopicsInitMessageParser implements IMessageParser
|
||||
{
|
||||
private _callForHelpCategories: CallForHelpCategoryData[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._callForHelpCategories = [];
|
||||
const count = wrapper.readInt();
|
||||
let i = 0;
|
||||
while(i < count)
|
||||
{
|
||||
this._callForHelpCategories.push(new CallForHelpCategoryData(wrapper));
|
||||
i++;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get callForHelpCategories(): CallForHelpCategoryData[]
|
||||
{
|
||||
return this._callForHelpCategories;
|
||||
}
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
export * from './CallForHelpResultMessageParser';
|
||||
export * from './CfhTopicsInitMessageParser';
|
||||
export * from './common';
|
||||
export * from './TalentTrackParser';
|
||||
|
Loading…
Reference in New Issue
Block a user