-
Notifications
You must be signed in to change notification settings - Fork 23
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
28 changed files
with
531 additions
and
203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
public enum CharacterSex | ||
{ | ||
Male = 0, | ||
Female = 1 | ||
} |
2 changes: 2 additions & 0 deletions
2
l2-unity/Assets/Scripts/Game/Entity/Enum/CharacterSex.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
20 changes: 20 additions & 0 deletions
20
.../Networking/ClientLibrary/Packet/Gameserver/ClientPackets/Auth/RequestCharCreatePacket.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 @@ | ||
public class RequestCharCreatePacket : ClientPacket | ||
{ | ||
public RequestCharCreatePacket(string name, CharacterRace race, CharacterSex sex, CharacterClass characterClass, int hairstyle, int haircolor, int face) : base((byte)GameClientPacketType.RequestCharCreate) | ||
{ | ||
WriteS(name); | ||
WriteI((int)race); | ||
WriteI((int)sex); | ||
WriteI((int)characterClass); | ||
WriteI(0); | ||
WriteI(0); | ||
WriteI(0); | ||
WriteI(0); | ||
WriteI(0); | ||
WriteI(0); | ||
WriteI(hairstyle); | ||
WriteI(haircolor); | ||
WriteI(face); | ||
BuildPacket(); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...orking/ClientLibrary/Packet/Gameserver/ClientPackets/Auth/RequestCharCreatePacket.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
86 changes: 53 additions & 33 deletions
86
l2-unity/Assets/Scripts/Networking/ClientLibrary/Packet/Gameserver/GameServerPacketType.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 |
---|---|---|
@@ -1,38 +1,58 @@ | ||
public enum GameServerPacketType : byte | ||
{ | ||
VersionCheck = 0x00, | ||
LoginFail = 0x01, | ||
CharSelectionInfo = 0x02, | ||
MessagePacket = 0x04, | ||
SystemMessage = 0x05, | ||
PlayerInfo = 0x06, | ||
ObjectPosition = 0x07, | ||
RemoveObject = 0x08, | ||
ObjectRotation = 0x09, | ||
ObjectAnimation = 0x0A, | ||
ApplyDamage = 0x0B, | ||
NpcInfo = 0x0C, | ||
ObjectMoveTo = 0x0D, | ||
UserInfo = 0x0E, | ||
ObjectMoveDirection = 0x0F, | ||
GameTime = 0x10, | ||
EntitySetTarget = 0x11, | ||
AutoAttackStart = 0x12, | ||
AutoAttackStop = 0x13, | ||
ActionFailed = 0x14, | ||
ServerClose = 0x15, | ||
StatusUpdate = 0x16, | ||
ActionAllowed = 0x17, | ||
InventoryItemList = 0x18, | ||
InventoryUpdate = 0x19, | ||
LeaveWorld = 0x1A, | ||
RestartReponse = 0x1B, | ||
ShortcutInit = 0x1C, | ||
ShortcutRegister = 0x1D, | ||
SocialAction = 0x1E, | ||
ChangeWaitType = 0x1F, | ||
ChangeMoveType = 0x20, | ||
|
||
Ping = 0xF0, | ||
CharSelectionInfo = 0x13, | ||
LoginFail = 0x14, | ||
CharCreateOk = 0x19, | ||
CharCreateFail = 0x1a, | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
MessagePacket = 0xF4, | ||
SystemMessage = 0xF5, | ||
PlayerInfo = 0xF6, | ||
ObjectPosition = 0xF7, | ||
RemoveObject = 0xF8, | ||
ObjectRotation = 0xF9, | ||
ObjectAnimation = 0xFA, | ||
ApplyDamage = 0xFB, | ||
NpcInfo = 0xFC, | ||
ObjectMoveTo = 0xFD, | ||
UserInfo = 0xFE, | ||
ObjectMoveDirection = 0xFF, | ||
GameTime = 0xD0, | ||
EntitySetTarget = 0xD1, | ||
AutoAttackStart = 0xD2, | ||
AutoAttackStop = 0xD3, | ||
ActionFailed = 0xD4, | ||
ServerClose = 0xD5, | ||
StatusUpdate = 0xD6, | ||
ActionAllowed = 0xD7, | ||
InventoryItemList = 0xD8, | ||
InventoryUpdate = 0xD9, | ||
LeaveWorld = 0xDA, | ||
RestartReponse = 0xDB, | ||
ShortcutInit = 0xDC, | ||
ShortcutRegister = 0xDD, | ||
SocialAction = 0xDE, | ||
ChangeWaitType = 0xDF, | ||
ChangeMoveType = 0xE0, | ||
|
||
Ping = 0xE1, | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...pts/Networking/ClientLibrary/Packet/Gameserver/ServerPackets/Auth/CharCreateFailPacket.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,21 @@ | ||
public class CharCreateFailPacket : ServerPacket | ||
{ | ||
public enum CreateFailReason | ||
{ | ||
REASON_CREATION_FAILED = 0x00, | ||
REASON_TOO_MANY_CHARACTERS = 0x01, | ||
REASON_NAME_ALREADY_EXISTS = 0x02, | ||
REASON_INCORRECT_NAME = 0x04 | ||
} | ||
|
||
public int Reason { get; private set; } | ||
public CharCreateFailPacket(byte[] d) : base(d) | ||
{ | ||
Parse(); | ||
} | ||
|
||
public override void Parse() | ||
{ | ||
Reason = ReadI(); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...etworking/ClientLibrary/Packet/Gameserver/ServerPackets/Auth/CharCreateFailPacket.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...ripts/Networking/ClientLibrary/Packet/Gameserver/ServerPackets/Auth/CharCreateOkPacket.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,13 @@ | ||
public class CharCreateOkPacket : ServerPacket | ||
{ | ||
public CharCreateOkPacket(byte[] d) : base(d) | ||
{ | ||
Parse(); | ||
} | ||
|
||
public override void Parse() | ||
{ | ||
ReadI(); | ||
} | ||
} | ||
|
2 changes: 2 additions & 0 deletions
2
.../Networking/ClientLibrary/Packet/Gameserver/ServerPackets/Auth/CharCreateOkPacket.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.