From c4c1400def9740b610a1bf93c201d5a9b7c47780 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Fri, 28 Oct 2011 12:37:16 +0000 Subject: * Random documentation of database files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14986 54d463be-8e91-2dee-dedb-b68131a5f0ec --- db/packet_db.txt | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'db/packet_db.txt') diff --git a/db/packet_db.txt b/db/packet_db.txt index b4a45c9f7..f423d1c14 100644 --- a/db/packet_db.txt +++ b/db/packet_db.txt @@ -1,10 +1,35 @@ +// Client<->Map Packet Database +// +// Structure of Database: +// PacketType,PacketLength[,Name,FieldIndex1:FieldIndex2:FieldIndex3:...] +// +// 01. PacketType ID of the packet. +// 02. PacketLength Length of the packet. If 0, packet is disabled in current packet version. If -1, packet has variable size. +// 03. Name Name of the packet parser function (optional, for incoming packets only). +// 04. FieldIndex Specifies the offset of a packet field in bytes from the begin of the packet (only specified when Name is given). +// Can be 0, when the layout is not known. +// ... +// +// NOTE: Up to MAX_PACKET_POS (typically 20) field indexes may be used. +// // The packet database allows you to add support for new clients, // because packets change every release. +// // Note: Every packet version needs a wanttoconnection specification, since // that is the packet used to identify a client's version. // If multiple versions have the same connection packet, the higher version // will be used (unless the lower one is specified as the default) - +// +// Incoming packets have their parser function and layout specified, which enables +// them for the current and all higher versions, unless explicitely disabled. +// +// Outgoing packets must be specified in order to enable them for the current +// and all higher versions, unless explocitely disabled. Packets that are not +// enabled for a packet version are silently discarded when sent as multicast. +// +// Every packet version inherits packet definitions from the previous (lower) +// packet version. +// // Main packet version of the DB to use (default = max available version) // Client detection is faster when all clients use this version. // Version 23 is the latest Sakexe (above versions are for Renewal clients) -- cgit v1.2.3-60-g2f50