diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index 82db38e3..1a89dc9f 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -150,7 +150,6 @@ import { FurnitureFloorRemoveEvent } from './messages/incoming/room/furniture/fl import { FurnitureFloorUpdateEvent } from './messages/incoming/room/furniture/floor/FurnitureFloorUpdateEvent'; import { FurnitureAliasesEvent } from './messages/incoming/room/furniture/FurnitureAliasesEvent'; import { FurnitureDataEvent } from './messages/incoming/room/furniture/FurnitureDataEvent'; -import { FurniturePostItStickyPoleOpenEvent } from './messages/incoming/room/furniture/FurniturePostItStickyPoleOpenEvent'; import { FurnitureStackHeightEvent } from './messages/incoming/room/furniture/FurnitureStackHeightEvent'; import { GroupFurniContextMenuInfoMessageEvent } from './messages/incoming/room/furniture/GroupFurniContextMenuInfoMessageEvent'; import { ItemDataUpdateMessageEvent } from './messages/incoming/room/furniture/ItemDataUpdateMessageEvent'; @@ -158,6 +157,7 @@ import { LoveLockFurniFinishedEvent } from './messages/incoming/room/furniture/L import { LoveLockFurniFriendConfirmedEvent } from './messages/incoming/room/furniture/LoveLockFurniFriendConfirmedEvent'; import { LoveLockFurniStartEvent } from './messages/incoming/room/furniture/LoveLockFurniStartEvent'; import { OneWayDoorStatusMessageEvent } from './messages/incoming/room/furniture/OneWayDoorStatusMessageEvent'; +import { RequestSpamWallPostItMessageEvent } from './messages/incoming/room/furniture/RequestSpamWallPostItMessageEvent'; import { RoomDimmerPresetsEvent } from './messages/incoming/room/furniture/RoomDimmerPresetsMessageEvent'; import { FurnitureWallAddEvent } from './messages/incoming/room/furniture/wall/FurnitureWallAddEvent'; import { FurnitureWallEvent } from './messages/incoming/room/furniture/wall/FurnitureWallEvent'; @@ -402,6 +402,7 @@ import { PetRemoveComposer } from './messages/outgoing/room/engine/PetRemoveComp import { RemoveWallItemComposer } from './messages/outgoing/room/engine/RemoveWallItemComposer'; import { SetItemDataMessageComposer } from './messages/outgoing/room/engine/SetItemDataMessageComposer'; import { SetObjectDataMessageComposer } from './messages/outgoing/room/engine/SetObjectDataMessageComposer'; +import { AddSpamWallPostItMessageComposer } from './messages/outgoing/room/furniture/AddSpamWallPostItMessageComposer'; import { MoodlightSettingsComposer } from './messages/outgoing/room/furniture/dimmer/MoodlightSettingsComposer'; import { MoodlightSettingsSaveComposer } from './messages/outgoing/room/furniture/dimmer/MoodlightSettingsSaveComposer'; import { MoodlightTogggleStateComposer } from './messages/outgoing/room/furniture/dimmer/MoodlightTogggleStateComposer'; @@ -411,7 +412,6 @@ import { FurniturePickupComposer } from './messages/outgoing/room/furniture/Furn import { FurniturePlaceComposer } from './messages/outgoing/room/furniture/FurniturePlaceComposer'; import { FurniturePlacePaintComposer } from './messages/outgoing/room/furniture/FurniturePlacePaintComposer'; import { FurniturePostItPlaceComposer } from './messages/outgoing/room/furniture/FurniturePostItPlaceComposer'; -import { FurniturePostItSaveStickyPoleComposer } from './messages/outgoing/room/furniture/FurniturePostItSaveStickyPoleComposer'; import { FurnitureColorWheelComposer } from './messages/outgoing/room/furniture/logic/FurnitureColorWheelComposer'; import { FurnitureDiceActivateComposer } from './messages/outgoing/room/furniture/logic/FurnitureDiceActivateComposer'; import { FurnitureDiceDeactivateComposer } from './messages/outgoing/room/furniture/logic/FurnitureDiceDeactivateComposer'; @@ -657,7 +657,7 @@ export class NitroMessages implements IMessageConfiguration // INVENTORY this._events.set(IncomingHeader.ACHIEVEMENT_PROGRESSED, AchievementEvent); this._events.set(IncomingHeader.ACHIEVEMENT_LIST, AchievementsEvent); - this._events.set(IncomingHeader.USER_ACHIEVEMENT_SCORE,AchievementsScoreEvent); + this._events.set(IncomingHeader.USER_ACHIEVEMENT_SCORE, AchievementsScoreEvent); this._events.set(IncomingHeader.USER_EFFECT_ACTIVATE, AvatarEffectActivatedEvent); this._events.set(IncomingHeader.USER_EFFECT_LIST_ADD, AvatarEffectAddedEvent); this._events.set(IncomingHeader.USER_EFFECT_LIST_REMOVE, AvatarEffectExpiredEvent); @@ -825,7 +825,7 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.LOVELOCK_FURNI_START, LoveLockFurniStartEvent); this._events.set(IncomingHeader.OBJECTS_DATA_UPDATE, ObjectsDataUpdateEvent); this._events.set(IncomingHeader.FURNITURE_GROUP_CONTEXT_MENU_INFO, GroupFurniContextMenuInfoMessageEvent); - this._events.set(IncomingHeader.FURNITURE_POSTIT_STICKY_POLE_OPEN, FurniturePostItStickyPoleOpenEvent); + this._events.set(IncomingHeader.FURNITURE_POSTIT_STICKY_POLE_OPEN, RequestSpamWallPostItMessageEvent); this._events.set(IncomingHeader.ROOM_SPECTATOR, YouAreSpectatorMessageEvent); // ROOM SETTINGS @@ -1270,7 +1270,7 @@ export class NitroMessages implements IMessageConfiguration this._composers.set(OutgoingHeader.FURNITURE_PLACE, FurniturePlaceComposer); this._composers.set(OutgoingHeader.ITEM_PAINT, FurniturePlacePaintComposer); this._composers.set(OutgoingHeader.FURNITURE_POSTIT_PLACE, FurniturePostItPlaceComposer); - this._composers.set(OutgoingHeader.FURNITURE_POSTIT_SAVE_STICKY_POLE, FurniturePostItSaveStickyPoleComposer); + this._composers.set(OutgoingHeader.FURNITURE_POSTIT_SAVE_STICKY_POLE, AddSpamWallPostItMessageComposer); this._composers.set(OutgoingHeader.CONTROL_YOUTUBE_DISPLAY_PLAYBACK, ControlYoutubeDisplayPlaybackMessageComposer); this._composers.set(OutgoingHeader.GET_YOUTUBE_DISPLAY_STATUS, GetYoutubeDisplayStatusMessageComposer); this._composers.set(OutgoingHeader.SET_YOUTUBE_DISPLAY_PLAYLIST, SetYoutubeDisplayPlaylistMessageComposer); diff --git a/src/nitro/communication/messages/incoming/room/furniture/FurniturePostItStickyPoleOpenEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/FurniturePostItStickyPoleOpenEvent.ts deleted file mode 100644 index 6d723b02..00000000 --- a/src/nitro/communication/messages/incoming/room/furniture/FurniturePostItStickyPoleOpenEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { FurniturePostItStickyPoleOpenParser } from '../../../parser/room/furniture/FurniturePostItStickyPoleOpenParser'; - -export class FurniturePostItStickyPoleOpenEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, FurniturePostItStickyPoleOpenParser); - } - - public getParser(): FurniturePostItStickyPoleOpenParser - { - return this.parser as FurniturePostItStickyPoleOpenParser; - } -} diff --git a/src/nitro/communication/messages/incoming/room/furniture/RequestSpamWallPostItMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/RequestSpamWallPostItMessageEvent.ts new file mode 100644 index 00000000..110603aa --- /dev/null +++ b/src/nitro/communication/messages/incoming/room/furniture/RequestSpamWallPostItMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; +import { RequestSpamWallPostItMessageParser } from '../../../parser/room/furniture/RequestSpamWallPostItMessageParser'; + +export class RequestSpamWallPostItMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, RequestSpamWallPostItMessageParser); + } + + public getParser(): RequestSpamWallPostItMessageParser + { + return this.parser as RequestSpamWallPostItMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/room/furniture/index.ts b/src/nitro/communication/messages/incoming/room/furniture/index.ts index a866b849..1593c689 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/index.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/index.ts @@ -2,7 +2,6 @@ export * from './DiceValueMessageEvent'; export * from './floor'; export * from './FurnitureAliasesEvent'; export * from './FurnitureDataEvent'; -export * from './FurniturePostItStickyPoleOpenEvent'; export * from './FurnitureStackHeightEvent'; export * from './GroupFurniContextMenuInfoMessageEvent'; export * from './ItemDataUpdateMessageEvent'; @@ -10,6 +9,7 @@ export * from './LoveLockFurniFinishedEvent'; export * from './LoveLockFurniFriendConfirmedEvent'; export * from './LoveLockFurniStartEvent'; export * from './OneWayDoorStatusMessageEvent'; +export * from './RequestSpamWallPostItMessageEvent'; export * from './RoomDimmerPresetsMessageData'; export * from './RoomDimmerPresetsMessageEvent'; export * from './wall'; diff --git a/src/nitro/communication/messages/outgoing/room/furniture/AddSpamWallPostItMessageComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/AddSpamWallPostItMessageComposer.ts new file mode 100644 index 00000000..c2de432b --- /dev/null +++ b/src/nitro/communication/messages/outgoing/room/furniture/AddSpamWallPostItMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; + +export class AddSpamWallPostItMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(itemId: number, location: string, colorHex: string, message: string) + { + this._data = [itemId, location, colorHex, message]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/room/furniture/FurniturePostItSaveStickyPoleComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/FurniturePostItSaveStickyPoleComposer.ts deleted file mode 100644 index 162b446e..00000000 --- a/src/nitro/communication/messages/outgoing/room/furniture/FurniturePostItSaveStickyPoleComposer.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer'; - -export class FurniturePostItSaveStickyPoleComposer implements IMessageComposer> -{ - private _data: ConstructorParameters; - - constructor(itemId: number, wallLocation: string, color: string, text: string) - { - this._data = [ itemId, wallLocation, color, text ]; - } - - public getMessageArray() - { - return this._data; - } - - public dispose(): void - { - return; - } -} diff --git a/src/nitro/communication/messages/outgoing/room/furniture/index.ts b/src/nitro/communication/messages/outgoing/room/furniture/index.ts index 6d5a8620..649a277b 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/index.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/index.ts @@ -1,3 +1,4 @@ +export * from './AddSpamWallPostItMessageComposer'; export * from './dimmer'; export * from './floor'; export * from './FurnitureAliasesComposer'; @@ -6,7 +7,6 @@ export * from './FurniturePickupComposer'; export * from './FurniturePlaceComposer'; export * from './FurniturePlacePaintComposer'; export * from './FurniturePostItPlaceComposer'; -export * from './FurniturePostItSaveStickyPoleComposer'; export * from './logic'; export * from './mannequin'; export * from './presents'; diff --git a/src/nitro/communication/messages/parser/room/furniture/FurniturePostItStickyPoleOpenParser.ts b/src/nitro/communication/messages/parser/room/furniture/FurniturePostItStickyPoleOpenParser.ts deleted file mode 100644 index e44c05a4..00000000 --- a/src/nitro/communication/messages/parser/room/furniture/FurniturePostItStickyPoleOpenParser.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; - -export class FurniturePostItStickyPoleOpenParser implements IMessageParser -{ - private _itemId: number; - - public flush(): boolean - { - this._itemId = 0; - - return true; - } - - public parse(wrapper: IMessageDataWrapper): boolean - { - if(!wrapper) return false; - - this._itemId = parseInt(wrapper.readString()); - - return true; - } - - public get furnitureId(): number - { - return this._itemId; - } -} diff --git a/src/nitro/communication/messages/parser/room/furniture/RequestSpamWallPostItMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/RequestSpamWallPostItMessageParser.ts new file mode 100644 index 00000000..af0f06d7 --- /dev/null +++ b/src/nitro/communication/messages/parser/room/furniture/RequestSpamWallPostItMessageParser.ts @@ -0,0 +1,35 @@ +import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; + +export class RequestSpamWallPostItMessageParser implements IMessageParser +{ + private _itemId: number; + private _location: string; + + public flush(): boolean + { + this._itemId = -1; + this._location = ''; + + return true; + } + + public parse(wrapper: IMessageDataWrapper): boolean + { + if (!wrapper) return false; + + this._itemId = wrapper.readInt(); + this._location = wrapper.readString(); + + return true; + } + + public get itemId(): number + { + return this._itemId; + } + + public get location(): string + { + return this._location; + } +} diff --git a/src/nitro/communication/messages/parser/room/furniture/index.ts b/src/nitro/communication/messages/parser/room/furniture/index.ts index 92946c41..31a0e8a8 100644 --- a/src/nitro/communication/messages/parser/room/furniture/index.ts +++ b/src/nitro/communication/messages/parser/room/furniture/index.ts @@ -9,6 +9,7 @@ export * from './LoveLockFurniFinishedParser'; export * from './LoveLockFurniFriendConfirmedParser'; export * from './LoveLockFurniStartParser'; export * from './OneWayDoorStatusMessageParser'; +export * from './RequestSpamWallPostItMessageParser'; export * from './RoomDimmerPresetsMessageParser'; export * from './wall'; export * from './youtube'; diff --git a/src/nitro/room/IRoomEngine.ts b/src/nitro/room/IRoomEngine.ts index 0759aa0c..77be01ae 100644 --- a/src/nitro/room/IRoomEngine.ts +++ b/src/nitro/room/IRoomEngine.ts @@ -76,6 +76,8 @@ export interface IRoomEngine extends INitroManager getFurnitureWallImage(typeId: number, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor?: number, extras?: string, state?: number, frameCount?: number): ImageResult; getRoomObjectImage(roomId: number, objectId: number, category: number, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor?: number): ImageResult; getRoomObjectPetImage(typeId: number, paletteId: number, color: number, direction: IVector3D, scale: number, listener: IGetImageListener, headOnly?: boolean, bgColor?: number, customParts?: PetCustomPart[], posture?: string): ImageResult; + getFurnitureFloorName(typeId: number): string; + getFurnitureWallName(typeId: number, extra?: string): string; selectRoomObject(roomId: number, objectId: number, objectCategory: number): void; setSelectedAvatar(roomId: number, objectId: number): void; cancelRoomObjectInsert(): void;