From fd2413d299ca31d90260da942f4ae988c02c3d73 Mon Sep 17 00:00:00 2001 From: Dank074 Date: Wed, 23 Jun 2021 18:34:49 -0500 Subject: [PATCH] fixed RoomSessionPetBreedingResultEvent vars --- .../room/pet/PetBreedingResultData.ts | 56 +++++++++++++++++++ .../messages/incoming/room/pet/index.ts | 1 + ...{RoomChatParser.ts => RoomChatSettings.ts} | 26 ++++----- .../room/data/RoomChatSettingsParser.ts | 10 ++-- .../parser/room/data/RoomInfoParser.ts | 8 +-- .../parser/room/data/RoomSettingsParser.ts | 10 ++-- .../messages/parser/room/data/index.ts | 2 +- .../FurnitureHabboWheelVisualization.ts | 6 +- .../FurnitureMannequinVisualization.ts | 12 ++-- .../FurnitureValRandomizerVisualization.ts | 14 ++--- .../RoomSessionPetBreedingResultEvent.ts | 19 ++++--- .../events/RoomSessionPetInfoUpdateEvent.ts | 4 +- .../RoomSessionUserFigureUpdateEvent.ts | 8 +-- 13 files changed, 117 insertions(+), 59 deletions(-) create mode 100644 src/nitro/communication/messages/incoming/room/pet/PetBreedingResultData.ts rename src/nitro/communication/messages/parser/room/data/{RoomChatParser.ts => RoomChatSettings.ts} (69%) diff --git a/src/nitro/communication/messages/incoming/room/pet/PetBreedingResultData.ts b/src/nitro/communication/messages/incoming/room/pet/PetBreedingResultData.ts new file mode 100644 index 00000000..293d7133 --- /dev/null +++ b/src/nitro/communication/messages/incoming/room/pet/PetBreedingResultData.ts @@ -0,0 +1,56 @@ +export class PetBreedingResultData +{ + private _stuffId: number; + private _classId: number; + private _productCode: string; + private _userId: number; + private _userName: string; + private _rarityLevel: number; + private _hasMutation: boolean; + + constructor(stuffId: number, classId: number, productCode: string, userId: number, userName: string, rarityLevel: number, hasMutation: boolean) + { + this._stuffId = stuffId; + this._classId = classId; + this._productCode = productCode; + this._userId = userId; + this._userName = userName; + this._rarityLevel = rarityLevel; + this._hasMutation = hasMutation; + } + + public get stuffId(): number + { + return this._stuffId; + } + + public get classId(): number + { + return this._classId; + } + + public get productCode(): string + { + return this._productCode; + } + + public get userId(): number + { + return this._userId; + } + + public get userName(): string + { + return this._userName; + } + + public get rarityLevel(): number + { + return this._rarityLevel; + } + + public get hasMutation(): boolean + { + return this._hasMutation; + } +} diff --git a/src/nitro/communication/messages/incoming/room/pet/index.ts b/src/nitro/communication/messages/incoming/room/pet/index.ts index bdc9ea4a..a4e9295d 100644 --- a/src/nitro/communication/messages/incoming/room/pet/index.ts +++ b/src/nitro/communication/messages/incoming/room/pet/index.ts @@ -1,4 +1,5 @@ export * from './BreedingPetInfo'; +export * from './PetBreedingResultData'; export * from './PetFigureUpdateEvent'; export * from './PetInfoEvent'; export * from './RarityCategoryData'; diff --git a/src/nitro/communication/messages/parser/room/data/RoomChatParser.ts b/src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts similarity index 69% rename from src/nitro/communication/messages/parser/room/data/RoomChatParser.ts rename to src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts index 8bbfb177..0d33983f 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomChatParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts @@ -1,18 +1,18 @@ import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; -export class RoomChatParser +export class RoomChatSettings { - public static _Str_19408: number = 0; - public static _Str_12787: number = 1; - public static _Str_16907: number = 0; - public static _Str_12581: number = 1; - public static _Str_16484: number = 2; - public static _Str_18404: number = 0; - public static _Str_17874: number = 1; - public static _Str_16469: number = 2; - public static _Str_21099: number = 0; - public static _Str_20763: number = 1; - public static _Str_22060: number = 2; + public static CHAT_MODE_FREE_FLOW: number = 0; + public static CHAT_MODE_LINE_BY_LINE: number = 1; + public static CHAT_BUBBLE_WIDTH_WIDE: number = 0; + public static CHAT_BUBBLE_WIDTH_NORMAL: number = 1; + public static CHAT_BUBBLE_WIDTH_THIN: number = 2; + public static CHAT_SCROLL_SPEED_FAST: number = 0; + public static CHAT_SCROLL_SPEED_NORMAL: number = 1; + public static CHAT_SCROLL_SPEED_SLOW: number = 2; + public static FLOOD_FILTER_STRICT: number = 0; + public static FLOOD_FILTER_NORMAL: number = 1; + public static FLOOD_FILTER_LOOSE: number = 2; private _mode: number; private _weight: number; @@ -75,4 +75,4 @@ export class RoomChatParser { return this._protection; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts b/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts index 14da2e95..07dac98d 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomChatSettingsParser.ts @@ -1,10 +1,10 @@ import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser'; -import { RoomChatParser } from './RoomChatParser'; +import { RoomChatSettings } from './RoomChatSettings'; export class RoomChatSettingsParser implements IMessageParser { - private _chat: RoomChatParser; + private _chat: RoomChatSettings; public flush(): boolean { @@ -17,13 +17,13 @@ export class RoomChatSettingsParser implements IMessageParser { if(!wrapper) return false; - this._chat = new RoomChatParser(wrapper); + this._chat = new RoomChatSettings(wrapper); return true; } - public get chat(): RoomChatParser + public get chat(): RoomChatSettings { return this._chat; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts b/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts index 73a8dc1f..ea790e81 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts @@ -1,6 +1,6 @@ import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser'; -import { RoomChatParser } from './RoomChatParser'; +import { RoomChatSettings } from './RoomChatSettings'; import { RoomDataParser } from './RoomDataParser'; import { RoomModerationParser } from './RoomModerationParser'; @@ -12,7 +12,7 @@ export class RoomInfoParser implements IMessageParser private _data: RoomDataParser; private _isGroupMember: boolean; private _moderation: RoomModerationParser; - private _chat: RoomChatParser; + private _chat: RoomChatSettings; public flush(): boolean { @@ -39,7 +39,7 @@ export class RoomInfoParser implements IMessageParser this.data.allInRoomMuted = wrapper.readBoolean(); this._moderation = new RoomModerationParser(wrapper); this.data.canMute = wrapper.readBoolean(); - this._chat = new RoomChatParser(wrapper); + this._chat = new RoomChatSettings(wrapper); return true; } @@ -69,7 +69,7 @@ export class RoomInfoParser implements IMessageParser return this._moderation; } - public get chat(): RoomChatParser + public get chat(): RoomChatSettings { return this._chat; } diff --git a/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts b/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts index 9c1266d2..c237f445 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts @@ -1,6 +1,6 @@ import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser'; -import { RoomChatParser } from './RoomChatParser'; +import { RoomChatSettings } from './RoomChatSettings'; import { RoomModerationParser } from './RoomModerationParser'; export class RoomSettingsParser implements IMessageParser @@ -20,7 +20,7 @@ export class RoomSettingsParser implements IMessageParser private _hideWalls: number; private _thicknessWall: number; private _thicknessFloor: number; - private _chat: RoomChatParser; + private _chat: RoomChatSettings; private _moderation: RoomModerationParser; public flush(): boolean @@ -51,7 +51,7 @@ export class RoomSettingsParser implements IMessageParser this._hideWalls = wrapper.readInt(); this._thicknessWall = wrapper.readInt(); this._thicknessFloor = wrapper.readInt(); - this._chat = new RoomChatParser(wrapper); + this._chat = new RoomChatSettings(wrapper); wrapper.readBoolean(); this._moderation = new RoomModerationParser(wrapper); @@ -151,7 +151,7 @@ export class RoomSettingsParser implements IMessageParser return this._thicknessFloor; } - public get chatSettings(): RoomChatParser + public get chatSettings(): RoomChatSettings { return this._chat; } @@ -160,4 +160,4 @@ export class RoomSettingsParser implements IMessageParser { return this._moderation; } -} \ No newline at end of file +} diff --git a/src/nitro/communication/messages/parser/room/data/index.ts b/src/nitro/communication/messages/parser/room/data/index.ts index 8ae78e3e..c11bdf57 100644 --- a/src/nitro/communication/messages/parser/room/data/index.ts +++ b/src/nitro/communication/messages/parser/room/data/index.ts @@ -1,4 +1,4 @@ -export * from './RoomChatParser'; +export * from './RoomChatSettings'; export * from './RoomChatSettingsParser'; export * from './RoomDataParser'; export * from './RoomInfoOwnerParser'; diff --git a/src/nitro/room/object/visualization/furniture/FurnitureHabboWheelVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureHabboWheelVisualization.ts index 3c3f7b8e..13c14e70 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureHabboWheelVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureHabboWheelVisualization.ts @@ -4,8 +4,8 @@ export class FurnitureHabboWheelVisualization extends FurnitureAnimatedVisualiza { private static ANIMATION_ID_OFFSET_SLOW1: number = 10; private static ANIMATION_ID_OFFSET_SLOW2: number = 20; - private static _Str_7627: number = 31; - private static ANIMATION_ID_ROLL: number = 32; + private static ANIMATION_ID_START_ROLL: number = 31; + private static ANIMATION_ID_ROLL: number = 32; private _stateQueue: number[]; private _running: boolean; @@ -27,7 +27,7 @@ export class FurnitureHabboWheelVisualization extends FurnitureAnimatedVisualiza this._running = true; this._stateQueue = []; - this._stateQueue.push(FurnitureHabboWheelVisualization._Str_7627); + this._stateQueue.push(FurnitureHabboWheelVisualization.ANIMATION_ID_START_ROLL); this._stateQueue.push(FurnitureHabboWheelVisualization.ANIMATION_ID_ROLL); return; diff --git a/src/nitro/room/object/visualization/furniture/FurnitureMannequinVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureMannequinVisualization.ts index 0c9d88a8..c88030bb 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureMannequinVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureMannequinVisualization.ts @@ -112,9 +112,9 @@ export class FurnitureMannequinVisualization extends FurnitureVisualization impl if(this._dynamicAssetName) this.asset.disposeAsset(this._dynamicAssetName); - this.asset.addAsset(this._Str_10185(), avatarImage.getImage(AvatarSetType.FULL, false, 1, false), true); + this.asset.addAsset(this.getAvatarAssetName(), avatarImage.getImage(AvatarSetType.FULL, false, 1, false), true); - this._dynamicAssetName = this._Str_10185(); + this._dynamicAssetName = this.getAvatarAssetName(); this._needsUpdate = true; avatarImage.dispose(); @@ -124,10 +124,10 @@ export class FurnitureMannequinVisualization extends FurnitureVisualization impl private avatarExists(): boolean { - return (this._figure && (this.getAsset(this._Str_10185()) !== null)); + return (this._figure && (this.getAsset(this.getAvatarAssetName()) !== null)); } - private _Str_10185(): string + private getAvatarAssetName(): string { return (((((('mannequin_' + this._figure) + '_') + this._mannequinScale) + '_') + this.direction) + '_') + this.object.id; } @@ -143,7 +143,7 @@ export class FurnitureMannequinVisualization extends FurnitureVisualization impl if(this._figure && (tag === FurnitureMannequinVisualization.AVATAR_IMAGE_SPRITE_TAG) && this.avatarExists()) { - return this._Str_10185(); + return this.getAvatarAssetName(); } return super.getSpriteAssetName(scale, layerId); @@ -171,4 +171,4 @@ export class FurnitureMannequinVisualization extends FurnitureVisualization impl { return this._disposed; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/visualization/furniture/FurnitureValRandomizerVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureValRandomizerVisualization.ts index c2eb8cc0..371418ed 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureValRandomizerVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureValRandomizerVisualization.ts @@ -4,9 +4,9 @@ export class FurnitureValRandomizerVisualization extends FurnitureAnimatedVisual { private static ANIMATION_ID_OFFSET_SLOW1: number = 20; private static ANIMATION_ID_OFFSET_SLOW2: number = 10; - private static _Str_7627: number = 31; - private static ANIMATION_ID_ROLL: number = 32; - private static _Str_11236: number = 30; + private static ANIMATION_ID_START_ROLL: number = 31; + private static ANIMATION_ID_ROLL: number = 32; + private static ANIMATION_ID_OFF: number = 30; private _stateQueue: number[]; private _running: boolean; @@ -18,7 +18,7 @@ export class FurnitureValRandomizerVisualization extends FurnitureAnimatedVisual this._stateQueue = []; this._running = false; - super.setAnimation(FurnitureValRandomizerVisualization._Str_11236); + super.setAnimation(FurnitureValRandomizerVisualization.ANIMATION_ID_OFF); } protected setAnimation(animationId: number): void @@ -30,7 +30,7 @@ export class FurnitureValRandomizerVisualization extends FurnitureAnimatedVisual this._running = true; this._stateQueue = []; - this._stateQueue.push(FurnitureValRandomizerVisualization._Str_7627); + this._stateQueue.push(FurnitureValRandomizerVisualization.ANIMATION_ID_START_ROLL); this._stateQueue.push(FurnitureValRandomizerVisualization.ANIMATION_ID_ROLL); return; @@ -55,12 +55,12 @@ export class FurnitureValRandomizerVisualization extends FurnitureAnimatedVisual this._stateQueue.push(FurnitureValRandomizerVisualization.ANIMATION_ID_OFFSET_SLOW2 + animationId); } - this._stateQueue.push(FurnitureValRandomizerVisualization._Str_11236); + this._stateQueue.push(FurnitureValRandomizerVisualization.ANIMATION_ID_OFF); return; } - super.setAnimation(FurnitureValRandomizerVisualization._Str_11236); + super.setAnimation(FurnitureValRandomizerVisualization.ANIMATION_ID_OFF); } } diff --git a/src/nitro/session/events/RoomSessionPetBreedingResultEvent.ts b/src/nitro/session/events/RoomSessionPetBreedingResultEvent.ts index bef904fc..634eacb4 100644 --- a/src/nitro/session/events/RoomSessionPetBreedingResultEvent.ts +++ b/src/nitro/session/events/RoomSessionPetBreedingResultEvent.ts @@ -1,28 +1,29 @@ -import { IRoomSession } from '../IRoomSession'; +import { PetBreedingResultData } from '../../communication/messages/incoming/room/pet/PetBreedingResultData'; +import { IRoomSession } from '../IRoomSession'; import { RoomSessionEvent } from './RoomSessionEvent'; export class RoomSessionPetBreedingResultEvent extends RoomSessionEvent { - public static RSPFUE_PET_BREEDING_RESULT: string = 'RSPFUE_PET_BREEDING_RESULT'; + public static PET_BREEDING_RESULT: string = 'RSPFUE_PET_BREEDING_RESULT'; - private _resultData: any; //PetInfoMessageParser - private _otherResultData: any; + private _resultData: PetBreedingResultData; + private _otherResultData: PetBreedingResultData; - constructor(k: IRoomSession, _arg_2: any, _arg_3: any) + constructor(k: IRoomSession, _arg_2: PetBreedingResultData, _arg_3: PetBreedingResultData) { - super(RoomSessionPetBreedingResultEvent.RSPFUE_PET_BREEDING_RESULT, k); + super(RoomSessionPetBreedingResultEvent.PET_BREEDING_RESULT, k); this._resultData = _arg_2; this._otherResultData = _arg_3; } - public get _Str_3713(): any + public get resultData(): PetBreedingResultData { return this._resultData; } - public get _Str_5840(): any + public get otherResultData(): PetBreedingResultData { return this._otherResultData; } -} \ No newline at end of file +} diff --git a/src/nitro/session/events/RoomSessionPetInfoUpdateEvent.ts b/src/nitro/session/events/RoomSessionPetInfoUpdateEvent.ts index a40f31b3..3be83e79 100644 --- a/src/nitro/session/events/RoomSessionPetInfoUpdateEvent.ts +++ b/src/nitro/session/events/RoomSessionPetInfoUpdateEvent.ts @@ -15,8 +15,8 @@ export class RoomSessionPetInfoUpdateEvent extends RoomSessionEvent this._petInfo = _arg_2; } - public get _Str_24727():RoomPetData + public get petInfo():RoomPetData { return this._petInfo; } -} \ No newline at end of file +} diff --git a/src/nitro/session/events/RoomSessionUserFigureUpdateEvent.ts b/src/nitro/session/events/RoomSessionUserFigureUpdateEvent.ts index 15bf7b23..239f8b9e 100644 --- a/src/nitro/session/events/RoomSessionUserFigureUpdateEvent.ts +++ b/src/nitro/session/events/RoomSessionUserFigureUpdateEvent.ts @@ -3,7 +3,7 @@ import { RoomSessionEvent } from './RoomSessionEvent'; export class RoomSessionUserFigureUpdateEvent extends RoomSessionEvent { - public static RSUBE_FIGURE: string = 'RSUBE_FIGURE'; + public static USER_FIGURE: string = 'RSUBE_FIGURE'; private _userId: number = 0; private _figure: string = ''; @@ -13,7 +13,7 @@ export class RoomSessionUserFigureUpdateEvent extends RoomSessionEvent constructor(k: IRoomSession, _arg_2: number, _arg_3: string, _arg_4: string, _arg_5: string, _arg_6: number) { - super(RoomSessionUserFigureUpdateEvent.RSUBE_FIGURE, k); + super(RoomSessionUserFigureUpdateEvent.USER_FIGURE, k); this._userId = _arg_2; this._figure = _arg_3; this._gender = _arg_4; @@ -36,7 +36,7 @@ export class RoomSessionUserFigureUpdateEvent extends RoomSessionEvent return this._gender; } - public get _Str_9690(): string + public get customInfo(): string { return this._customInfo; } @@ -45,4 +45,4 @@ export class RoomSessionUserFigureUpdateEvent extends RoomSessionEvent { return this._achievementScore; } -} \ No newline at end of file +}