Merge branch 'oobjectt-trade-no-such-item'

This commit is contained in:
dank074 2022-12-26 01:30:59 -06:00
commit 11dbae0435
6 changed files with 37 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -191,6 +191,7 @@ export class IncomingHeader
public static TRADE_OPEN_FAILED = 217; public static TRADE_OPEN_FAILED = 217;
public static TRADE_OTHER_NOT_ALLOWED = 1254; public static TRADE_OTHER_NOT_ALLOWED = 1254;
public static TRADE_YOU_NOT_ALLOWED = 3058; public static TRADE_YOU_NOT_ALLOWED = 3058;
public static TRADE_NO_SUCH_ITEM = 2873;
public static UNIT = 374; public static UNIT = 374;
public static UNIT_CHANGE_NAME = 2182; public static UNIT_CHANGE_NAME = 2182;
public static UNIT_CHAT = 1446; public static UNIT_CHAT = 1446;

View File

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

View File

@ -3,6 +3,7 @@ export * from './TradingCloseEvent';
export * from './TradingCompletedEvent'; export * from './TradingCompletedEvent';
export * from './TradingConfirmationEvent'; export * from './TradingConfirmationEvent';
export * from './TradingListItemEvent'; export * from './TradingListItemEvent';
export * from './TradingNoSuchItemEvent';
export * from './TradingNotOpenEvent'; export * from './TradingNotOpenEvent';
export * from './TradingOpenEvent'; export * from './TradingOpenEvent';
export * from './TradingOpenFailedEvent'; export * from './TradingOpenFailedEvent';

View File

@ -0,0 +1,16 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
export class TradingNoSuchItemParser implements IMessageParser
{
public flush(): boolean
{
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
return true;
}
}

View File

@ -4,6 +4,7 @@ export * from './TradingCloseParser';
export * from './TradingCompletedParser'; export * from './TradingCompletedParser';
export * from './TradingConfirmationParser'; export * from './TradingConfirmationParser';
export * from './TradingListItemParser'; export * from './TradingListItemParser';
export * from './TradingNoSuchItemParser';
export * from './TradingNotOpenParser'; export * from './TradingNotOpenParser';
export * from './TradingOpenFailedParser'; export * from './TradingOpenFailedParser';
export * from './TradingOpenParser'; export * from './TradingOpenParser';