Преглед изворни кода

* Added field for the change slot feature to character select list packet for 2011-09-28aRagexeRE and newer.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14977 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei пре 13 година
родитељ
комит
7b4a76f4bd
4 измењених фајлова са 12 додато и 2 уклоњено
  1. 1 0
      Changelog-Trunk.txt
  2. 5 1
      src/char/char.c
  3. 5 1
      src/char_sql/char.c
  4. 1 0
      src/common/mmo.h

+ 1 - 0
Changelog-Trunk.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 2011/10/16
+	* Added field for the change slot feature to character select list packet for 2011-09-28aRagexeRE and newer. [Ai4rei]
 	* Changed function-like macros into inline functions where it seemed appropriate (topic:264007). [Ai4rei]
 	* Fixed public/guild chat message packets sending strings without zero-termination causing recent clients to display trailing junk on such messages (bugreport:5068). [Ai4rei]
 	- Changed memcpy to safestrncpy in message packets where overlong messages are truncated (thus loose zero-termination).

+ 5 - 1
src/char/char.c

@@ -1793,7 +1793,7 @@ int count_users(void)
 // Writes char data to the buffer in the format used by the client.
 // Used in packets 0x6b (chars info) and 0x6d (new char info)
 // Returns the size
-#define MAX_CHAR_BUF 136 //Max size (for WFIFOHEAD calls)
+#define MAX_CHAR_BUF 140 //Max size (for WFIFOHEAD calls)
 int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
 {
 	unsigned short offset = 0;
@@ -1860,6 +1860,10 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
 #if PACKETVER >= 20110111
 	WBUFL(buf,128) = p->robe;
 	offset += 4;
+#endif
+#if PACKETVER >= 20110928
+	WBUFL(buf,132) = 0;  // change slot feature (0 = disabled, otherwise enabled)
+	offset += 4;
 #endif
 	return 106+offset;
 }

+ 5 - 1
src/char_sql/char.c

@@ -1591,7 +1591,7 @@ int count_users(void)
 // Writes char data to the buffer in the format used by the client.
 // Used in packets 0x6b (chars info) and 0x6d (new char info)
 // Returns the size
-#define MAX_CHAR_BUF 136 //Max size (for WFIFOHEAD calls)
+#define MAX_CHAR_BUF 140 //Max size (for WFIFOHEAD calls)
 int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
 {
 	unsigned short offset = 0;
@@ -1658,6 +1658,10 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
 #if PACKETVER >= 20110111
 	WBUFL(buf,128) = p->robe;
 	offset += 4;
+#endif
+#if PACKETVER >= 20110928
+	WBUFL(buf,132) = 0;  // change slot feature (0 = disabled, otherwise enabled)
+	offset += 4;
 #endif
 	return 106+offset;
 }

+ 1 - 0
src/common/mmo.h

@@ -41,6 +41,7 @@
 // 20100803 - 2010-08-03aRagexeRE+ - 0x6b, 0x6d, 0x827, 0x828, 0x829, 0x82a, 0x82b, 0x82c, 0x842, 0x843
 // 20101124 - 2010-11-24aRagexeRE+ - 0x856, 0x857, 0x858
 // 20110111 - 2011-01-11aRagexeRE+ - 0x6b, 0x6d
+// 20110928 - 2011-09-28aRagexeRE+ - 0x6b, 0x6d
 
 #ifndef PACKETVER
 	#define PACKETVER	20081126