Merge branch 'notification-element-pointer' of https://github.com/oobjectt/nitro-renderer into oobjectt-notification-element-pointer

This commit is contained in:
dank074 2023-01-04 00:41:11 -06:00
commit 23d72b4c3d
6 changed files with 47 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -123,6 +123,7 @@ export class IncomingHeader
public static GUEST_ROOM_SEARCH_RESULT = 52;
public static NOTIFICATION_LIST = 1992;
public static NOTIFICATION_SIMPLE_ALERT = 5100;
public static NOTIFICATION_ELEMENT_POINTER = 1787;
public static PET_FIGURE_UPDATE = 1924;
public static PET_INFO = 2901;
public static PET_TRAINING_PANEL = 1164;

View File

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

View File

@ -3,6 +3,7 @@ export * from './ActivityPointNotificationMessageEvent';
export * from './BotErrorEvent';
export * from './ClubGiftNotificationEvent';
export * from './ConnectionErrorEvent';
export * from './ElementPointerMessageEvent';
export * from './HabboBroadcastMessageEvent';
export * from './HotelWillShutdownEvent';
export * from './InfoFeedEnableMessageEvent';

View File

@ -0,0 +1,26 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
export class ElementPointerMessageParser implements IMessageParser
{
private _key: string;
public flush(): boolean
{
this._key = null;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._key = wrapper.readString();
return true;
}
public get key(): string
{
return this._key;
}
}

View File

@ -4,6 +4,7 @@ export * from './ActivityPointNotificationParser';
export * from './BotErrorEventParser';
export * from './ClubGiftNotificationParser';
export * from './ConnectionErrorMessageParser';
export * from './ElementPointerMessageParser';
export * from './HabboBroadcastMessageParser';
export * from './HotelWillShutdownParser';
export * from './InfoFeedEnableMessageParser';