File tree 6 files changed +57
-1
lines changed
6 files changed +57
-1
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export class IncomingHeader
35
35
public static GAME_CENTER_ACHIEVEMENTS = 2265 ;
36
36
public static GAME_CENTER_GAME_LIST = 222 ;
37
37
public static GAME_CENTER_STATUS = 2893 ;
38
+ public static GAME_CENTER_JOINING_FAILED = 1730 ;
38
39
public static GAMESTATUSMESSAGE = 3805 ;
39
40
public static GAMEACHIEVEMENTS = 1689 ;
40
41
public static GAMEINVITE = 904 ;
Original file line number Diff line number Diff line change
1
+ import { IMessageEvent } from '../../../../../../api' ;
2
+ import { MessageEvent } from '../../../../../../events' ;
3
+ import { Game2JoiningGameFailedMessageParser } from '../../../parser' ;
4
+
5
+ export class Game2JoiningGameFailedMessageEvent extends MessageEvent implements IMessageEvent
6
+ {
7
+ constructor ( callBack : Function )
8
+ {
9
+ super ( callBack , Game2JoiningGameFailedMessageParser ) ;
10
+ }
11
+
12
+ public getParser ( ) : Game2JoiningGameFailedMessageParser
13
+ {
14
+ return this . parser as Game2JoiningGameFailedMessageParser ;
15
+ }
16
+ }
Original file line number Diff line number Diff line change 1
1
export * from './Game2AccountGameStatusMessageEvent' ;
2
+ export * from './Game2JoiningGameFailedMessageEvent' ;
Original file line number Diff line number Diff line change
1
+ import { IMessageDataWrapper , IMessageParser } from '../../../../../../api' ;
2
+
3
+ export class Game2JoiningGameFailedMessageParser implements IMessageParser
4
+ {
5
+ public static readonly KICKED : number = 1 ;
6
+ public static readonly DUPLICATE_MACHINEID : number = 2 ;
7
+ public static readonly INVITATION_REQUIRED : number = 3 ;
8
+ public static readonly NO_SPACE_IN_TEAM : number = 4 ;
9
+ public static readonly TEAM_NOT_FOUND : number = 5 ;
10
+ public static readonly USER_HAS_ACTIVE_INSTANCE : number = 6 ;
11
+ public static readonly USER_HAS_PENDING_INSTANCE_REQUEST : number = 7 ;
12
+ public static readonly USER_HAS_NO_FREE_GAMES_LEFT : number = 8 ;
13
+
14
+ private _reason : number ;
15
+
16
+ public flush ( ) : boolean
17
+ {
18
+ this . _reason = - 1 ;
19
+
20
+ return true ;
21
+ }
22
+
23
+ public parse ( wrapper : IMessageDataWrapper ) : boolean
24
+ {
25
+ if ( ! wrapper ) return false ;
26
+
27
+ this . _reason = wrapper . readInt ( ) ;
28
+
29
+ return true ;
30
+ }
31
+
32
+ public get reason ( ) : number
33
+ {
34
+ return this . _reason ;
35
+ }
36
+ }
Original file line number Diff line number Diff line change 1
1
export * from './Game2AccountGameStatusMessageParser' ;
2
+ export * from './Game2JoiningGameFailedMessageParser' ;
You can’t perform that action at this time.
0 commit comments