Explorar o código

Added ZC_NPCACK_SERVERMOVE2

Thanks to @mrdiablo
Lemongrass3110 %!s(int64=7) %!d(string=hai) anos
pai
achega
aaffbaaa14
Modificáronse 2 ficheiros con 19 adicións e 5 borrados
  1. 14 5
      src/map/clif.cpp
  2. 5 0
      src/map/clif_packetdb.hpp

+ 14 - 5
src/map/clif.cpp

@@ -1851,22 +1851,31 @@ void clif_changemap(struct map_session_data *sd, short m, int x, int y)
 }
 
 
-/// Notifies the client of a position change to coordinates on given map, which is on another map-server (ZC_NPCACK_SERVERMOVE).
-/// 0092 <map name>.16B <x>.W <y>.W <ip>.L <port>.W
+/// Notifies the client of a position change to coordinates on given map, which is on another map-server.
+/// 0092 <map name>.16B <x>.W <y>.W <ip>.L <port>.W (ZC_NPCACK_SERVERMOVE)
+/// 0ac7 <map name>.16B <x>.W <y>.W <ip>.L <port>.W <unknown>.128B (ZC_NPCACK_SERVERMOVE2)
 void clif_changemapserver(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port)
 {
 	int fd;
+#if PACKETVER >= 20170315
+	int cmd = 0xac7;
+#else
+	int cmd = 0x92;
+#endif
 	nullpo_retv(sd);
 	fd = sd->fd;
 
-	WFIFOHEAD(fd,packet_len(0x92));
-	WFIFOW(fd,0) = 0x92;
+	WFIFOHEAD(fd,packet_len(cmd));
+	WFIFOW(fd,0) = cmd;
 	mapindex_getmapname_ext(mapindex_id2name(map_index), WFIFOCP(fd,2));
 	WFIFOW(fd,18) = x;
 	WFIFOW(fd,20) = y;
 	WFIFOL(fd,22) = htonl(ip);
 	WFIFOW(fd,26) = ntows(htons(port)); // [!] LE byte order here [!]
-	WFIFOSET(fd,packet_len(0x92));
+#if PACKETVER >= 20170315
+	memset(WFIFOP(fd, 28), 0, 128); // Unknown
+#endif
+	WFIFOSET(fd,packet_len(cmd));
 }
 
 

+ 5 - 0
src/map/clif_packetdb.hpp

@@ -2338,6 +2338,11 @@
 	packet(0x0AA5,-1);
 #endif
 
+// 2017-03-15cRagexeRE
+#if PACKETVER >= 20170315
+	packet(0xac7,156);
+#endif
+
 // 2017-04-19bRagexeRE
 #if PACKETVER >= 20170419
 	parseable_packet(0x0AC0,26,clif_parse_Mail_refreshinbox,2,10);