diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index 46edb675..4bf20d3b 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, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, CloseIssueDefaultActionMessageComposer, CloseIssuesMessageComposer, ClubGiftNotificationEvent, ControlYoutubeDisplayPlaybackMessageComposer, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCfhChatlogMessageComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GoToFlatMessageComposer, GroupBadgesComposer, GroupBadgesEvent, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, MarketplaceBuyOfferComposer, MarketplaceRedeemCreditsComposer, MarketplaceRequesstItemStatsComposer, MarketplaceRequestComposer, MarketplaceRequestOffersComposer, MarketplaceRequestOwnItemsComposer, MarketplaceTakeItemBackComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, ModToolPreferencesComposer, ModToolSanctionComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PickIssuesMessageComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PostMessageMessageComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, ReleaseIssuesMessageComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackEvent, 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, CallForHelpMessageComposer, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, CloseIssueDefaultActionMessageComposer, CloseIssuesMessageComposer, ClubGiftNotificationEvent, ControlYoutubeDisplayPlaybackMessageComposer, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCfhChatlogMessageComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GoToFlatMessageComposer, GroupBadgesComposer, GroupBadgesEvent, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, MarketplaceBuyOfferComposer, MarketplaceRedeemCreditsComposer, MarketplaceRequesstItemStatsComposer, MarketplaceRequestComposer, MarketplaceRequestOffersComposer, MarketplaceRequestOwnItemsComposer, MarketplaceTakeItemBackComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, ModToolPreferencesComposer, ModToolSanctionComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PickIssuesMessageComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PostMessageMessageComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, ReleaseIssuesMessageComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackEvent, 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'; @@ -295,7 +295,6 @@ import { GroupSettingsComposer } from './messages/outgoing/group/GroupSettingsCo import { AuthenticationMessageComposer } from './messages/outgoing/handshake/AuthenticationMessageComposer'; import { InfoRetrieveBaseMessageComposer } from './messages/outgoing/handshake/InfoRetrieveBaseMessageComposer'; import { SecurityTicketComposer } from './messages/outgoing/handshake/SecurityTicketComposer'; -import { TalentTrackComposer } from './messages/outgoing/helper/TalentTrackComposer'; import { RequestBadgesComposer } from './messages/outgoing/inventory/badges/RequestBadgesComposer'; import { SetActivatedBadgesComposer } from './messages/outgoing/inventory/badges/SetActivatedBadgesComposer'; import { GetBotInventoryComposer } from './messages/outgoing/inventory/bots/GetBotInventoryComposer'; @@ -437,6 +436,7 @@ import { UpdateActionMessageComposer } from './messages/outgoing/roomevents/Upda import { UpdateConditionMessageComposer } from './messages/outgoing/roomevents/UpdateConditionMessageComposer'; import { UpdateTriggerMessageComposer } from './messages/outgoing/roomevents/UpdateTriggerMessageComposer'; import { GetSoundSettingsComposer } from './messages/outgoing/sound/GetSoundSettingsComposer'; +import { TalentTrackComposer } from './messages/outgoing/talent/TalentTrackComposer'; import { CatalogGroupsComposer } from './messages/outgoing/user/CatalogGroupsComposer'; import { GetIgnoredUsersComposer } from './messages/outgoing/user/data/GetIgnoredUsersComposer'; import { IgnoreUserComposer } from './messages/outgoing/user/data/IgnoreUserComposer'; @@ -962,6 +962,9 @@ export class NitroMessages implements IMessageConfiguration this._composers.set(OutgoingHeader.UPDATE_FORUM_SETTINGS, UpdateForumSettingsMessageComposer); this._composers.set(OutgoingHeader.FORUM_UPDATE_THREAD, UpdateThreadMessageComposer); + // HELP + this._composers.set(OutgoingHeader.CALL_FOR_HELP, CallForHelpMessageComposer); + // CLIENT this._composers.set(OutgoingHeader.CLIENT_PONG, ClientPongComposer); this._composers.set(OutgoingHeader.RELEASE_VERSION, ClientReleaseVersionComposer); @@ -1279,7 +1282,7 @@ export class NitroMessages implements IMessageConfiguration this._composers.set(OutgoingHeader.GET_USER_SONG_DISKS, GetUserSongDisksMessageComposer); this._composers.set(OutgoingHeader.REMOVE_JUKEBOX_DISK, RemoveJukeboxDiskComposer); - // HELPER + // TALENT this._composers.set(OutgoingHeader.HELPER_TALENT_TRACK, TalentTrackComposer); } diff --git a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts index 87de70dd..2be04f88 100644 --- a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts +++ b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts @@ -118,7 +118,7 @@ export class OutgoingHeader public static PET_MOVE = 3449; public static RECYCLER_PRIZES = 398; public static RELEASE_VERSION = 4000; - public static REPORT = 1691; + public static CALL_FOR_HELP = 1691; public static ROOM_AMBASSADOR_ALERT = 2996; public static ROOM_BAN_GIVE = 1477; public static ROOM_BAN_LIST = 2267; diff --git a/src/nitro/communication/messages/outgoing/help/CallForHelpMessageComposer.ts b/src/nitro/communication/messages/outgoing/help/CallForHelpMessageComposer.ts new file mode 100644 index 00000000..eaf20e1b --- /dev/null +++ b/src/nitro/communication/messages/outgoing/help/CallForHelpMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class CallForHelpMessageComposer implements IMessageComposer +{ + private _data: any; + + constructor(message:string, topicIndex:number, reportedUserId:number, reportedRoomId:number, chatEntries:(string|number)[]) + { + this._data = [message, topicIndex, reportedUserId, reportedRoomId, chatEntries.length / 2, ...chatEntries]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/help/index.ts b/src/nitro/communication/messages/outgoing/help/index.ts new file mode 100644 index 00000000..7f5349c9 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/help/index.ts @@ -0,0 +1 @@ +export * from './CallForHelpMessageComposer'; diff --git a/src/nitro/communication/messages/outgoing/index.ts b/src/nitro/communication/messages/outgoing/index.ts index 851f55be..7cc0a193 100644 --- a/src/nitro/communication/messages/outgoing/index.ts +++ b/src/nitro/communication/messages/outgoing/index.ts @@ -12,7 +12,7 @@ export * from './gifts'; export * from './group'; export * from './groupforums'; export * from './handshake'; -export * from './helper'; +export * from './help'; export * from './inventory'; export * from './landingview'; export * from './marketplace'; @@ -24,4 +24,5 @@ export * from './quest'; export * from './room'; export * from './roomevents'; export * from './sound'; +export * from './talent'; export * from './user'; diff --git a/src/nitro/communication/messages/outgoing/moderation/GetCfhChatlogMessageComposer.ts b/src/nitro/communication/messages/outgoing/moderation/GetCfhChatlogMessageComposer.ts index ad124466..5e2ad992 100644 --- a/src/nitro/communication/messages/outgoing/moderation/GetCfhChatlogMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/moderation/GetCfhChatlogMessageComposer.ts @@ -5,9 +5,9 @@ export class GetCfhChatlogMessageComposer implements IMessageComposer; - constructor(k: number) + constructor(issueId: number) { - this._data = [k]; + this._data = [issueId]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/helper/TalentTrackComposer.ts b/src/nitro/communication/messages/outgoing/talent/TalentTrackComposer.ts similarity index 100% rename from src/nitro/communication/messages/outgoing/helper/TalentTrackComposer.ts rename to src/nitro/communication/messages/outgoing/talent/TalentTrackComposer.ts diff --git a/src/nitro/communication/messages/outgoing/helper/index.ts b/src/nitro/communication/messages/outgoing/talent/index.ts similarity index 100% rename from src/nitro/communication/messages/outgoing/helper/index.ts rename to src/nitro/communication/messages/outgoing/talent/index.ts diff --git a/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts b/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts index 98cd9c6e..564748cb 100644 --- a/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts @@ -20,30 +20,33 @@ export class IssueInfoMessageParser implements IMessageParser public parse(k:IMessageDataWrapper): boolean { - const _local_2: number = k.readInt(); - const _local_3: number = k.readInt(); - const _local_4: number = k.readInt(); - const _local_5: number = k.readInt(); - const _local_6: number = k.readInt(); - const _local_7: number = k.readInt(); - const _local_8: number = k.readInt(); - const _local_9: number = k.readInt(); - const _local_10: string = k.readString(); - const _local_11: number = k.readInt(); - const _local_12: string = k.readString(); - const _local_13: number = k.readInt(); - const _local_14: string = k.readString(); - const _local_15: string = k.readString(); - const _local_16: number = k.readInt(); - const _local_17: number = k.readInt(); - const _local_18:PatternMatchData[] = []; - let _local_19 = 0; - while(_local_19 < _local_17) + const issueId: number = k.readInt(); + const state: number = k.readInt(); + const categoryId: number = k.readInt(); + const reportedCategoryId: number = k.readInt(); + const issueAgeInMs: number = k.readInt(); + const priority: number = k.readInt(); + const groupingId: number = k.readInt(); + const reporterUserId: number = k.readInt(); + const reporterUsername: string = k.readString(); + const reportedUserId: number = k.readInt(); + const reportedUsername: string = k.readString(); + const pickerUserId: number = k.readInt(); + const pickerUsername: string = k.readString(); + const message: string = k.readString(); + const chatRecordId: number = k.readInt(); + + const patternsCount: number = k.readInt(); + const patterns:PatternMatchData[] = []; + + for(let i = 0; i < patternsCount; i++) { - _local_18.push(new PatternMatchData(k)); - _local_19++; + patterns.push(new PatternMatchData(k)); } - this._issueData = new IssueMessageData(_local_2, _local_3, _local_4, _local_5, _local_6, _local_7, _local_8, _local_9, _local_10, _local_11, _local_12, _local_13, _local_14, _local_15, _local_16, _local_18); + + this._issueData = new IssueMessageData(issueId, state, categoryId, reportedCategoryId, issueAgeInMs, + priority, groupingId, reporterUserId, reporterUsername, reportedUserId, reportedUsername, + pickerUserId, pickerUsername, message, chatRecordId, patterns); return true; } } diff --git a/src/nitro/communication/messages/parser/moderation/IssueMessageData.ts b/src/nitro/communication/messages/parser/moderation/IssueMessageData.ts index fd6d7b47..b4897653 100644 --- a/src/nitro/communication/messages/parser/moderation/IssueMessageData.ts +++ b/src/nitro/communication/messages/parser/moderation/IssueMessageData.ts @@ -26,24 +26,27 @@ export class IssueMessageData private _disposed: boolean = false; private _creationTimeInMilliseconds: number; - constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: number, _arg_5: number, _arg_6: number, _arg_7: number, _arg_8: number, _arg_9: string, _arg_10: number, _arg_11: string, _arg_12: number, _arg_13: string, _arg_14: string, _arg_15: number, _arg_16:PatternMatchData[]) + constructor(issueId: number, state: number, categoryId: number, reportedCategoryId: number, + issueAgeinMs: number, priority: number, groupingId: number, reporterUserId: number, reporterUsername: string, + reportedUserId: number, reportedUsername: string, pickerUserId: number, pickerUsername: string, message: string, + chatRecordId: number, patterns:PatternMatchData[]) { - this._issueId = k; - this._state = _arg_2; - this._categoryId = _arg_3; - this._reportedCategoryId = _arg_4; - this._issueAgeInMilliseconds = _arg_5; - this._priority = _arg_6; - this._groupingId = _arg_7; - this._reporterUserId = _arg_8; - this._reporterUserName = _arg_9; - this._reportedUserId = _arg_10; - this._reportedUserName = _arg_11; - this._pickerUserId = _arg_12; - this._pickerUserName = _arg_13; - this._message = _arg_14; - this._chatRecordId = _arg_15; - this._patterns = _arg_16; + this._issueId = issueId; + this._state = state; + this._categoryId = categoryId; + this._reportedCategoryId = reportedCategoryId; + this._issueAgeInMilliseconds = issueAgeinMs; + this._priority = priority; + this._groupingId = groupingId; + this._reporterUserId = reporterUserId; + this._reporterUserName = reporterUsername; + this._reportedUserId = reportedUserId; + this._reportedUserName = reportedUsername; + this._pickerUserId = pickerUserId; + this._pickerUserName = pickerUsername; + this._message = message; + this._chatRecordId = chatRecordId; + this._patterns = patterns; this._creationTimeInMilliseconds = Nitro.instance.time; //getTimer() }