mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
#28 - Game2JoiningGameFailedMessageEvent added
This commit is contained in:
parent
12a8362872
commit
6228c6d7ac
File diff suppressed because one or more lines are too long
@ -35,6 +35,7 @@ export class IncomingHeader
|
|||||||
public static GAME_CENTER_ACHIEVEMENTS = 2265;
|
public static GAME_CENTER_ACHIEVEMENTS = 2265;
|
||||||
public static GAME_CENTER_GAME_LIST = 222;
|
public static GAME_CENTER_GAME_LIST = 222;
|
||||||
public static GAME_CENTER_STATUS = 2893;
|
public static GAME_CENTER_STATUS = 2893;
|
||||||
|
public static GAME_CENTER_JOINING_FAILED = 1730;
|
||||||
public static GAMESTATUSMESSAGE = 3805;
|
public static GAMESTATUSMESSAGE = 3805;
|
||||||
public static GAMEACHIEVEMENTS = 1689;
|
public static GAMEACHIEVEMENTS = 1689;
|
||||||
public static GAMEINVITE = 904;
|
public static GAMEINVITE = 904;
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../../events';
|
||||||
|
import { Game2JoiningGameFailedMessageParser } from '../../../parser';
|
||||||
|
|
||||||
|
export class Game2JoiningGameFailedMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, Game2JoiningGameFailedMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): Game2JoiningGameFailedMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as Game2JoiningGameFailedMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
export * from './Game2AccountGameStatusMessageEvent';
|
export * from './Game2AccountGameStatusMessageEvent';
|
||||||
|
export * from './Game2JoiningGameFailedMessageEvent';
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
||||||
|
|
||||||
|
export class Game2JoiningGameFailedMessageParser implements IMessageParser
|
||||||
|
{
|
||||||
|
public static readonly KICKED: number = 1;
|
||||||
|
public static readonly DUPLICATE_MACHINEID: number = 2;
|
||||||
|
public static readonly INVITATION_REQUIRED: number = 3;
|
||||||
|
public static readonly NO_SPACE_IN_TEAM: number = 4;
|
||||||
|
public static readonly TEAM_NOT_FOUND: number = 5;
|
||||||
|
public static readonly USER_HAS_ACTIVE_INSTANCE: number = 6;
|
||||||
|
public static readonly USER_HAS_PENDING_INSTANCE_REQUEST: number = 7;
|
||||||
|
public static readonly USER_HAS_NO_FREE_GAMES_LEFT: number = 8;
|
||||||
|
|
||||||
|
private _reason: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._reason = -1;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._reason = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get reason(): number
|
||||||
|
{
|
||||||
|
return this._reason;
|
||||||
|
}
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
export * from './Game2AccountGameStatusMessageParser';
|
export * from './Game2AccountGameStatusMessageParser';
|
||||||
|
export * from './Game2JoiningGameFailedMessageParser';
|
||||||
|
Loading…
Reference in New Issue
Block a user