New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packets Documentation #2243

Open
dastgirp opened this Issue Oct 2, 2018 · 5 comments

Comments

Projects
None yet
4 participants
@dastgirp
Member

dastgirp commented Oct 2, 2018

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

This comment has been minimized.

Show comment
Hide comment
@4144

4144 Oct 2, 2018

Contributor

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

Contributor

4144 commented Oct 2, 2018

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

@dastgirp

This comment has been minimized.

Show comment
Hide comment
@dastgirp

dastgirp Oct 2, 2018

Member

@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

Member

dastgirp commented Oct 2, 2018

@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

This comment has been minimized.

Show comment
Hide comment
@ConnorBrereton

ConnorBrereton Oct 16, 2018

Can I take a crack at this?

ConnorBrereton commented Oct 16, 2018

Can I take a crack at this?

1 similar comment
@sushmaunnibhavi

This comment has been minimized.

Show comment
Hide comment
@sushmaunnibhavi

sushmaunnibhavi Oct 19, 2018

Can I take a crack at this?

sushmaunnibhavi commented Oct 19, 2018

Can I take a crack at this?

@dastgirp

This comment has been minimized.

Show comment
Hide comment
@dastgirp

dastgirp Oct 19, 2018

Member

Yes, atm, nobody is doing this.

Member

dastgirp commented Oct 19, 2018

Yes, atm, nobody is doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment