mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
#28 - Game2InArenaQueueMessageEvent and Game2StopCounterMessageEvent added
This commit is contained in:
parent
12a8362872
commit
072dd04816
File diff suppressed because one or more lines are too long
@ -35,6 +35,8 @@ export class IncomingHeader
|
||||
public static GAME_CENTER_ACHIEVEMENTS = 2265;
|
||||
public static GAME_CENTER_GAME_LIST = 222;
|
||||
public static GAME_CENTER_STATUS = 2893;
|
||||
public static GAME_CENTER_IN_ARENA_QUEUE = 872;
|
||||
public static GAME_CENTER_STOP_COUNTER = 3191;
|
||||
public static GAMESTATUSMESSAGE = 3805;
|
||||
public static GAMEACHIEVEMENTS = 1689;
|
||||
public static GAMEINVITE = 904;
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../../api';
|
||||
import { MessageEvent } from '../../../../../../events';
|
||||
import { Game2InArenaQueueMessageParser } from '../../../parser';
|
||||
|
||||
export class Game2InArenaQueueMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, Game2InArenaQueueMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): Game2InArenaQueueMessageParser
|
||||
{
|
||||
return this.parser as Game2InArenaQueueMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../../api';
|
||||
import { MessageEvent } from '../../../../../../events';
|
||||
import { Game2InArenaQueueMessageParser, Game2StopCounterMessageParser } from '../../../parser';
|
||||
|
||||
export class Game2StopCounterMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, Game2StopCounterMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): Game2InArenaQueueMessageParser
|
||||
{
|
||||
return this.parser as Game2InArenaQueueMessageParser;
|
||||
}
|
||||
}
|
@ -1 +1,3 @@
|
||||
export * from './Game2AccountGameStatusMessageEvent';
|
||||
export * from './Game2InArenaQueueMessageEvent';
|
||||
export * from './Game2StopCounterMessageEvent';
|
||||
|
@ -0,0 +1,27 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
||||
|
||||
export class Game2InArenaQueueMessageParser implements IMessageParser
|
||||
{
|
||||
private _position: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._position = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._position = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get position(): number
|
||||
{
|
||||
return this._position;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
||||
|
||||
export class Game2StopCounterMessageParser implements IMessageParser
|
||||
{
|
||||
public flush(): boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1 +1,3 @@
|
||||
export * from './Game2AccountGameStatusMessageParser';
|
||||
export * from './Game2InArenaQueueMessageParser';
|
||||
export * from './Game2StopCounterMessageParser';
|
||||
|
Loading…
Reference in New Issue
Block a user