HerculesWS / Hercules

Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.
http://herc.ws
GNU General Public License v3.0
899 stars 758 forks source link

Packets Documentation #2243

Open dastgirp opened 6 years ago

dastgirp commented 6 years ago

Description

Add Packet Documentation in markdown format.

Reference: https://github.com/rathena/rathena/blob/master/doc/packet_interserv.txt The packets listed on that site, and on our are almost similar, with few additions/deletions in some packets, so you might find it great for start.

You can see our packets on: https://raw.githubusercontent.com/HerculesWS/Hercules/master/src/map/intif.c https://raw.githubusercontent.com/HerculesWS/Hercules/master/src/map/chrif.c https://raw.githubusercontent.com/HerculesWS/Hercules/master/src/char/inter.c https://raw.githubusercontent.com/HerculesWS/Hercules/master/src/char/mapif.c https://raw.githubusercontent.com/HerculesWS/Hercules/master/src/char/loginif.c

What to look for in these files? search WFIFOHEAD or WBUFHEAD (All Packets start with this) Next line might have something like

WFIFOW(fd, 0) = 0x3804;

OR

WBUFW(buf, 0) = 0x3804;

0x3804 is the PacketID There are variations in WFIFO/WBUF commands, which are listed below:

WFIFOW/WBUFW = 2 bytes WFIFOL/WBUFL = 4 bytes WFIFOQ/WBUFQ = 8 bytes

4144 commented 6 years ago

directly using packet fields is mostly legacy way. everywhere should be used structs in normal way

dastgirp commented 6 years ago

@4144 we don't use structs for communication between login-char, char-map and map-char, so for this particular issue, I guess searching WFIFO/WBUF would be ok for documentation

ConnorBrereton commented 6 years ago

Can I take a crack at this?

sushmaunnibhavi commented 6 years ago

Can I take a crack at this?

dastgirp commented 6 years ago

Yes, atm, nobody is doing this.