removed duplicate packets

This commit is contained in:
dank074 2021-10-20 23:35:02 -05:00
parent 80cb55ea2c
commit 9637be2008
6 changed files with 1 additions and 94 deletions

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -1,4 +1,2 @@
export * from './CallForHelpCategoryData';
export * from './CallForHelpResultMessageEvent';
export * from './CfhTopicsInitEvent';
export * from './TalentTrackEvent';

View File

@ -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';

View File

@ -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;
}
}

View File

@ -1,4 +1,3 @@
export * from './CallForHelpResultMessageParser';
export * from './CfhTopicsInitMessageParser';
export * from './common';
export * from './TalentTrackParser';