Browse Source

- Reverted the packet structure changes to mmo_char_send006b in r9588 and corrected the bug that I was originally fixing.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9598 54d463be-8e91-2dee-dedb-b68131a5f0ec
FlavioJS 18 năm trước cách đây
mục cha
commit
4fa4e26d99
3 tập tin đã thay đổi với 12 bổ sung4 xóa
  1. 3 0
      Changelog-Trunk.txt
  2. 4 2
      src/char/char.c
  3. 5 2
      src/char_sql/char.c

+ 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.
 
+2006/12/30
+	* Reverted the packet structure changes to mmo_char_send006b in r9588 and 
+	  corrected the bug that I was originally fixing. [FlavioJS]
 2006/12/29
 	* Skill use is now cancelled when you use it while cloaking, and the
 	  uncloaking process warps you. [Skotlex]

+ 4 - 2
src/char/char.c

@@ -1695,8 +1695,7 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
 	for(i = 0; i < found_num; i++) {
 		p = &char_dat[sd->found_char[i]].status;
 #if PACKETVER > 7
-		j = offset + (found_num * 2) + (i * 106); // increase speed of code
-		WFIFOW(fd,offset+(i*2)) = 1; //TODO: Handle this rename bit: 0 to enable renaming
+		j = offset + (i * 108); // increase speed of code
 #else
 		j = offset + (i * 106); // increase speed of code
 #endif
@@ -1741,6 +1740,9 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
 		WFIFOB(fd,j+102) = (p->dex > UCHAR_MAX) ? UCHAR_MAX : p->dex;
 		WFIFOB(fd,j+103) = (p->luk > UCHAR_MAX) ? UCHAR_MAX : p->luk;
 		WFIFOW(fd,j+104) = p->char_num;
+#if PACKETVER > 7
+		WFIFOW(fd,j+106) = 1; //TODO: Handle this rename bit: 0 to enable renaming
+#endif
 	}
 
 	WFIFOSET(fd,WFIFOW(fd,2));

+ 5 - 2
src/char_sql/char.c

@@ -1725,8 +1725,7 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
 		p = &char_dat;
 
 #if PACKETVER > 7
-		j = offset + (found_num * 2) + (i * 108);
-		WFIFOW(fd,offset+(i*2)) = 1; //TODO: Handle this rename bit: 0 to enable renaming //Updated packet structure with rename-button included. Credits to Sara-chan
+		j = offset + (i * 108);
 #else
 		j = offset + (i * 106); // increase speed of code
 #endif
@@ -1771,6 +1770,10 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
 		WFIFOB(fd,j+102) = (p->dex > UCHAR_MAX) ? UCHAR_MAX : p->dex;
 		WFIFOB(fd,j+103) = (p->luk > UCHAR_MAX) ? UCHAR_MAX : p->luk;
 		WFIFOW(fd,j+104) = p->char_num;
+#if PACKETVER > 7
+		//Updated packet structure with rename-button included. Credits to Sara-chan
+		WFIFOW(fd,j+106) = 1; //TODO: Handle this rename bit: 0 to enable renaming
+#endif
 	}
 	WFIFOSET(fd,WFIFOW(fd,2));
 //	printf("mmo_char_send006b end..\n");