From 153873faebf4d73ae7f7c174d2e3856918b3189b Mon Sep 17 00:00:00 2001 From: object <110488133+oobjectt@users.noreply.github.com> Date: Sun, 26 Nov 2023 15:05:03 +0100 Subject: [PATCH] Navigator | Change name variables --- .../navigator/CancelEventMessageComposer.ts | 4 +-- .../CompetitionRoomsSearchMessageComposer.ts | 4 +-- .../DeleteFavouriteRoomMessageComposer.ts | 4 +-- .../navigator/EditEventMessageComposer.ts | 4 +-- ...ardToARandomPromotedRoomMessageComposer.ts | 4 +-- .../ForwardToSomeRoomMessageComposer.ts | 4 +-- .../GetOfficialRoomsMessageComposer.ts | 4 +-- .../GuildBaseSearchMessageComposer.ts | 4 +-- .../NavigatorCategoryListModeComposer.ts | 4 +-- .../PopularRoomsSearchMessageComposer.ts | 4 +-- .../navigator/RateFlatMessageComposer.ts | 4 +-- .../RoomAdEventTabAdClickedComposer.ts | 4 +-- .../navigator/RoomAdSearchMessageComposer.ts | 4 +-- .../RoomTextSearchMessageComposer.ts | 4 +-- ...msWithHighestScoreSearchMessageComposer.ts | 4 +-- .../SetRoomSessionTagsMessageComposer.ts | 4 +-- .../GuestRoomSearchResultMessageParser.ts | 3 +- .../navigator/RoomEventCancelMessageParser.ts | 1 - .../RoomThumbnailUpdateResultMessageParser.ts | 1 - .../utils/CategoriesWithVisitorCountData.ts | 10 +++---- .../navigator/utils/CompetitionRoomsData.ts | 14 ++++----- .../utils/GuestRoomSearchResultData.ts | 22 +++++++++----- .../navigator/utils/OfficialRoomEntryData.ts | 30 +++++++++++-------- .../parser/navigator/utils/RoomEventData.ts | 29 +++++++++++------- 24 files changed, 95 insertions(+), 79 deletions(-) diff --git a/src/nitro/communication/messages/outgoing/navigator/CancelEventMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/CancelEventMessageComposer.ts index 527d86c1..931a953d 100644 --- a/src/nitro/communication/messages/outgoing/navigator/CancelEventMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/CancelEventMessageComposer.ts @@ -4,9 +4,9 @@ export class CancelEventMessageComposer implements IMessageComposer; - constructor(k: number) + constructor(adId: number) { - this._data = [k]; + this._data = [adId]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/CompetitionRoomsSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/CompetitionRoomsSearchMessageComposer.ts index b5fb83bf..37a2fe1a 100644 --- a/src/nitro/communication/messages/outgoing/navigator/CompetitionRoomsSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/CompetitionRoomsSearchMessageComposer.ts @@ -4,9 +4,9 @@ export class CompetitionRoomsSearchMessageComposer implements IMessageComposer; - constructor(k: number, _arg_2: number) + constructor(goalId: number, pageIndex: number) { - this._data = [k, _arg_2]; + this._data = [goalId, pageIndex]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/DeleteFavouriteRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/DeleteFavouriteRoomMessageComposer.ts index 1d8c9518..ccff8e83 100644 --- a/src/nitro/communication/messages/outgoing/navigator/DeleteFavouriteRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/DeleteFavouriteRoomMessageComposer.ts @@ -4,9 +4,9 @@ export class DeleteFavouriteRoomMessageComposer implements IMessageComposer; - constructor(k: number) + constructor(flatId: number) { - this._data = [k]; + this._data = [flatId]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/EditEventMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/EditEventMessageComposer.ts index 8f1ecb91..62979eb9 100644 --- a/src/nitro/communication/messages/outgoing/navigator/EditEventMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/EditEventMessageComposer.ts @@ -4,9 +4,9 @@ export class EditEventMessageComposer implements IMessageComposer; - constructor(k: number, _arg_2: string, _arg_3: string) + constructor(adId: number, eventName: string, eventDesc: string) { - this._data = [k, _arg_2, _arg_3]; + this._data = [adId, eventName, eventDesc]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts index 4ddba7c2..e7721c24 100644 --- a/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/ForwardToARandomPromotedRoomMessageComposer.ts @@ -4,9 +4,9 @@ export class ForwardToARandomPromotedRoomMessageComposer implements IMessageComp { private _data: ConstructorParameters; - constructor(k: string) + constructor(flatId: string) { - this._data = [k]; + this._data = [flatId]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts index f86eb05e..7ad8d2a2 100644 --- a/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/ForwardToSomeRoomMessageComposer.ts @@ -4,9 +4,9 @@ export class ForwardToSomeRoomMessageComposer implements IMessageComposer; - constructor(k: string) + constructor(type: string) { - this._data = [k]; + this._data = [type]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts index 661e67cc..adb3d9e5 100644 --- a/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/GetOfficialRoomsMessageComposer.ts @@ -4,9 +4,9 @@ export class GetOfficialRoomsMessageComposer implements IMessageComposer; - constructor(k: number = 0) + constructor(adIndex: number = 0) { - this._data = [k]; + this._data = [adIndex]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts index cff4a232..134638ee 100644 --- a/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/GuildBaseSearchMessageComposer.ts @@ -4,9 +4,9 @@ export class GuildBaseSearchMessageComposer implements IMessageComposer; - constructor(k: number) + constructor(adIndex: number) { - this._data = [k]; + this._data = [adIndex]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoryListModeComposer.ts b/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoryListModeComposer.ts index 5b539d19..b716b98a 100644 --- a/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoryListModeComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/NavigatorCategoryListModeComposer.ts @@ -4,9 +4,9 @@ export class NavigatorCategoryListModeComposer implements IMessageComposer; - constructor(category: string, listmode: number) + constructor(category: string, listMode: number) { - this._data = [category, listmode]; + this._data = [category, listMode]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/PopularRoomsSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/PopularRoomsSearchMessageComposer.ts index a8a41794..f5cf829d 100644 --- a/src/nitro/communication/messages/outgoing/navigator/PopularRoomsSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/PopularRoomsSearchMessageComposer.ts @@ -4,9 +4,9 @@ export class PopularRoomsSearchMessageComposer implements IMessageComposer; - constructor(k: string, _arg_2: number) + constructor(search: string, adIndex: number) { - this._data = [k, _arg_2]; + this._data = [search, adIndex]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts index 173610b4..3be22597 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RateFlatMessageComposer.ts @@ -4,9 +4,9 @@ export class RateFlatMessageComposer implements IMessageComposer; - constructor(k: number) + constructor(flat: number) { - this._data = [k]; + this._data = [flat]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts index 3aee5676..b6e5d1ec 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RoomAdEventTabAdClickedComposer.ts @@ -4,9 +4,9 @@ export class RoomAdEventTabAdClickedComposer implements IMessageComposer; - constructor(k: number, _arg_2: string, _arg_3: number) + constructor(flatId: number, roomAdName: string, roomAdExpiresInMin: number) { - this._data = [k, _arg_2, _arg_3]; + this._data = [flatId, roomAdName, roomAdExpiresInMin]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts index 6d6534ec..6546cf5f 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RoomAdSearchMessageComposer.ts @@ -4,9 +4,9 @@ export class RoomAdSearchMessageComposer implements IMessageComposer; - constructor(k: number, _arg_2: number) + constructor(adIndex: number, searchState: number) { - this._data = [k, _arg_2]; + this._data = [adIndex, searchState]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomTextSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomTextSearchMessageComposer.ts index 98aeb37c..699cd2a4 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RoomTextSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RoomTextSearchMessageComposer.ts @@ -4,9 +4,9 @@ export class RoomTextSearchMessageComposer implements IMessageComposer; - constructor(k: string) + constructor(search: string) { - this._data = [k]; + this._data = [search]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts index c4ddee54..7d2b66bc 100644 --- a/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/RoomsWithHighestScoreSearchMessageComposer.ts @@ -4,9 +4,9 @@ export class RoomsWithHighestScoreSearchMessageComposer implements IMessageCompo { private _data: ConstructorParameters; - constructor(k: number) + constructor(adIndex: number) { - this._data = [k]; + this._data = [adIndex]; } public getMessageArray() diff --git a/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts b/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts index 26d50b02..903418c2 100644 --- a/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/navigator/SetRoomSessionTagsMessageComposer.ts @@ -4,9 +4,9 @@ export class SetRoomSessionTagsMessageComposer implements IMessageComposer; - constructor(k: string, _arg_2: string) + constructor(tag1: string, tag2: string) { - this._data = [k, _arg_2]; + this._data = [tag1, tag2]; } public getMessageArray() diff --git a/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts b/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts index 7d7c9029..195f36fa 100644 --- a/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/GuestRoomSearchResultMessageParser.ts @@ -3,11 +3,10 @@ import { GuestRoomSearchResultData } from './utils'; export class GuestRoomSearchResultMessageParser implements IMessageParser { - _data: GuestRoomSearchResultData; + private _data: GuestRoomSearchResultData; public flush(): boolean { - return true; } diff --git a/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts b/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts index 69b2e79e..e36bf891 100644 --- a/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/RoomEventCancelMessageParser.ts @@ -11,5 +11,4 @@ export class RoomEventCancelMessageParser implements IMessageParser { return true; } - } diff --git a/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts b/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts index de427bbe..a01b7990 100644 --- a/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/navigator/RoomThumbnailUpdateResultMessageParser.ts @@ -26,5 +26,4 @@ export class RoomThumbnailUpdateResultMessageParser implements IMessageParser { return this._resultCode; } - } diff --git a/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts b/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts index 741a2c34..6f4e1583 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/CategoriesWithVisitorCountData.ts @@ -5,18 +5,18 @@ export class CategoriesWithVisitorCountData private _categoryToCurrentUserCountMap: Map; private _categoryToMaxUserCountMap: Map; - constructor(k: IMessageDataWrapper) + constructor(wrapper: IMessageDataWrapper) { this._categoryToCurrentUserCountMap = new Map(); this._categoryToMaxUserCountMap = new Map(); - const count = k.readInt(); + const count = wrapper.readInt(); for(let i = 0; i < count; i++) { - const _local_4 = k.readInt(); - const _local_5 = k.readInt(); - const _local_6 = k.readInt(); + const _local_4 = wrapper.readInt(); + const _local_5 = wrapper.readInt(); + const _local_6 = wrapper.readInt(); this._categoryToCurrentUserCountMap.set(_local_4, _local_5); this._categoryToMaxUserCountMap.set(_local_4, _local_6); } diff --git a/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts b/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts index e5bbdef8..71fd8955 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/CompetitionRoomsData.ts @@ -6,16 +6,16 @@ export class CompetitionRoomsData private _pageIndex: number; private _pageCount: number; - constructor(k: IMessageDataWrapper, _arg_2: number = 0, _arg_3: number = 0) + constructor(wrapper: IMessageDataWrapper, goalId: number = 0, pageIndex: number = 0) { - this._goalId = _arg_2; - this._pageIndex = _arg_3; + this._goalId = goalId; + this._pageIndex = pageIndex; - if(k) + if(wrapper) { - this._goalId = k.readInt(); - this._pageIndex = k.readInt(); - this._pageCount = k.readInt(); + this._goalId = wrapper.readInt(); + this._pageIndex = wrapper.readInt(); + this._pageCount = wrapper.readInt(); } } diff --git a/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts b/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts index a8b4955c..79b09586 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/GuestRoomSearchResultData.ts @@ -10,20 +10,24 @@ export class GuestRoomSearchResultData private _ad: OfficialRoomEntryData; private _disposed: boolean; - constructor(k: IMessageDataWrapper) + constructor(wrapper: IMessageDataWrapper) { this._rooms = []; - this._searchType = k.readInt(); - this._searchParam = k.readString(); - const count = k.readInt(); + this._searchType = wrapper.readInt(); + this._searchParam = wrapper.readString(); + + const count = wrapper.readInt(); + for(let i = 0; i < count; i++) { - this._rooms.push(new RoomDataParser(k)); + this._rooms.push(new RoomDataParser(wrapper)); } - const hasAdditional = k.readBoolean(); + + const hasAdditional = wrapper.readBoolean(); + if(hasAdditional) { - this._ad = new OfficialRoomEntryData(k); + this._ad = new OfficialRoomEntryData(wrapper); } } @@ -33,7 +37,9 @@ export class GuestRoomSearchResultData { return; } + this._disposed = true; + if(this._rooms != null) { for(const k of this._rooms) @@ -41,11 +47,13 @@ export class GuestRoomSearchResultData k.flush(); } } + if(this._ad != null) { this._ad.dispose(); this._ad = null; } + this._rooms = null; } diff --git a/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts b/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts index bbaa75d3..22b894e0 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/OfficialRoomEntryData.ts @@ -21,30 +21,30 @@ export class OfficialRoomEntryData private _open: boolean; private _disposed: boolean; - constructor(k: IMessageDataWrapper) + constructor(wrapper: IMessageDataWrapper) { - this._index = k.readInt(); - this._popupCaption = k.readString(); - this._popupDesc = k.readString(); - this._showDetails = k.readInt() == 1; - this._picText = k.readString(); - this._picRef = k.readString(); - this._folderId = k.readInt(); - this._userCount = k.readInt(); - this._type = k.readInt(); + this._index = wrapper.readInt(); + this._popupCaption = wrapper.readString(); + this._popupDesc = wrapper.readString(); + this._showDetails = wrapper.readInt() == 1; + this._picText = wrapper.readString(); + this._picRef = wrapper.readString(); + this._folderId = wrapper.readInt(); + this._userCount = wrapper.readInt(); + this._type = wrapper.readInt(); if(this._type == OfficialRoomEntryData.TYPE_TAG) { - this._tag = k.readString(); + this._tag = wrapper.readString(); } else { if(this._type == OfficialRoomEntryData.TYPE_GUEST_ROOM) { - this._guestRoomData = new RoomDataParser(k); + this._guestRoomData = new RoomDataParser(wrapper); } else { - this._open = k.readBoolean(); + this._open = wrapper.readBoolean(); } } } @@ -55,7 +55,9 @@ export class OfficialRoomEntryData { return; } + this._disposed = true; + if(this._guestRoomData != null) { this._guestRoomData.flush(); @@ -139,10 +141,12 @@ export class OfficialRoomEntryData { return 0; } + if(this.type == OfficialRoomEntryData.TYPE_GUEST_ROOM) { return this._guestRoomData.maxUserCount; } + return 0; } } diff --git a/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts b/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts index 70a3c5e3..5ebc0af6 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/RoomEventData.ts @@ -14,28 +14,35 @@ export class RoomEventData private _expirationDate: Date; private _disposed: boolean; - constructor(k: IMessageDataWrapper) + constructor(wrapper: IMessageDataWrapper) { - this._adId = k.readInt(); - this._ownerAvatarId = k.readInt(); - this._ownerAvatarName = k.readString(); - this._flatId = k.readInt(); - this._eventType = k.readInt(); - this._eventName = k.readString(); - this._eventDescription = k.readString(); - const _local_2 = k.readInt(); - const _local_3 = k.readInt(); + this._adId = wrapper.readInt(); + this._ownerAvatarId = wrapper.readInt(); + this._ownerAvatarName = wrapper.readString(); + this._flatId = wrapper.readInt(); + this._eventType = wrapper.readInt(); + this._eventName = wrapper.readString(); + this._eventDescription = wrapper.readString(); + + const _local_2 = wrapper.readInt(); + const _local_3 = wrapper.readInt(); const _local_4: Date = new Date(); + let _local_5 = _local_4.getTime(); const _local_6 = ((_local_2 * 60) * 1000); + _local_5 = (_local_5 - _local_6); + const _local_7: Date = new Date(_local_5); this._creationTime = ((((((((_local_7.getDate() + '-') + _local_7.getMonth()) + '-') + _local_7.getFullYear()) + ' ') + _local_7.getHours()) + ':') + _local_7.getMinutes()); + let _local_8 = _local_4.getTime(); const _local_9 = ((_local_3 * 60) * 1000); + _local_8 = (_local_8 + _local_9); + this._expirationDate = new Date(_local_8); - this._categoryId = k.readInt(); + this._categoryId = wrapper.readInt(); } public dispose(): void