summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/packet_struct_notation.txt42
1 files changed, 39 insertions, 3 deletions
diff --git a/doc/packet_struct_notation.txt b/doc/packet_struct_notation.txt
index 7c3974da2..0ce87289c 100644
--- a/doc/packet_struct_notation.txt
+++ b/doc/packet_struct_notation.txt
@@ -3,9 +3,10 @@
//===== By ================================================
//= Ai4rei
//===== Version ===========================================
-//= 1.0
+//= 1.1
//=========================================================
//= 1.0 - Initial version.
+//= 1.1 - Added examples.
//===== Description =======================================
//= Explanation how packets are and should be documented.
//=========================================================
@@ -27,7 +28,7 @@ regardless of architecture.
/// 0 = owner (menu)
/// 1 = normal
-The first line contain a brief description of what the packet does,
+The first line contains a brief description of what the packet does,
or what it is good for, followed by it's AEGIS name in parentheses;
first two letters of the AEGIS name specify origin (first letter)
and destination (second letter) of the packet. If the packet's name
@@ -60,7 +61,7 @@ values.
B = 1 byte (byte)
W = 2 bytes (word)
- L = 4 bytes (dword)
+ L = 4 bytes (long, dword)
Q = 8 bytes (quad)
nB = n bytes
@@ -83,3 +84,38 @@ values.
I = Inter
S = Server (any type of server)
Z = Zone (Map)
+
+= Examples =
+
+Packet with nested repetition blocks:
+
+ /// Presents a textual list of producable items (ZC_MAKABLEITEMLIST).
+ /// 018d <packet len>.W { <name id>.W { <material id>.W }*3 }*
+ /// material id:
+ /// unused by the client
+
+Packet with multiple versions identified with different AEGIS names:
+
+ /// Request for server's tick.
+ /// 007e <client tick>.L (CZ_REQUEST_TIME)
+ /// 0360 <client tick>.L (CZ_REQUEST_TIME2)
+
+Packet with multiple versions identified with same AEGIS name:
+
+ /// Cashshop Buy Ack (ZC_PC_CASH_POINT_UPDATE).
+ /// 0289 <cash point>.L <error>.W
+ /// 0289 <cash point>.L <kafra point>.L <error>.W (PACKETVER >= 20070711)
+
+Packet with combination of both different AEGIS names and different
+versions with same name:
+
+ /// Sends hotkey bar.
+ /// 02b9 { <is skill>.B <id>.L <count>.W }*27 (ZC_SHORTCUT_KEY_LIST)
+ /// 07d9 { <is skill>.B <id>.L <count>.W }*36 (ZC_SHORTCUT_KEY_LIST_V2, PACKETVER >= 20090603)
+ /// 07d9 { <is skill>.B <id>.L <count>.W }*38 (ZC_SHORTCUT_KEY_LIST_V2, PACKETVER >= 20090617)
+
+Packet for a client command:
+
+ /// /item /monster (CZ_ITEM_CREATE).
+ /// Request to make items or spawn monsters.
+ /// 013f <item/mob name>.24B