-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
89 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
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
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
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,44 @@ | ||
import { Long } from "bson"; | ||
/* | ||
* Created on Thu Oct 22 2020 | ||
* | ||
* Copyright (c) storycraft. Licensed under the MIT Licence. | ||
*/ | ||
|
||
import { LocoBsonRequestPacket, LocoBsonResponsePacket } from "./loco-bson-packet"; | ||
|
||
export class PacketCheckJoinReq extends LocoBsonRequestPacket { | ||
|
||
constructor( | ||
public LinkId: Long = Long.ZERO, | ||
public Passcode: string = '' | ||
) { | ||
super(); | ||
} | ||
|
||
get PacketName() { | ||
return 'CHECKJOIN'; | ||
} | ||
|
||
toBodyJson() { | ||
return { 'li': this.LinkId, 'pc': this.Passcode }; | ||
} | ||
} | ||
|
||
export class PacketCheckJoinRes extends LocoBsonResponsePacket { | ||
|
||
constructor( | ||
status: number, | ||
public Token: string = '' | ||
) { | ||
super(status); | ||
} | ||
|
||
get PacketName() { | ||
return 'CHECKJOIN'; | ||
} | ||
|
||
readBodyJson(rawBody: any) { | ||
this.Token = rawBody['tk']; | ||
} | ||
} |
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
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