Issue information

Issue ID
#468
Status
Fixed
Severity
Medium
Started
Hercules Elf Bot
Nov 21, 2007 21:23
Last Post
Hercules Elf Bot
Nov 21, 2007 21:23
Confirmation
N/A

Hercules Elf Bot - Nov 21, 2007 21:23

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=468

After the mapserver processes a client's wanttoconnection request, it replies with a 4-byte packet consisting only of a game-id (account id).
Sometime this year, Gravity activated a packet that's been lying around for a year in the exe; this packet has 6 bytes and wraps/replaces the abovementioned packet.

The client isn't backwards compatible and will crash if it receives the old packet. Similarly, older clients will hang when receiving this new packet instead of the old one. Other non-kro clients seem to know this packet as well, but do not utilize it yet, meaning they're incompatible too.

Patch:
CODE
+#if PACKETVER < 8
     WFIFOHEAD(fd,4);
     WFIFOL(fd,0) = sd->bl.id;
     WFIFOSET(fd,4);
+#else
+    WFIFOHEAD(fd,packet_len(0x283));
+    WFIFOW(fd,0) = 0x283;
+    WFIFOL(fd,2) = sd->bl.id;
+    WFIFOSET(fd,packet_len(0x283));
+#endif