diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-10-12 09:51:47 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-10-12 09:51:47 +0000 |
commit | b4e4b56f78fb49ab9c5683d30935a74bcb045132 (patch) | |
tree | bc506aaab53da1a0adfe35122fe538a12ccc3057 | |
parent | fd073c4aaccf50ec3ae9a9025aea26edf984df12 (diff) | |
download | hercules-b4e4b56f78fb49ab9c5683d30935a74bcb045132.tar.gz hercules-b4e4b56f78fb49ab9c5683d30935a74bcb045132.tar.bz2 hercules-b4e4b56f78fb49ab9c5683d30935a74bcb045132.tar.xz hercules-b4e4b56f78fb49ab9c5683d30935a74bcb045132.zip |
Fixed an error when 'char_rename' is set to 'no'
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14088 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/char_sql/char.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index e402c4f7a..00c4f2073 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1595,12 +1595,11 @@ int mmo_char_tobuf(uint8* buf, struct mmo_charstatus* p) WBUFB(buf,102) = min(p->dex, UCHAR_MAX); WBUFB(buf,103) = min(p->luk, UCHAR_MAX); WBUFW(buf,104) = p->slot; - if (char_rename) { - WBUFW(buf,106) = (p->rename >= char_max_rename && char_max_rename != 0) ? 1 : 0;// Rename bit (0=rename,1=no rename) - return 108; - } else { - return 106; - } + if( char_rename && (!char_max_rename || p->rename < char_max_rename) ) + WBUFW(buf,106) = 1; + else + WBUFW(buf,106) = 0; + return 108; } int mmo_char_send006b(int fd, struct char_session_data* sd) |