Merge branch 'oobjectt-room-message-notification'

This commit is contained in:
dank074 2022-12-26 01:23:07 -06:00
commit 5701413029
6 changed files with 64 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -174,6 +174,7 @@ export class IncomingHeader
public static ROOM_SPECTATOR = 1033;
public static ROOM_THICKNESS = 3547;
public static ROOM_GET_FILTER_WORDS = 2937;
public static ROOM_MESSAGE_NOTIFICATION = 1634;
public static INFO_FEED_ENABLE = 3284;
public static SECURITY_MACHINE = 1488;
public static MYSTERY_BOX_KEYS = 2833;

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../../api';
import { MessageEvent } from '../../../../../../events';
import { RoomMessageNotificationMessageParser } from '../../../parser';
export class RoomMessageNotificationMessageEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, RoomMessageNotificationMessageParser);
}
public getParser(): RoomMessageNotificationMessageParser
{
return this.parser as RoomMessageNotificationMessageParser;
}
}

View File

@ -12,5 +12,6 @@ export * from './LoveLockFurniStartEvent';
export * from './OneWayDoorStatusMessageEvent';
export * from './RequestSpamWallPostItMessageEvent';
export * from './RoomDimmerPresetsMessageEvent';
export * from './RoomMessageNotificationMessageEvent';
export * from './wall';
export * from './youtube';

View File

@ -0,0 +1,43 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
export class RoomMessageNotificationMessageParser implements IMessageParser
{
private _roomId: number;
private _roomName: string;
private _messageCount: number;
public flush(): boolean
{
this._roomId = -1;
this._roomName = null;
this._messageCount = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._roomId = wrapper.readInt();
this._roomName = wrapper.readString();
this._messageCount = wrapper.readInt();
return true;
}
public get roomId(): number
{
return this._roomId;
}
public get roomName(): string
{
return this._roomName;
}
public get messageCount(): number
{
return this._messageCount;
}
}

View File

@ -13,5 +13,6 @@ export * from './OneWayDoorStatusMessageParser';
export * from './RequestSpamWallPostItMessageParser';
export * from './RoomDimmerPresetsMessageData';
export * from './RoomDimmerPresetsMessageParser';
export * from './RoomMessageNotificationMessageParser';
export * from './wall';
export * from './youtube';