Просмотр исходного кода

Modified PACKETVER for recent clients to use a YYYYMMDD date format instead of a simple sequence number (allows adding versions inbetween).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12539 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 17 лет назад
Родитель
Сommit
103cbd445f
3 измененных файлов с 23 добавлено и 19 удалено
  1. 3 0
      Changelog-Trunk.txt
  2. 8 8
      src/map/clif.c
  3. 12 11
      src/map/clif.h

+ 3 - 0
Changelog-Trunk.txt

@@ -3,6 +3,9 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2008/04/08
+	* Modified PACKETVER for recent clients to use a YYYYMMDD date format
+	  instead of a simple sequence number (allows adding versions inbetween)
 2008/04/07
 	* Rev. 12529 Updated MAX_GUARDIANS to support an insane amount of guardians. [L0ne_W0lf]
 	* Immunity to magic now makes you immune to the SC effect as well. (r12527) [Kevin]

+ 8 - 8
src/map/clif.c

@@ -757,7 +757,7 @@ static int clif_set_unit_idle(struct block_list* bl, unsigned char* buffer, bool
 		WBUFW(buf,0) = spawn?0x22b:0x22a;
 #endif
 
-#if PACKETVER >= 9
+#if PACKETVER >= 20071106
 	if (type) {
 		// shift payload 1 byte to the right for mob packets
 		WBUFB(buf,2) = 0; // padding?
@@ -865,7 +865,7 @@ static int clif_set_unit_walking(struct block_list* bl, struct unit_data* ud, un
 	WBUFW(buf, 0) = 0x22c;
 #endif
 
-#if PACKETVER >= 9
+#if PACKETVER >= 20071106
 	WBUFB(buf, 2) = 0; // padding?
 	offset++;
 	buf = WBUFP(buf,offset);
@@ -922,7 +922,7 @@ static int clif_set_unit_walking(struct block_list* bl, struct unit_data* ud, un
 //Used for spawn/walk packets, where the ID offset changes for packetver >=9
 static void clif_setdisguise(struct block_list *bl, unsigned char *buf,int len)
 {
-#if PACKETVER >= 9
+#if PACKETVER >= 20071106
 	WBUFL(buf,3)=-bl->id;
 #else
 	WBUFL(buf,2)=-bl->id;
@@ -1527,7 +1527,7 @@ void clif_sendfakenpc(struct map_session_data *sd, int npcid)
 	buf = WFIFOP(fd,0);
 	memset(WBUFP(buf,0), 0, packet_len(0x78));
 	WBUFW(buf,0)=0x78;
-#if PACKETVER >=9
+#if PACKETVER >= 20071106
 	WBUFB(buf,2) = 0; //Unknown bit
 	buf = WFIFOP(fd,1);
 #endif
@@ -7715,7 +7715,7 @@ void clif_parse_WantToConnection(int fd, TBL_PC* sd)
 
 	pc_setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd);
 
-#if PACKETVER < 8
+#if PACKETVER < 20070521
 	WFIFOHEAD(fd,4);
 	WFIFOL(fd,0) = sd->bl.id;
 	WFIFOSET(fd,4);
@@ -7907,7 +7907,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
 			clif_status_load(&sd->bl, SI_NIGHT, 1);
 		}
 
-#if PACKETVER >= 9
+#if PACKETVER >= 20070918
 		clif_equipcheckbox(sd);
 #endif
 
@@ -12330,7 +12330,7 @@ static int packetdb_readdb(void)
 	    0,  0,  0,  0, 55, 17,  3, 37,  46, -1, 23, -1,  3,108,  3,  2,
 #if PACKETVER < 2
 	    3, 28, 19, 11,  3, -1,  9,  5,  52, 51, 56, 58, 41,  2,  6,  6,
-#elif PACKETVER < 9	// 78-7b 亀島以降 lv99エフェクト用
+#elif PACKETVER < 20071106	// 78-7b 亀島以降 lv99エフェクト用
 	    3, 28, 19, 11,  3, -1,  9,  5,  54, 53, 58, 60, 41,  2,  6,  6,
 #else // change in 0x78 and 0x7c
 	    3, 28, 19, 11,  3, -1,  9,  5,  55, 53, 58, 60, 42,  2,  6,  6,
@@ -12372,7 +12372,7 @@ static int packetdb_readdb(void)
 	//#0x0200
 	   26, -1, 26, 10, 18, 26, 11, 34,  14, 36, 10,  0,  0, -1, 32, 10, // 0x20c change to 0 (was 19)
 	   22,  0, 26, 26, 42,  6,  6,  2,   2,282,282, 10, 10, -1, -1, 66,
-#if PACKETVER < 9
+#if PACKETVER < 20071106
 	   10, -1, -1,  8, 10,  2,282, 18,  18, 15, 58, 57, 64,  5, 71,  5,
 #else // 0x22c changed
 	   10, -1, -1,  8, 10,  2,282, 18,  18, 15, 58, 57, 65,  5, 71,  5,

+ 12 - 11
src/map/clif.h

@@ -26,18 +26,19 @@ struct guild;
 #include <stdarg.h>
 
 // server->client protocol version
-// v0 - pre-?
-// v1 - ?                  - 0x196
-// v2 - ?                  - 0x78, 0x79
-// v3 - ?                  - 0x1c8, 0x1c9, 0x1de
-// v4 - ?                  - 0x1d7, 0x1d8, 0x1d9, 0x1da
-// v5 - 2003-12-18aSakexe+ - 0x1ee, 0x1ef, 0x1f0
-// v6 - 2004-03-02aSakexe+ - 0x1f4, 0x1f5
-// v7 - 2005-04-11aSakexe+ - 0x229, 0x22a, 0x22b, 0x22c
-// v8 - 2007-05-21aSakexe+ - 0x283
-// v9 - 2007-11-06aSakexe+ - 0x78, 0x7c, 0x22c
+//        0 - pre-?
+//        1 - ?                  - 0x196
+//        2 - ?                  - 0x78, 0x79
+//        3 - ?                  - 0x1c8, 0x1c9, 0x1de
+//        4 - ?                  - 0x1d7, 0x1d8, 0x1d9, 0x1da
+//        5 - 2003-12-18aSakexe+ - 0x1ee, 0x1ef, 0x1f0
+//        6 - 2004-03-02aSakexe+ - 0x1f4, 0x1f5
+//        7 - 2005-04-11aSakexe+ - 0x229, 0x22a, 0x22b, 0x22c
+// 20070521 - 2007-05-21aSakexe+ - 0x283
+// 20070918 - 2007-09-18aSakexe+ - 0x2d6, 0x2d7, 0x2d8, 0x2d9, 0x2da
+// 20071106 - 2007-11-06aSakexe+ - 0x78, 0x7c, 0x22c
 #ifndef PACKETVER
-	#define PACKETVER	9
+	#define PACKETVER	20071106
 #endif
 
 // packet DB