#28 - TradingNoSuchItemEvent added

This commit is contained in:
oobjectt 2022-12-24 16:53:36 +01:00
parent 26741b78a7
commit 83028f1de8
6 changed files with 37 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -184,6 +184,7 @@ export class IncomingHeader
public static TRADE_OPEN_FAILED = 217;
public static TRADE_OTHER_NOT_ALLOWED = 2154;
public static TRADE_YOU_NOT_ALLOWED = 3058;
public static TRADE_NO_SUCH_ITEM = 2873;
public static UNIT = 374;
public static UNIT_CHANGE_NAME = 2182;
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 './TradingConfirmationEvent';
export * from './TradingListItemEvent';
export * from './TradingNoSuchItemEvent';
export * from './TradingNotOpenEvent';
export * from './TradingOpenEvent';
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 './TradingConfirmationParser';
export * from './TradingListItemParser';
export * from './TradingNoSuchItemParser';
export * from './TradingNotOpenParser';
export * from './TradingOpenFailedParser';
export * from './TradingOpenParser';