Merge branch 'oobjectt-bot-force-open-context-menu'

This commit is contained in:
dank074 2022-12-27 01:32:48 -06:00
commit 4c3b4e07f5
6 changed files with 48 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -287,6 +287,7 @@ export class IncomingHeader
public static IN_CLIENT_LINK = 2023; public static IN_CLIENT_LINK = 2023;
public static BOT_COMMAND_CONFIGURATION = 1618; public static BOT_COMMAND_CONFIGURATION = 1618;
public static BOT_SKILL_LIST_UPDATE = 69; public static BOT_SKILL_LIST_UPDATE = 69;
public static BOT_FORCE_OPEN_CONTEXT_MENU = 296;
public static HAND_ITEM_RECEIVED = 354; public static HAND_ITEM_RECEIVED = 354;
public static PET_PLACING_ERROR = 2913; public static PET_PLACING_ERROR = 2913;
public static BOT_ERROR = 639; 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,2 +1,3 @@
export * from './BotCommandConfigurationEvent'; export * from './BotCommandConfigurationEvent';
export * from './BotForceOpenContextMenuEvent';
export * from './BotSkillListUpdateEvent'; export * from './BotSkillListUpdateEvent';

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,3 +1,4 @@
export * from './BotCommandConfigurationParser'; export * from './BotCommandConfigurationParser';
export * from './BotForceOpenContextMenuParser';
export * from './BotSkillData'; export * from './BotSkillData';
export * from './BotSkillListUpdateParser'; export * from './BotSkillListUpdateParser';