Merge branch 'incoming-game2-joining-failed' of https://github.com/oobjectt/nitro-renderer into oobjectt-incoming-game2-joining-failed

This commit is contained in:
dank074 2023-01-04 00:55:01 -06:00
commit c020f2ccf0
6 changed files with 57 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -40,6 +40,7 @@ export class IncomingHeader
public static GAME_CENTER_USER_LEFT_GAME = 3138; public static GAME_CENTER_USER_LEFT_GAME = 3138;
public static GAME_CENTER_DIRECTORY_STATUS = 2246; public static GAME_CENTER_DIRECTORY_STATUS = 2246;
public static GAME_CENTER_STARTING_GAME_FAILED = 2142; public static GAME_CENTER_STARTING_GAME_FAILED = 2142;
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;

View File

@ -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;
}
}

View File

@ -1,6 +1,7 @@
export * from './Game2AccountGameStatusMessageEvent'; export * from './Game2AccountGameStatusMessageEvent';
export * from './Game2GameDirectoryStatusMessageEvent'; export * from './Game2GameDirectoryStatusMessageEvent';
export * from './Game2InArenaQueueMessageEvent'; export * from './Game2InArenaQueueMessageEvent';
export * from './Game2JoiningGameFailedMessageEvent';
export * from './Game2StartingGameFailedMessageEvent'; export * from './Game2StartingGameFailedMessageEvent';
export * from './Game2StopCounterMessageEvent'; export * from './Game2StopCounterMessageEvent';
export * from './Game2UserLeftGameMessageEvent'; export * from './Game2UserLeftGameMessageEvent';

View File

@ -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;
}
}

View File

@ -1,6 +1,7 @@
export * from './Game2AccountGameStatusMessageParser'; export * from './Game2AccountGameStatusMessageParser';
export * from './Game2GameDirectoryStatusMessageParser'; export * from './Game2GameDirectoryStatusMessageParser';
export * from './Game2InArenaQueueMessageParser'; export * from './Game2InArenaQueueMessageParser';
export * from './Game2JoiningGameFailedMessageParser';
export * from './Game2StartingGameFailedMessageParser'; export * from './Game2StartingGameFailedMessageParser';
export * from './Game2StopCounterMessageParser'; export * from './Game2StopCounterMessageParser';
export * from './Game2UserLeftGameMessageParser'; export * from './Game2UserLeftGameMessageParser';