forked from billsonnn/nitro-renderer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
billsonnn#28 - Game2InArenaQueueMessageEvent and Game2StopCounterMess…
…ageEvent added
- Loading branch information
Showing
8 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/nitro/communication/messages/incoming/game/directory/Game2InArenaQueueMessageEvent.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/nitro/communication/messages/incoming/game/directory/Game2StopCounterMessageEvent.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
src/nitro/communication/messages/incoming/game/directory/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export * from './Game2AccountGameStatusMessageEvent'; | ||
export * from './Game2InArenaQueueMessageEvent'; | ||
export * from './Game2StopCounterMessageEvent'; |
27 changes: 27 additions & 0 deletions
27
src/nitro/communication/messages/parser/game/directory/Game2InArenaQueueMessageParser.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/nitro/communication/messages/parser/game/directory/Game2StopCounterMessageParser.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
src/nitro/communication/messages/parser/game/directory/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export * from './Game2AccountGameStatusMessageParser'; | ||
export * from './Game2InArenaQueueMessageParser'; | ||
export * from './Game2StopCounterMessageParser'; |