diff --git a/Wiki/topics/Character-Selection-Set-Guild-Name-Packet.md b/Wiki/topics/Character-Selection-Set-Guild-Name-Packet.md new file mode 100644 index 0000000..204fc60 --- /dev/null +++ b/Wiki/topics/Character-Selection-Set-Guild-Name-Packet.md @@ -0,0 +1,26 @@ +# Character Selection Set Guild Name Packet + +## Metadata + +**Operation Code**: 19 + +### Structure + +Total size: 1 + 18 * Amount of Characters + +| Identifier | Datatype | Size in bytes | +|------------------------|---------------------|---------------| +| Amount of Characters | byte | 1 | +| Guild Name Identifiers | GuildNameIdentifier | 18 | + +### Subtypes + +#### GuildNameIdentifier + +Total size: 18 bytes + +| Identifier | Datatype | Size in bytes | +|-----------------|----------|---------------| +| Character Slot | byte | 1 | +| Guild Name | string | 16 | +| Null Terminator | byte | 1 | \ No newline at end of file diff --git a/Wiki/topics/Home.md b/Wiki/topics/Home.md new file mode 100644 index 0000000..5b54eb7 --- /dev/null +++ b/Wiki/topics/Home.md @@ -0,0 +1,3 @@ +# Continuity + +This is the Wiki for Continuity and additional information regarding Wonderking's architecture \ No newline at end of file diff --git a/Wiki/topics/Packets.md b/Wiki/topics/Packets.md new file mode 100644 index 0000000..765659c --- /dev/null +++ b/Wiki/topics/Packets.md @@ -0,0 +1,12 @@ +# Packets + +## List of Packets + + +
  • Login Info
  • +
  • Login Response
  • +
  • Channel Selection
  • +
  • Channel Selection Response
  • +
    + + diff --git a/Wiki/topics/Packets/Channel-Selection-Response.md b/Wiki/topics/Packets/Channel-Selection-Response.md new file mode 100644 index 0000000..0d52ade --- /dev/null +++ b/Wiki/topics/Packets/Channel-Selection-Response.md @@ -0,0 +1,61 @@ +# Channel Selection Response Packet + +## Metadata + +**Operation Code**: 13 + +### Structure + +Total size: 1 + 16 + 2 + 1 + 132 * Character amount bytes + +| Identifier | Datatype | Size in bytes | +|------------------|----------------|------------------------| +| UnknownFlag | byte | 1 | +| IP Endpoint | string | 16 | +| Port | unsigned short | 2 | +| Character amount | byte | 1 | +| Character data | CharacterData | 132 * Character amount | + +### Subtypes + +#### CharacterData + +Total size: 132 bytes + +| Identifier | Datatype | Size in bytes | +|------------------------|------------------|---------------| +| Character Slot | int | 4 | +| Character Name | string | 20 | +| Jobs | Job Data | 4 | +| Gender | byte | 1 | +| Level | unsigned short | 2 | +| Exp? | byte | 1 | +| Stats | BaseStats | 12 | +| Health | int | 4 | +| Mana | int | 4 | +| Equipped Item Ids | unsigned short[] | 20 * 2 (40) | +| Equipped Cash Item Ids | unsigned short[] | 20 * 2 (40) | + +#### Job Data + +Total size: 4 bytes + +| Identifier | Datatype | Size in bytes | +|------------|----------|---------------| +| First Job | byte | 1 | +| Second Job | byte | 1 | +| Third Job | byte | 1 | +| Fourth Job | byte | 1 | + +#### BaseStats + +Total size: 12 bytes + +| Identifier | Datatype | Size in bytes | +|--------------|----------|---------------| +| Strength | short | 2 | +| Dexterity | short | 2 | +| Intelligence | short | 2 | +| Vitality | short | 2 | +| Luck | short | 2 | +| Wisdom | short | 2 | diff --git a/Wiki/topics/Packets/Channel-Selection.md b/Wiki/topics/Packets/Channel-Selection.md new file mode 100644 index 0000000..cf4f4b8 --- /dev/null +++ b/Wiki/topics/Packets/Channel-Selection.md @@ -0,0 +1,18 @@ +# Channel Selection Packet + +## Metadata + +**Operation Code**: 13 + +### Structure + +| Identifier | Datatype | Size in bytes | +|------------|----------------|---------------| +| Server Id | unsigned short | 2 | +| Channel Id | unsigned short | 2 | + + +**Response Packets**: + +- [Channel Selection Response](Channel-Selection-Response.md) +- [Character Selection Set Guild Name Packet](Character-Selection-Set-Guild-Name-Packet.md) diff --git a/Wiki/topics/Packets/Login-Info.md b/Wiki/topics/Packets/Login-Info.md new file mode 100644 index 0000000..3070a09 --- /dev/null +++ b/Wiki/topics/Packets/Login-Info.md @@ -0,0 +1,14 @@ +# Login Info Packet + +## Metadata + +**Operation Code**: 11 + +### Structure + +| Identifier | Datatype | Size in bytes | +|------------|----------|---------------| +| Username | String | 20 | +| Password | String | 32 | + +**Response Packets**: [Login Response](Login-Response.md) \ No newline at end of file diff --git a/Wiki/topics/Packets/Login-Response.md b/Wiki/topics/Packets/Login-Response.md new file mode 100644 index 0000000..b38fd0a --- /dev/null +++ b/Wiki/topics/Packets/Login-Response.md @@ -0,0 +1,25 @@ +# Login Response Packet + +## Metadata + +**Operation Code**: 12 + +### Structure + +| Identifier | Datatype | Size in bytes | +|-----------------------|----------------|--------------------| +| Login Response Reason | byte | 1 | +| Unknown Flag | byte | 1 | +| Is Game Master Flag | bool | 1 | +| Channel amount | unsigned short | 2 | +| Server/Channel data | ChannelData | 5 * Channel amount | + +### Subtypes + +#### ChannelData + +| Identifier | Datatype | Size in bytes | +|------------|----------------|---------------| +| Server ID | unsigned short | 2 | +| Channel ID | unsigned short | 2 | +| Load | byte | 1 | \ No newline at end of file diff --git a/Wiki/wiki.tree b/Wiki/wiki.tree new file mode 100644 index 0000000..f6c4c8c --- /dev/null +++ b/Wiki/wiki.tree @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Wiki/writerside.cfg b/Wiki/writerside.cfg new file mode 100644 index 0000000..332ec71 --- /dev/null +++ b/Wiki/writerside.cfg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Wonderking/Packets/Outgoing/CharacterSelectionSetGuildNamePacket.cs b/Wonderking/Packets/Outgoing/CharacterSelectionSetGuildNamePacket.cs index bc6bf2f..286b2ef 100644 --- a/Wonderking/Packets/Outgoing/CharacterSelectionSetGuildNamePacket.cs +++ b/Wonderking/Packets/Outgoing/CharacterSelectionSetGuildNamePacket.cs @@ -14,15 +14,15 @@ public class CharacterSelectionSetGuildNamePacket : IPacket public byte[] Serialize() { - Span data = stackalloc byte[1 + (16 + 1 + 1) * this.GuildNames.Length]; + Span data = stackalloc byte[1 + (1 + 16 + 1) * this.GuildNames.Length]; data.Clear(); data[0] = (byte)this.GuildNames.Length; for (var i = 0; i < this.GuildNames.Length; i++) { - data[1 + (i * (16 + 1 + 1))] = (byte)i; - Encoding.ASCII.GetBytes(this.GuildNames[i], data.Slice(2 + (i * (16 + 1 + 1)), 16)); + data[1 + (i * (1 + 16 + 1))] = (byte)i; + Encoding.ASCII.GetBytes(this.GuildNames[i], data.Slice(2 + (i * (1 + 16 + 1)), 16)); // Null terminator - data[18 + (i * (16 + 1 + 1))] = 0; + data[18 + (i * (1 + 16 + 1))] = 0; } return data.ToArray(); diff --git a/Wonderking/Packets/Outgoing/Data/CharacterGuildInfo.cs b/Wonderking/Packets/Outgoing/Data/CharacterGuildInfo.cs deleted file mode 100644 index a025e1e..0000000 --- a/Wonderking/Packets/Outgoing/Data/CharacterGuildInfo.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Wonderking.Packets.Outgoing.Data; - -public struct CharacterGuildInfo -{ -}