-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CheckPassword and CheckPasswordResult structured packet
- Loading branch information
Showing
14 changed files
with
2,105 additions
and
87 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
26 changes: 26 additions & 0 deletions
26
src/protocol/Edelstein.Protocol.Gameplay.Login/Contracts/Packets/LoginAccountInfoFrame.cs
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,26 @@ | ||
using BinarySerialization; | ||
using Edelstein.Protocol.Network.Packets; | ||
using Edelstein.Protocol.Network.Packets.Types; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Login.Contracts.Packets; | ||
|
||
public record LoginAccountInfoFrame : StructuredBasePacket | ||
{ | ||
[FieldOrder(0)] public required int ID { get; init; } | ||
[FieldOrder(1)] public byte Gender { get; init; } | ||
[FieldOrder(2)] public byte GradeCode { get; init; } | ||
[FieldOrder(3)] public short SubGradeCode { get; init; } | ||
[FieldOrder(4)] public byte CountryID { get; init; } | ||
[FieldOrder(5)] public required LPString NexonClubID { get; init; } | ||
|
||
[FieldOrder(6)] public byte Unk1 { get; init; } | ||
[FieldOrder(7)] public byte Unk2 { get; init; } | ||
[FieldOrder(8)] public FDateTime ChatUnblockDate { get; init; } = new(); | ||
[FieldOrder(9)] public FDateTime RegisterDate { get; init; } = new(); | ||
|
||
[FieldOrder(10)] public int NumOfCharacter { get; init; } = 4; | ||
|
||
[FieldOrder(11)] public bool Unk3 { get; init; } = true; | ||
[FieldOrder(12)] public bool Unk4 { get; init; } | ||
[FieldOrder(13)] public long ClientKey { get; init; } | ||
} |
11 changes: 11 additions & 0 deletions
11
src/protocol/Edelstein.Protocol.Gameplay.Login/Contracts/Packets/LoginBlockReasonFrame.cs
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,11 @@ | ||
using BinarySerialization; | ||
using Edelstein.Protocol.Network.Packets; | ||
using Edelstein.Protocol.Network.Packets.Types; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Login.Contracts.Packets; | ||
|
||
public record LoginBlockReasonFrame : StructuredBasePacket | ||
{ | ||
[FieldOrder(0)] public required byte Reason { get; init; } | ||
[FieldOrder(1)] public required FDateTime UnblockDate { get; init; } | ||
} |
31 changes: 31 additions & 0 deletions
31
src/protocol/Edelstein.Protocol.Gameplay.Login/Contracts/Packets/LoginResultCode.cs
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,31 @@ | ||
namespace Edelstein.Protocol.Gameplay.Login.Contracts.Packets; | ||
|
||
public enum LoginResultCode : byte | ||
{ | ||
ProcFail = byte.MaxValue, | ||
Success = 0x0, | ||
TempBlocked = 0x1, | ||
Blocked = 0x2, | ||
Abandoned = 0x3, | ||
IncorrectPassword = 0x4, | ||
NotRegistered = 0x5, | ||
DBFail = 0x6, | ||
AlreadyConnected = 0x7, | ||
NotConnectableWorld = 0x8, | ||
Unknown = 0x9, | ||
Timeout = 0xA, | ||
NotAdult = 0xB, | ||
AuthFail = 0xC, | ||
ImpossibleIP = 0xD, | ||
NotAuthorizedNexonID = 0xE, | ||
NoNexonID = 0xF, | ||
NotAuthorized = 0x10, | ||
InvalidRegionInfo = 0x11, | ||
InvalidBirthDate = 0x12, | ||
PassportSuspended = 0x13, | ||
IncorrectSSN2 = 0x14, | ||
WebAuthNeeded = 0x15, | ||
DeleteCharacterFailedOnGuildMaster = 0x16, | ||
NotAgreedEULA = 0x17, | ||
DeleteCharacterFailedEngaged = 0x18 | ||
} |
22 changes: 22 additions & 0 deletions
22
src/protocol/Edelstein.Protocol.Gameplay.Login/Contracts/Packets/Recv/CheckPasswordPacket.cs
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,22 @@ | ||
using BinarySerialization; | ||
using Edelstein.Protocol.Network.Packets; | ||
using Edelstein.Protocol.Network.Packets.Types; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Login.Contracts.Packets.Recv; | ||
|
||
public record CheckPasswordPacket : StructuredRecvPacket | ||
{ | ||
[FieldOrder(0)] public required LPString Username { get; init; } | ||
[FieldOrder(1)] public required LPString Password { get; init; } | ||
|
||
[FieldOrder(2)] | ||
[FieldLength(0x10)] | ||
public required byte[] MachineID { get; init; } | ||
|
||
[FieldOrder(3)] public required int GameRoomClient { get; init; } | ||
[FieldOrder(4)] public required byte GameStartMode { get; init; } | ||
[FieldOrder(5)] public required bool Unk1 { get; init; } // bAdminclient (?) | ||
[FieldOrder(6)] public required bool Unk2 { get; init; } // unsure | ||
|
||
[FieldOrder(7)] public required int PartnerCode { get; init; } | ||
} |
20 changes: 20 additions & 0 deletions
20
...col/Edelstein.Protocol.Gameplay.Login/Contracts/Packets/Send/CheckPasswordResultPacket.cs
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,20 @@ | ||
using BinarySerialization; | ||
using Edelstein.Protocol.Network.Packets; | ||
|
||
namespace Edelstein.Protocol.Gameplay.Login.Contracts.Packets.Send; | ||
|
||
public record CheckPasswordResultPacket() : StructuredSendPacket(PacketSendOperation.CheckPasswordResult) | ||
{ | ||
[FieldOrder(0)] public required LoginResultCode Result { get; init; } | ||
|
||
[FieldOrder(1)] public byte Unk1 { get; init; } = 0; // nRegStatID | ||
[FieldOrder(2)] public int Unk2 { get; init; } = 0; // nUseDay | ||
|
||
[FieldOrder(3)] | ||
[SerializeWhen(nameof(Result), LoginResultCode.Blocked)] | ||
public LoginBlockReasonFrame? BlockReason { get; init; } | ||
|
||
[FieldOrder(4)] | ||
[SerializeWhen(nameof(Result), LoginResultCode.Success)] | ||
public LoginAccountInfoFrame? AccountInfo { get; init; } | ||
} |
5 changes: 5 additions & 0 deletions
5
src/protocol/Edelstein.Protocol.Gameplay.Login/Edelstein.Protocol.Gameplay.Login.csproj
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,5 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Edelstein.Protocol.Network\Edelstein.Protocol.Network.csproj" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.