|
@@ -1729,6 +1729,10 @@ enum e_char_del_response char_delete(struct char_session_data* sd, uint32 char_i
|
|
|
if (SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `dest_id`='%d'", schema_config.mail_db, char_id))
|
|
|
Sql_ShowDebug(sql_handle);
|
|
|
|
|
|
+ /* mark mails as sent from server, if a character gets deleted */
|
|
|
+ if (SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `send_id`='0' WHERE `send_id`='%d'", schema_config.mail_db, char_id))
|
|
|
+ Sql_ShowDebug(sql_handle);
|
|
|
+
|
|
|
#ifdef ENABLE_SC_SAVING
|
|
|
/* status changes */
|
|
|
if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", schema_config.scdata_db, account_id, char_id) )
|