mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 09:20:51 +01:00
Merge branch 'room-message-notification' of https://github.com/oobjectt/nitro-renderer into oobjectt-room-message-notification
This commit is contained in:
commit
bc1f6b86f0
File diff suppressed because one or more lines are too long
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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';
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user