summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-22 14:19:39 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-22 14:19:39 +0000
commita65e4681cd29db1d0936523cc8ff5646dc7dca5b (patch)
tree11f6e3b19a7a829252caa983e62a2ad4c19baf02 /src/char/char.c
parent34f200c644ba8598448e20f4aa69a504e55d3c8f (diff)
downloadhercules-a65e4681cd29db1d0936523cc8ff5646dc7dca5b.tar.gz
hercules-a65e4681cd29db1d0936523cc8ff5646dc7dca5b.tar.bz2
hercules-a65e4681cd29db1d0936523cc8ff5646dc7dca5b.tar.xz
hercules-a65e4681cd29db1d0936523cc8ff5646dc7dca5b.zip
- Added support for the new "make new char" packet that has the rename button data. Thanks to Sara-chan for the format change update.
- Fixed itemdb.c sql compilation - Now when you specify a max level beyond what the exp table has, the last entry of the exp table will be duplicated to fill in the remaining levels. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9558 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/char/char.c b/src/char/char.c
index ac70d3046..a95a1cfda 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -3631,9 +3631,9 @@ int parse_char(int fd) {
break;
}
{ //Send to player.
- WFIFOHEAD(fd, 108);
+ WFIFOHEAD(fd, 110);
WFIFOW(fd,0) = 0x6d;
- memset(WFIFOP(fd,2), 0, 106);
+ memset(WFIFOP(fd,2), 0, 108);
WFIFOL(fd,2) = char_dat[i].status.char_id;
WFIFOL(fd,2+4) = char_dat[i].status.base_exp>LONG_MAX?LONG_MAX:char_dat[i].status.base_exp;
@@ -3649,7 +3649,7 @@ int parse_char(int fd) {
WFIFOW(fd,2+44) = (char_dat[i].status.max_hp > SHRT_MAX) ? SHRT_MAX : char_dat[i].status.max_hp;
WFIFOW(fd,2+46) = (char_dat[i].status.sp > SHRT_MAX) ? SHRT_MAX : char_dat[i].status.sp;
WFIFOW(fd,2+48) = (char_dat[i].status.max_sp > SHRT_MAX) ? SHRT_MAX : char_dat[i].status.max_sp;
- WFIFOW(fd,2+50) = DEFAULT_WALK_SPEED; // char_dat[i].status.speed;
+ WFIFOW(fd,2+50) = DEFAULT_WALK_SPEED;
WFIFOW(fd,2+52) = char_dat[i].status.class_;
WFIFOW(fd,2+54) = char_dat[i].status.hair;
@@ -3669,9 +3669,15 @@ int parse_char(int fd) {
WFIFOB(fd,2+101) = (char_dat[i].status.int_ > UCHAR_MAX) ? UCHAR_MAX : char_dat[i].status.int_;
WFIFOB(fd,2+102) = (char_dat[i].status.dex > UCHAR_MAX) ? UCHAR_MAX : char_dat[i].status.dex;
WFIFOB(fd,2+103) = (char_dat[i].status.luk > UCHAR_MAX) ? UCHAR_MAX : char_dat[i].status.luk;
+#if PACKETVER > 7
+ //Updated packet structure with rename-button included. Credits to Sara-chan
+ WFIFOW(fd,2+104) = char_dat[i].status.char_num;
+ WFIFOB(fd,2+106) = 1; //Rename bit.
+ WFIFOSET(fd,110);
+#else
WFIFOB(fd,2+104) = char_dat[i].status.char_num;
-
WFIFOSET(fd,108);
+#endif
RFIFOSKIP(fd,37);
}
for(ch = 0; ch < 9; ch++) {