Add packet

This commit is contained in:
Bill 2021-10-21 23:19:15 -04:00
parent 80906ebc23
commit e9eca8cb52
6 changed files with 47 additions and 0 deletions

View File

@ -49,6 +49,7 @@ import { GroupInformationEvent } from './messages/incoming/group/GroupInformatio
import { GroupMembersEvent } from './messages/incoming/group/GroupMembersEvent';
import { GroupPurchasedEvent } from './messages/incoming/group/GroupPurchasedEvent';
import { GroupSettingsEvent } from './messages/incoming/group/GroupSettingsEvent';
import { CallForHelpDisabledNotifyMessageEvent } from './messages/incoming/help/CallForHelpDisabledNotifyMessageEvent';
import { CallForHelpResultMessageEvent } from './messages/incoming/help/CallForHelpResultMessageEvent';
import { IncomingHeader } from './messages/incoming/IncomingHeader';
import { AchievementEvent } from './messages/incoming/inventory/achievements/AchievementEvent';
@ -598,9 +599,11 @@ export class NitroMessages implements IMessageConfiguration
this._events.set(IncomingHeader.GROUP_BADGES, GroupBadgesEvent);
// HELP
this._events.set(IncomingHeader.CFH_DISABLED_NOTIFY, CallForHelpDisabledNotifyMessageEvent);
this._events.set(IncomingHeader.CFH_RESULT_MESSAGE, CallForHelpResultMessageEvent);
this._events.set(IncomingHeader.HELPER_TALENT_TRACK, TalentTrackEvent);
// INVENTORY
this._events.set(IncomingHeader.ACHIEVEMENT_PROGRESSED, AchievementEvent);
this._events.set(IncomingHeader.ACHIEVEMENT_LIST, AchievementsEvent);

View File

@ -329,4 +329,5 @@ export class IncomingHeader
public static YOUTUBE_CONTROL_VIDEO = 1554;
public static YOUTUBE_DISPLAY_PLAYLISTS = 1112;
public static YOUTUBE_DISPLAY_VIDEO = 1411;
public static CFH_DISABLED_NOTIFY = 1651;
}

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { CallForHelpDisabledNotifyMessageParser } from '../../parser/help/CallForHelpDisabledNotifyMessageParser';
export class CallForHelpDisabledNotifyMessageEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, CallForHelpDisabledNotifyMessageParser);
}
public getParser(): CallForHelpDisabledNotifyMessageParser
{
return this.parser as CallForHelpDisabledNotifyMessageParser;
}
}

View File

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

View File

@ -0,0 +1,25 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
export class CallForHelpDisabledNotifyMessageParser implements IMessageParser
{
private _infoUrl: string;
public flush(): boolean
{
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._infoUrl = wrapper.readString();
return true;
}
public get infoUrl(): string
{
return this._infoUrl;
}
}

View File

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