diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-01-05 18:59:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-01-05 21:23:59 +0300 |
commit | a49ea3708ce03d82b759c0d01d29aca6c5b3cc00 (patch) | |
tree | cd51a65f204ba78277226342bb53bf0f420deeb2 /src/elogin | |
parent | 60e318493b2fc59306cc5e6b2bf9390ca98777f3 (diff) | |
download | evol-hercules-a49ea3708ce03d82b759c0d01d29aca6c5b3cc00.tar.gz evol-hercules-a49ea3708ce03d82b759c0d01d29aca6c5b3cc00.tar.bz2 evol-hercules-a49ea3708ce03d82b759c0d01d29aca6c5b3cc00.tar.xz evol-hercules-a49ea3708ce03d82b759c0d01d29aca6c5b3cc00.zip |
Add packet types flag into version packet (0x7531).s20180116
Current support flags:
1 - for RE packets.
2 - for Zero packets.
Diffstat (limited to 'src/elogin')
-rw-r--r-- | src/elogin/send.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/elogin/send.c b/src/elogin/send.c index f91cd84..8324ebe 100644 --- a/src/elogin/send.c +++ b/src/elogin/send.c @@ -20,13 +20,22 @@ void send_server_version(int fd) { - WFIFOHEAD(fd, 4 + 8); + const int sz = 20; + WFIFOHEAD(fd, sz); WFIFOW(fd, 0) = 0x7531; - WFIFOW(fd, 2) = 18; + WFIFOW(fd, 2) = sz; WFIFOL(fd, 4) = 0; // unused - WFIFOL(fd, 8) = 19; // plugin version + WFIFOL(fd, 8) = 20; // plugin version WFIFOL(fd, 12) = serverPacketVersion; // server packet version WFIFOW(fd, 16) = evolPacketOffset; // packet id offset + int flags = 0; +#ifdef PACKETVER_RE + flag |= 1; +#endif +#ifdef PACKETVER_ZERO + flag |= 2; +#endif + WFIFOW(fd, 18) = flags; WFIFOSET(fd, WFIFOW(fd,2)); } |