docs: add writerside based documentation
This commit is contained in:
parent
3bcfe010cf
commit
df8b3b7108
11 changed files with 187 additions and 9 deletions
26
Wiki/topics/Character-Selection-Set-Guild-Name-Packet.md
Normal file
26
Wiki/topics/Character-Selection-Set-Guild-Name-Packet.md
Normal file
|
@ -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 |
|
3
Wiki/topics/Home.md
Normal file
3
Wiki/topics/Home.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Continuity
|
||||
|
||||
This is the Wiki for Continuity and additional information regarding Wonderking's architecture
|
12
Wiki/topics/Packets.md
Normal file
12
Wiki/topics/Packets.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Packets
|
||||
|
||||
## List of Packets
|
||||
|
||||
<list columns="2">
|
||||
<li><a href="Login-Info.md">Login Info</a></li>
|
||||
<li><a href="Login-Response.md">Login Response</a></li>
|
||||
<li><a href="Channel-Selection.md">Channel Selection</a></li>
|
||||
<li><a href="Channel-Selection-Response.md">Channel Selection Response</a></li>
|
||||
</list>
|
||||
|
||||
|
61
Wiki/topics/Packets/Channel-Selection-Response.md
Normal file
61
Wiki/topics/Packets/Channel-Selection-Response.md
Normal file
|
@ -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 |
|
18
Wiki/topics/Packets/Channel-Selection.md
Normal file
18
Wiki/topics/Packets/Channel-Selection.md
Normal file
|
@ -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)
|
14
Wiki/topics/Packets/Login-Info.md
Normal file
14
Wiki/topics/Packets/Login-Info.md
Normal file
|
@ -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)
|
25
Wiki/topics/Packets/Login-Response.md
Normal file
25
Wiki/topics/Packets/Login-Response.md
Normal file
|
@ -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 |
|
16
Wiki/wiki.tree
Normal file
16
Wiki/wiki.tree
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE instance-profile
|
||||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">
|
||||
|
||||
<instance-profile id="wiki" name="Wiki Instance"
|
||||
start-page="Home.md">
|
||||
|
||||
<toc-element topic="Home.md"/>
|
||||
<toc-element topic="Packets.md" id="packets">
|
||||
<toc-element topic="Channel-Selection-Response.md"/>
|
||||
<toc-element topic="Channel-Selection.md"/>
|
||||
<toc-element topic="Login-Info.md"/>
|
||||
<toc-element topic="Login-Response.md"/>
|
||||
</toc-element>
|
||||
<toc-element topic="Character-Selection-Set-Guild-Name-Packet.md"/>
|
||||
</instance-profile>
|
8
Wiki/writerside.cfg
Normal file
8
Wiki/writerside.cfg
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE ihp SYSTEM "https://resources.jetbrains.com/writerside/1.0/ihp.dtd">
|
||||
|
||||
<ihp version="2.0">
|
||||
<topics dir="topics" web-path="topics"/>
|
||||
<images dir="images" web-path="images"/>
|
||||
<instance src="wiki.tree"/>
|
||||
</ihp>
|
|
@ -14,15 +14,15 @@ public class CharacterSelectionSetGuildNamePacket : IPacket
|
|||
|
||||
public byte[] Serialize()
|
||||
{
|
||||
Span<byte> data = stackalloc byte[1 + (16 + 1 + 1) * this.GuildNames.Length];
|
||||
Span<byte> 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();
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
namespace Wonderking.Packets.Outgoing.Data;
|
||||
|
||||
public struct CharacterGuildInfo
|
||||
{
|
||||
}
|
Loading…
Reference in a new issue