- Re-committed r16985 (pid:161281).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17001 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
54576f5971
commit
eb9fa64f63
@ -1580,11 +1580,11 @@ int delete_char_sql(int char_id)
|
|||||||
{
|
{
|
||||||
char name[NAME_LENGTH];
|
char name[NAME_LENGTH];
|
||||||
char esc_name[NAME_LENGTH*2+1]; //Name needs be escaped.
|
char esc_name[NAME_LENGTH*2+1]; //Name needs be escaped.
|
||||||
int account_id, party_id, guild_id, hom_id, base_level, partner_id, father_id, mother_id;
|
int account_id, party_id, guild_id, hom_id, base_level, partner_id, father_id, mother_id, elemental_id;
|
||||||
char *data;
|
char *data;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `name`,`account_id`,`party_id`,`guild_id`,`base_level`,`homun_id`,`partner_id`,`father`,`mother` FROM `%s` WHERE `char_id`='%d'", char_db, char_id) )
|
if (SQL_ERROR == Sql_Query(sql_handle, "SELECT `name`,`account_id`,`party_id`,`guild_id`,`base_level`,`homun_id`,`partner_id`,`father`,`mother`,`elemental_id` FROM `%s` WHERE `char_id`='%d'", char_db, char_id))
|
||||||
Sql_ShowDebug(sql_handle);
|
Sql_ShowDebug(sql_handle);
|
||||||
|
|
||||||
if( SQL_SUCCESS != Sql_NextRow(sql_handle) )
|
if( SQL_SUCCESS != Sql_NextRow(sql_handle) )
|
||||||
@ -1603,6 +1603,8 @@ int delete_char_sql(int char_id)
|
|||||||
Sql_GetData(sql_handle, 6, &data, NULL); partner_id = atoi(data);
|
Sql_GetData(sql_handle, 6, &data, NULL); partner_id = atoi(data);
|
||||||
Sql_GetData(sql_handle, 7, &data, NULL); father_id = atoi(data);
|
Sql_GetData(sql_handle, 7, &data, NULL); father_id = atoi(data);
|
||||||
Sql_GetData(sql_handle, 8, &data, NULL); mother_id = atoi(data);
|
Sql_GetData(sql_handle, 8, &data, NULL); mother_id = atoi(data);
|
||||||
|
Sql_GetData(sql_handle, 9, &data, NULL);
|
||||||
|
elemental_id = atoi(data);
|
||||||
|
|
||||||
Sql_EscapeStringLen(sql_handle, esc_name, name, min(len, NAME_LENGTH));
|
Sql_EscapeStringLen(sql_handle, esc_name, name, min(len, NAME_LENGTH));
|
||||||
Sql_FreeResult(sql_handle);
|
Sql_FreeResult(sql_handle);
|
||||||
@ -1656,6 +1658,10 @@ int delete_char_sql(int char_id)
|
|||||||
if( hom_id )
|
if( hom_id )
|
||||||
mapif_homunculus_delete(hom_id);
|
mapif_homunculus_delete(hom_id);
|
||||||
|
|
||||||
|
/* remove elemental */
|
||||||
|
if (elemental_id)
|
||||||
|
mapif_elemental_delete(elemental_id);
|
||||||
|
|
||||||
/* remove mercenary data */
|
/* remove mercenary data */
|
||||||
mercenary_owner_delete(char_id);
|
mercenary_owner_delete(char_id);
|
||||||
|
|
||||||
@ -1694,6 +1700,10 @@ int delete_char_sql(int char_id)
|
|||||||
if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id`='%d'", skill_db, char_id) )
|
if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id`='%d'", skill_db, char_id) )
|
||||||
Sql_ShowDebug(sql_handle);
|
Sql_ShowDebug(sql_handle);
|
||||||
|
|
||||||
|
/* delete mails (only received) */
|
||||||
|
if (SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `dest_id`='%d'", mail_db, char_id))
|
||||||
|
Sql_ShowDebug(sql_handle);
|
||||||
|
|
||||||
#ifdef ENABLE_SC_SAVING
|
#ifdef ENABLE_SC_SAVING
|
||||||
/* status changes */
|
/* status changes */
|
||||||
if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", scdata_db, account_id, char_id) )
|
if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", scdata_db, account_id, char_id) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user