mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
Add CustomUserNotificationMessageEvent
This commit is contained in:
parent
dcdbaf98cf
commit
4aad057e02
File diff suppressed because one or more lines are too long
@ -386,4 +386,5 @@ export class IncomingHeader
|
|||||||
public static NO_SUCH_FLAT = 84;
|
public static NO_SUCH_FLAT = 84;
|
||||||
public static ROOM_SETTINGS_ERROR = 2897;
|
public static ROOM_SETTINGS_ERROR = 2897;
|
||||||
public static SHOW_ENFORCE_ROOM_CATEGORY = 3896;
|
public static SHOW_ENFORCE_ROOM_CATEGORY = 3896;
|
||||||
|
public static CUSTOM_USER_NOTIFICATION = 909;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { CustomUserNotificationMessageParser } from '../../../parser/room/furniture/CustomUserNotificationMessageParser';
|
||||||
|
|
||||||
|
export class CustomUserNotificationMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, CustomUserNotificationMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): CustomUserNotificationMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as CustomUserNotificationMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
export * from './CustomUserNotificationMessageEvent';
|
||||||
export * from './DiceValueMessageEvent';
|
export * from './DiceValueMessageEvent';
|
||||||
export * from './floor';
|
export * from './floor';
|
||||||
export * from './FurnitureAliasesEvent';
|
export * from './FurnitureAliasesEvent';
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
||||||
|
|
||||||
|
export class CustomUserNotificationMessageParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _code: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._code = 0;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if (!wrapper) return false;
|
||||||
|
|
||||||
|
this._code = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get count(): number
|
||||||
|
{
|
||||||
|
return this._code;
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
export * from './CustomUserNotificationMessageParser';
|
||||||
export * from './DiceValueMessageParser';
|
export * from './DiceValueMessageParser';
|
||||||
export * from './floor';
|
export * from './floor';
|
||||||
export * from './FurnitureAliasesParser';
|
export * from './FurnitureAliasesParser';
|
||||||
|
Loading…
Reference in New Issue
Block a user