summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-04-23 13:19:25 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-04-23 13:19:25 +0000
commit6da12760fbcc987747c97f70521bd9add2e0060f (patch)
treed6d4cea55b87e9b596e38b3b8d34e7ad03733258 /src/char_sql
parentb7bf8d95500877427f62ec5fceb109bc0faaa82f (diff)
downloadhercules-6da12760fbcc987747c97f70521bd9add2e0060f.tar.gz
hercules-6da12760fbcc987747c97f70521bd9add2e0060f.tar.bz2
hercules-6da12760fbcc987747c97f70521bd9add2e0060f.tar.xz
hercules-6da12760fbcc987747c97f70521bd9add2e0060f.zip
Merged a few updates for supporting renewal clients (thanks to Diablo): [Skotlex]
- Updated packet_db entries - Added slot info on packet 0x6b (PACKETVER > 20100413) - Trade add-item use packet 0x80f (PACKETVER > 20100223) - Guild storage add-item use packet 0x1c4 (PACKETVER > 20090603) - Vending list use packet 0x800 (PACKETVER > 20100105) - Allow client to change item-share party settings (PACKETVER > 20090603) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14286 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 9fc4aea99..50fff099d 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -1601,15 +1601,23 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
int mmo_char_send006b(int fd, struct char_session_data* sd)
{
- int j;
+ int j, offset = 0;
+#if PACKETVER >= 20100413
+ offset += 3;
+#endif
if (save_log)
ShowInfo("Loading Char Data ("CL_BOLD"%d"CL_RESET")\n",sd->account_id);
- j = 24; // offset
+ j = 24 + offset; // offset
WFIFOHEAD(fd,j + MAX_CHARS*MAX_CHAR_BUF);
WFIFOW(fd,0) = 0x6b;
- memset(WFIFOP(fd,4), 0, 20); // unknown bytes
+#if PACKETVER >= 20100413
+ WFIFOB(fd,4) = MAX_CHARS; // Max slots.
+ WFIFOB(fd,5) = MAX_CHARS; // Available slots.
+ WFIFOB(fd,6) = MAX_CHARS; // Premium slots.
+#endif
+ memset(WFIFOP(fd,4 + offset), 0, 20); // unknown bytes
j+=mmo_chars_fromsql(sd, WFIFOP(fd,j));
WFIFOW(fd,2) = j; // packet len
WFIFOSET(fd,j);