From 7cd825209bb3d046b2f332865f90075c111e6d7a Mon Sep 17 00:00:00 2001 From: dank074 Date: Fri, 26 Nov 2021 19:21:39 -0600 Subject: [PATCH] added chat review packets --- src/nitro/communication/NitroMessages.ts | 7 ++- .../messages/incoming/IncomingHeader.ts | 5 ++ .../ChatReviewSessionDetachedMessageEvent.ts | 16 +++++++ ...ReviewSessionOfferedToGuideMessageEvent.ts | 16 +++++++ .../ChatReviewSessionResultsMessageEvent.ts | 16 +++++++ .../ChatReviewSessionStartedMessageEvent.ts | 16 +++++++ ...atReviewSessionVotingStatusMessageEvent.ts | 16 +++++++ .../messages/incoming/help/index.ts | 5 ++ .../ChatReviewSessionDetachedMessageParser.ts | 16 +++++++ ...eviewSessionOfferedToGuideMessageParser.ts | 24 ++++++++++ .../ChatReviewSessionResultsMessageParser.ts | 48 +++++++++++++++++++ .../ChatReviewSessionStartedMessageParser.ts | 30 ++++++++++++ ...tReviewSessionVotingStatusMessageParser.ts | 39 +++++++++++++++ .../messages/parser/help/index.ts | 5 ++ 14 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 src/nitro/communication/messages/incoming/help/ChatReviewSessionDetachedMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/help/ChatReviewSessionOfferedToGuideMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/help/ChatReviewSessionResultsMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/help/ChatReviewSessionStartedMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/help/ChatReviewSessionVotingStatusMessageEvent.ts create mode 100644 src/nitro/communication/messages/parser/help/ChatReviewSessionDetachedMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/help/ChatReviewSessionOfferedToGuideMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/help/ChatReviewSessionResultsMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/help/ChatReviewSessionStartedMessageParser.ts create mode 100644 src/nitro/communication/messages/parser/help/ChatReviewSessionVotingStatusMessageParser.ts diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index afd1ec20..d1be3b09 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -1,5 +1,5 @@ import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration'; -import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, BuyMarketplaceOfferMessageComposer, BuyMarketplaceTokensMessageComposer, CallForHelpFromForumMessageMessageComposer, CallForHelpFromForumThreadMessageComposer, CallForHelpFromIMMessageComposer, CallForHelpFromPhotoMessageComposer, CallForHelpFromSelfieMessageComposer, CallForHelpMessageComposer, CallForHelpPendingCallsDeletedMessageEvent, CallForHelpPendingCallsMessageEvent, CallForHelpReplyMessageEvent, CancelMarketplaceOfferMessageComposer, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, ChatReviewGuideDecidesOnOfferMessageComposer, ChatReviewGuideDetachedMessageComposer, ChatReviewGuideVoteMessageComposer, ChatReviewSessionCreateMessageComposer, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, CloseIssueDefaultActionMessageComposer, CloseIssuesMessageComposer, ClubGiftNotificationEvent, ControlYoutubeDisplayPlaybackMessageComposer, DeletePendingCallsForHelpMessageComposer, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCfhChatlogMessageComposer, GetCfhStatusMessageComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetFaqCategoryMessageComposer, GetFaqTextMessageComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetGuideReportingStatusMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMarketplaceConfigurationMessageComposer, GetMarketplaceItemStatsComposer, GetMarketplaceOffersMessageComposer, GetMarketplaceOwnOffersMessageComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetPendingCallsForHelpMessageComposer, GetQuizQuestionsComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GoToFlatMessageComposer, GroupBadgesComposer, GroupBadgesEvent, GuideOnDutyStatusMessageEvent, GuideSessionAttachedMessageEvent, GuideSessionCreateMessageComposer, GuideSessionDetachedMessageEvent, GuideSessionEndedMessageEvent, GuideSessionErrorMessageEvent, GuideSessionFeedbackMessageComposer, GuideSessionGetRequesterRoomMessageComposer, GuideSessionGuideDecidesMessageComposer, GuideSessionInvitedToGuideRoomMessageEvent, GuideSessionInviteRequesterMessageComposer, GuideSessionIsTypingMessageComposer, GuideSessionMessageMessageComposer, GuideSessionMessageMessageEvent, GuideSessionOnDutyUpdateMessageComposer, GuideSessionPartnerIsTypingMessageEvent, GuideSessionReportMessageComposer, GuideSessionRequesterCancelsMessageComposer, GuideSessionRequesterRoomMessageEvent, GuideSessionResolvedMessageComposer, GuideSessionStartedMessageEvent, GuideTicketCreationResultMessageEvent, GuideTicketResolutionMessageEvent, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelMergeNameChangeEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, IssueCloseNotificationMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, ModToolPreferencesComposer, ModToolSanctionComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PickIssuesMessageComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PollAnswerComposer, PollContentsEvent, PollErrorEvent, PollOfferEvent, PollRejectComposer, PollStartComposer, PostMessageMessageComposer, PostQuizAnswersComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, QuestionAnsweredEvent, QuestionEvent, QuestionFinishedEvent, QuizDataMessageEvent, QuizResultsMessageEvent, RedeemMarketplaceOfferCreditsMessageComposer, ReleaseIssuesMessageComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, SearchFaqsMessageComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackMessageEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, TryPhoneNumberMessageComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UpdateForumReadMarkerMessageComposer, UpdateForumSettingsMessageComposer, UpdateThreadMessageComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VerifyCodeMessageComposer, VoteForRoomMessageComposer, WardrobeMessageEvent } from './messages'; +import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, BuyMarketplaceOfferMessageComposer, BuyMarketplaceTokensMessageComposer, CallForHelpFromForumMessageMessageComposer, CallForHelpFromForumThreadMessageComposer, CallForHelpFromIMMessageComposer, CallForHelpFromPhotoMessageComposer, CallForHelpFromSelfieMessageComposer, CallForHelpMessageComposer, CallForHelpPendingCallsDeletedMessageEvent, CallForHelpPendingCallsMessageEvent, CallForHelpReplyMessageEvent, CancelMarketplaceOfferMessageComposer, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, ChatReviewGuideDecidesOnOfferMessageComposer, ChatReviewGuideDetachedMessageComposer, ChatReviewGuideVoteMessageComposer, ChatReviewSessionCreateMessageComposer, ChatReviewSessionDetachedMessageEvent, ChatReviewSessionOfferedToGuideMessageEvent, ChatReviewSessionResultsMessageEvent, ChatReviewSessionStartedMessageEvent, ChatReviewSessionVotingStatusMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, CloseIssueDefaultActionMessageComposer, CloseIssuesMessageComposer, ClubGiftNotificationEvent, ControlYoutubeDisplayPlaybackMessageComposer, DeletePendingCallsForHelpMessageComposer, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCfhChatlogMessageComposer, GetCfhStatusMessageComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetFaqCategoryMessageComposer, GetFaqTextMessageComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetGuideReportingStatusMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMarketplaceConfigurationMessageComposer, GetMarketplaceItemStatsComposer, GetMarketplaceOffersMessageComposer, GetMarketplaceOwnOffersMessageComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetPendingCallsForHelpMessageComposer, GetQuizQuestionsComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GoToFlatMessageComposer, GroupBadgesComposer, GroupBadgesEvent, GuideOnDutyStatusMessageEvent, GuideSessionAttachedMessageEvent, GuideSessionCreateMessageComposer, GuideSessionDetachedMessageEvent, GuideSessionEndedMessageEvent, GuideSessionErrorMessageEvent, GuideSessionFeedbackMessageComposer, GuideSessionGetRequesterRoomMessageComposer, GuideSessionGuideDecidesMessageComposer, GuideSessionInvitedToGuideRoomMessageEvent, GuideSessionInviteRequesterMessageComposer, GuideSessionIsTypingMessageComposer, GuideSessionMessageMessageComposer, GuideSessionMessageMessageEvent, GuideSessionOnDutyUpdateMessageComposer, GuideSessionPartnerIsTypingMessageEvent, GuideSessionReportMessageComposer, GuideSessionRequesterCancelsMessageComposer, GuideSessionRequesterRoomMessageEvent, GuideSessionResolvedMessageComposer, GuideSessionStartedMessageEvent, GuideTicketCreationResultMessageEvent, GuideTicketResolutionMessageEvent, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelMergeNameChangeEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, IssueCloseNotificationMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, ModToolPreferencesComposer, ModToolSanctionComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PickIssuesMessageComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PollAnswerComposer, PollContentsEvent, PollErrorEvent, PollOfferEvent, PollRejectComposer, PollStartComposer, PostMessageMessageComposer, PostQuizAnswersComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, QuestionAnsweredEvent, QuestionEvent, QuestionFinishedEvent, QuizDataMessageEvent, QuizResultsMessageEvent, RedeemMarketplaceOfferCreditsMessageComposer, ReleaseIssuesMessageComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, SearchFaqsMessageComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackMessageEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, TryPhoneNumberMessageComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UpdateForumReadMarkerMessageComposer, UpdateForumSettingsMessageComposer, UpdateThreadMessageComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VerifyCodeMessageComposer, VoteForRoomMessageComposer, WardrobeMessageEvent } from './messages'; import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent'; import { BotAddedToInventoryEvent, BotInventoryMessageEvent, BotReceivedMessageEvent, BotRemovedFromInventoryEvent } from './messages/incoming/bots'; import { CfhSanctionMessageEvent, CfhTopicsInitEvent, SanctionStatusEvent } from './messages/incoming/callforhelp'; @@ -620,6 +620,11 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.ISSUE_CLOSE_NOTIFICATION, IssueCloseNotificationMessageEvent); this._events.set(IncomingHeader.QUIZ_DATA, QuizDataMessageEvent); this._events.set(IncomingHeader.QUIZ_RESULTS, QuizResultsMessageEvent); + this._events.set(IncomingHeader.CHAT_REVIEW_SESSION_DETACHED, ChatReviewSessionDetachedMessageEvent); + this._events.set(IncomingHeader.CHAT_REVIEW_SESSION_OFFERED_TO_GUIDE, ChatReviewSessionOfferedToGuideMessageEvent); + this._events.set(IncomingHeader.CHAT_REVIEW_SESSION_RESULTS, ChatReviewSessionResultsMessageEvent); + this._events.set(IncomingHeader.CHAT_REVIEW_SESSION_STARTED, ChatReviewSessionStartedMessageEvent); + this._events.set(IncomingHeader.CHAT_REVIEW_SESSION_VOTING_STATUS, ChatReviewSessionVotingStatusMessageEvent); // INVENTORY this._events.set(IncomingHeader.ACHIEVEMENT_PROGRESSED, AchievementEvent); diff --git a/src/nitro/communication/messages/incoming/IncomingHeader.ts b/src/nitro/communication/messages/incoming/IncomingHeader.ts index 3f3bdfdb..ebe5a227 100644 --- a/src/nitro/communication/messages/incoming/IncomingHeader.ts +++ b/src/nitro/communication/messages/incoming/IncomingHeader.ts @@ -356,4 +356,9 @@ export class IncomingHeader public static QUIZ_RESULTS = 2772; public static CFH_PENDING_CALLS_DELETED = 77; public static CFH_REPLY = 3796; + public static CHAT_REVIEW_SESSION_DETACHED = 30; + public static CHAT_REVIEW_SESSION_OFFERED_TO_GUIDE = 735; + public static CHAT_REVIEW_SESSION_RESULTS = 3276; + public static CHAT_REVIEW_SESSION_STARTED = 143; + public static CHAT_REVIEW_SESSION_VOTING_STATUS = 1829; } diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionDetachedMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionDetachedMessageEvent.ts new file mode 100644 index 00000000..a1a835c2 --- /dev/null +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionDetachedMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { ChatReviewSessionDetachedMessageParser } from '../../parser/help/ChatReviewSessionDetachedMessageParser'; + +export class ChatReviewSessionDetachedMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ChatReviewSessionDetachedMessageParser); + } + + public getParser(): ChatReviewSessionDetachedMessageParser + { + return this.parser as ChatReviewSessionDetachedMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionOfferedToGuideMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionOfferedToGuideMessageEvent.ts new file mode 100644 index 00000000..c695498b --- /dev/null +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionOfferedToGuideMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { ChatReviewSessionOfferedToGuideMessageParser } from '../../parser/help/ChatReviewSessionOfferedToGuideMessageParser'; + +export class ChatReviewSessionOfferedToGuideMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ChatReviewSessionOfferedToGuideMessageParser); + } + + public getParser(): ChatReviewSessionOfferedToGuideMessageParser + { + return this.parser as ChatReviewSessionOfferedToGuideMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionResultsMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionResultsMessageEvent.ts new file mode 100644 index 00000000..75b50343 --- /dev/null +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionResultsMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { ChatReviewSessionResultsMessageParser } from '../../parser/help/ChatReviewSessionResultsMessageParser'; + +export class ChatReviewSessionResultsMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ChatReviewSessionResultsMessageParser); + } + + public getParser(): ChatReviewSessionResultsMessageParser + { + return this.parser as ChatReviewSessionResultsMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionStartedMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionStartedMessageEvent.ts new file mode 100644 index 00000000..acb47b5f --- /dev/null +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionStartedMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { ChatReviewSessionStartedMessageParser } from '../../parser/help/ChatReviewSessionStartedMessageParser'; + +export class ChatReviewSessionStartedMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ChatReviewSessionStartedMessageParser); + } + + public getParser(): ChatReviewSessionStartedMessageParser + { + return this.parser as ChatReviewSessionStartedMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/help/ChatReviewSessionVotingStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/help/ChatReviewSessionVotingStatusMessageEvent.ts new file mode 100644 index 00000000..34471608 --- /dev/null +++ b/src/nitro/communication/messages/incoming/help/ChatReviewSessionVotingStatusMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { ChatReviewSessionVotingStatusMessageParser } from '../../parser/help/ChatReviewSessionVotingStatusMessageParser'; + +export class ChatReviewSessionVotingStatusMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ChatReviewSessionVotingStatusMessageParser); + } + + public getParser(): ChatReviewSessionVotingStatusMessageParser + { + return this.parser as ChatReviewSessionVotingStatusMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/help/index.ts b/src/nitro/communication/messages/incoming/help/index.ts index 435acbad..0c0dc829 100644 --- a/src/nitro/communication/messages/incoming/help/index.ts +++ b/src/nitro/communication/messages/incoming/help/index.ts @@ -3,6 +3,11 @@ export * from './CallForHelpPendingCallsDeletedMessageEvent'; export * from './CallForHelpPendingCallsMessageEvent'; export * from './CallForHelpReplyMessageEvent'; export * from './CallForHelpResultMessageEvent'; +export * from './ChatReviewSessionDetachedMessageEvent'; +export * from './ChatReviewSessionOfferedToGuideMessageEvent'; +export * from './ChatReviewSessionResultsMessageEvent'; +export * from './ChatReviewSessionStartedMessageEvent'; +export * from './ChatReviewSessionVotingStatusMessageEvent'; export * from './GuideOnDutyStatusMessageEvent'; export * from './GuideSessionAttachedMessageEvent'; export * from './GuideSessionDetachedMessageEvent'; diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionDetachedMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionDetachedMessageParser.ts new file mode 100644 index 00000000..074f36f2 --- /dev/null +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionDetachedMessageParser.ts @@ -0,0 +1,16 @@ +import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class ChatReviewSessionDetachedMessageParser implements IMessageParser +{ + flush(): boolean + { + return true; + } + + parse(wrapper: IMessageDataWrapper): boolean + { + return true; + } + +} diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionOfferedToGuideMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionOfferedToGuideMessageParser.ts new file mode 100644 index 00000000..be90de76 --- /dev/null +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionOfferedToGuideMessageParser.ts @@ -0,0 +1,24 @@ +import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class ChatReviewSessionOfferedToGuideMessageParser implements IMessageParser +{ + private _acceptanceTimeout: number; + + flush(): boolean + { + this._acceptanceTimeout = -1; + return true; + } + + parse(wrapper: IMessageDataWrapper): boolean + { + this._acceptanceTimeout = wrapper.readInt(); + return true; + } + + public get acceptanceTimeout(): number + { + return this._acceptanceTimeout; + } +} diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionResultsMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionResultsMessageParser.ts new file mode 100644 index 00000000..19518b9f --- /dev/null +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionResultsMessageParser.ts @@ -0,0 +1,48 @@ +import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class ChatReviewSessionResultsMessageParser implements IMessageParser +{ + private _winningVoteCode: number; + private _ownVoteCode: number; + private _finalStatus: number[]; + + flush(): boolean + { + this._winningVoteCode = -1; + this._ownVoteCode = -1; + this._finalStatus = null; + return true; + } + + parse(wrapper: IMessageDataWrapper): boolean + { + this._finalStatus = []; + this._winningVoteCode = wrapper.readInt(); + this._ownVoteCode = wrapper.readInt(); + const count = wrapper.readInt(); + + for(let i = 0; i < count; i++) + { + this._finalStatus.push(wrapper.readInt()); + } + + return true; + } + + public get winningVoteCode(): number + { + return this._winningVoteCode; + } + + public get ownVoteCode(): number + { + return this._ownVoteCode; + } + + public get finalStatus(): number[] + { + return this._finalStatus; + } + +} diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionStartedMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionStartedMessageParser.ts new file mode 100644 index 00000000..ba7411d6 --- /dev/null +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionStartedMessageParser.ts @@ -0,0 +1,30 @@ +import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class ChatReviewSessionStartedMessageParser implements IMessageParser +{ + private _votingTimeout: number; + private _chatRecord: string; + + flush(): boolean + { + return true; + } + + parse(wrapper: IMessageDataWrapper): boolean + { + this._votingTimeout = wrapper.readInt(); + this._chatRecord = wrapper.readString(); + return true; + } + + public get votingTimeout(): number + { + return this._votingTimeout; + } + + public get chatRecord(): string + { + return this._chatRecord; + } +} diff --git a/src/nitro/communication/messages/parser/help/ChatReviewSessionVotingStatusMessageParser.ts b/src/nitro/communication/messages/parser/help/ChatReviewSessionVotingStatusMessageParser.ts new file mode 100644 index 00000000..e853d60e --- /dev/null +++ b/src/nitro/communication/messages/parser/help/ChatReviewSessionVotingStatusMessageParser.ts @@ -0,0 +1,39 @@ +import { IMessageDataWrapper } from '../../../../../core'; +import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; + +export class ChatReviewSessionVotingStatusMessageParser implements IMessageParser +{ + public static readonly AWAITING_VOTE = 0; + public static readonly VOTED_OK = 1; + public static readonly VOTED_BAD = 2; + public static readonly VOTED_VERY_BAD = 3; + public static readonly NO_VOTE = 4; + public static readonly FINDING_NEW_VOTER = 5; + + private _status:number[]; + + flush(): boolean + { + this._status = null; + return true; + } + + parse(wrapper: IMessageDataWrapper): boolean + { + this._status = []; + + const count = wrapper.readInt(); + + for(let i = 0; i < count; i++) + { + this._status.push(wrapper.readInt()); + } + + return true; + } + + public get status(): number[] + { + return this._status; + } +} diff --git a/src/nitro/communication/messages/parser/help/index.ts b/src/nitro/communication/messages/parser/help/index.ts index b1933702..114865fa 100644 --- a/src/nitro/communication/messages/parser/help/index.ts +++ b/src/nitro/communication/messages/parser/help/index.ts @@ -3,6 +3,11 @@ export * from './CallForHelpPendingCallsDeletedMessageParser'; export * from './CallForHelpPendingCallsMessageParser'; export * from './CallForHelpReplyMessageParser'; export * from './CallForHelpResultMessageParser'; +export * from './ChatReviewSessionDetachedMessageParser'; +export * from './ChatReviewSessionOfferedToGuideMessageParser'; +export * from './ChatReviewSessionResultsMessageParser'; +export * from './ChatReviewSessionStartedMessageParser'; +export * from './ChatReviewSessionVotingStatusMessageParser'; export * from './GuideOnDutyStatusMessageParser'; export * from './GuideReportingStatusMessageParser'; export * from './GuideSessionAttachedMessageParser';