浏览代码

Quest data should be cleared on char deletion (#4633)

* Fixes #4628.
* Player quest data should be deleted when the character is deleted.
Thanks to @Tokeiburu!
Aleos 5 年之前
父节点
当前提交
35102c3059
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/char/char.cpp

+ 4 - 0
src/char/char.cpp

@@ -1708,6 +1708,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 `char_id` = '%d'", schema_config.bonus_script_db, char_id) )
 		Sql_ShowDebug(sql_handle);
 
+	/* Quest Data */
+	if (SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id` = '%d'", schema_config.quest_db, char_id))
+		Sql_ShowDebug(sql_handle);
+
 	/* Achievement Data */
 	if (SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id` = '%d'", schema_config.achievement_table, char_id))
 		Sql_ShowDebug(sql_handle);