#28 - BotForceOpenContextMenuEvent added

This commit is contained in:
oobjectt 2022-12-25 18:47:35 +01:00
parent 26741b78a7
commit 0ea34bb99a
6 changed files with 48 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -277,6 +277,7 @@ export class IncomingHeader
public static REDEEM_VOUCHER_OK = 3336;
public static IN_CLIENT_LINK = 2023;
public static BOT_COMMAND_CONFIGURATION = 1618;
public static BOT_FORCE_OPEN_CONTEXT_MENU = 296;
public static HAND_ITEM_RECEIVED = 354;
public static PET_PLACING_ERROR = 2913;
public static BOT_ERROR = 639;

View File

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

View File

@ -1 +1,2 @@
export * from './BotCommandConfigurationEvent';
export * from './BotForceOpenContextMenuEvent';

View File

@ -0,0 +1,27 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
export class BotForceOpenContextMenuParser implements IMessageParser
{
private _botId: number;
public flush(): boolean
{
this._botId = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._botId = wrapper.readInt();
return true;
}
public get botId(): number
{
return this._botId;
}
}

View File

@ -1 +1,2 @@
export * from './BotCommandConfigurationParser';
export * from './BotForceOpenContextMenuParser';