From b4e4b56f78fb49ab9c5683d30935a74bcb045132 Mon Sep 17 00:00:00 2001 From: Inkfish Date: Mon, 12 Oct 2009 09:51:47 +0000 Subject: 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 --- src/char_sql/char.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') 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) -- cgit v1.2.3-70-g09d2