diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index 52a759af..0711255f 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -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); diff --git a/src/nitro/communication/messages/incoming/IncomingHeader.ts b/src/nitro/communication/messages/incoming/IncomingHeader.ts index 1e2f36ea..743c08be 100644 --- a/src/nitro/communication/messages/incoming/IncomingHeader.ts +++ b/src/nitro/communication/messages/incoming/IncomingHeader.ts @@ -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; } diff --git a/src/nitro/communication/messages/incoming/help/CallForHelpDisabledNotifyMessageEvent.ts b/src/nitro/communication/messages/incoming/help/CallForHelpDisabledNotifyMessageEvent.ts new file mode 100644 index 00000000..2f7ca860 --- /dev/null +++ b/src/nitro/communication/messages/incoming/help/CallForHelpDisabledNotifyMessageEvent.ts @@ -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; + } +} diff --git a/src/nitro/communication/messages/incoming/help/index.ts b/src/nitro/communication/messages/incoming/help/index.ts index af7e99c6..69515651 100644 --- a/src/nitro/communication/messages/incoming/help/index.ts +++ b/src/nitro/communication/messages/incoming/help/index.ts @@ -1,4 +1,5 @@ export * from './CallForHelpCategoryData'; +export * from './CallForHelpDisabledNotifyMessageEvent'; export * from './CallForHelpResultMessageEvent'; export * from './CfhTopicsInitEvent'; export * from './TalentTrackEvent'; diff --git a/src/nitro/communication/messages/parser/help/CallForHelpDisabledNotifyMessageParser.ts b/src/nitro/communication/messages/parser/help/CallForHelpDisabledNotifyMessageParser.ts new file mode 100644 index 00000000..2b115b54 --- /dev/null +++ b/src/nitro/communication/messages/parser/help/CallForHelpDisabledNotifyMessageParser.ts @@ -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; + } +} diff --git a/src/nitro/communication/messages/parser/help/index.ts b/src/nitro/communication/messages/parser/help/index.ts index a7967304..e379a40f 100644 --- a/src/nitro/communication/messages/parser/help/index.ts +++ b/src/nitro/communication/messages/parser/help/index.ts @@ -1,3 +1,4 @@ +export * from './CallForHelpDisabledNotifyMessageParser'; export * from './CallForHelpResultMessageParser'; export * from './CfhTopicsInitMessageParser'; export * from './common';