summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorepoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-20 22:50:47 +0000
committerepoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-20 22:50:47 +0000
commit8b1f2ab48f64c275b3135006553f7b11fafb8d89 (patch)
tree8e2708d19288afbe62e3a52d696b3ec99e79cbd4 /src/char
parentee36fd725c890c5156f1d777368eeb84d5a3922e (diff)
downloadhercules-8b1f2ab48f64c275b3135006553f7b11fafb8d89.tar.gz
hercules-8b1f2ab48f64c275b3135006553f7b11fafb8d89.tar.bz2
hercules-8b1f2ab48f64c275b3135006553f7b11fafb8d89.tar.xz
hercules-8b1f2ab48f64c275b3135006553f7b11fafb8d89.zip
- Fixed character deletion not updating the client when char_del_delay was set to 0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15738 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 33abbc25b..ae8821cbe 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -3318,6 +3318,22 @@ static void char_delete2_req(int fd, struct char_session_data* sd)
return;
}
*/
+
+ if( char_del_delay == 0 )
+ {// immediately delete the character if no character deletion delay is found
+ int k;
+
+ // delete the character entirely
+ delete_char_sql(char_id);
+
+ // refresh character list cache
+ for( k = i; k < MAX_CHARS - 1; ++ k )
+ sd->found_char[k] = sd->found_char[k + 1];
+
+ // send the notification packets of this
+ char_delete2_ack(fd, char_id, 1, time(NULL));
+ char_delete2_accept_ack(fd, char_id, 1);
+ }
// success
delete_date = time(NULL)+char_del_delay;