1492a1493,1499 > // check the number of already existing chars in this account > if( char_per_account != 0 ) { > if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `account_id` = '%d'", char_db, sd->account_id) ) > Sql_ShowDebug(sql_handle); > if( Sql_NumRows(sql_handle) >= char_per_account ) > return -2; // character account limit exceeded > } 1576,1580c1583,1587 < char name[NAME_LENGTH]; < 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, elemental_id; < char *data; < size_t len; --- > char name[NAME_LENGTH]; > 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; > char* data; > size_t len; 1582,1583c1589,1590 < 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); --- > 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) ) > Sql_ShowDebug(sql_handle); 1601,1602d1607 < Sql_GetData(sql_handle, 9, &data, NULL); < elemental_id = atoi(data); 1655,1658d1659 < < /* remove elemental */ < if (elemental_id) < mapif_elemental_delete(elemental_id); 1690,1701c1691,1698 < /* delete character registry */ < if (SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `type`=3 AND `char_id`='%d'", reg_db, char_id)) < Sql_ShowDebug(sql_handle); < < /* delete skills */ < if (SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id`='%d'", skill_db, char_id)) < 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); < --- > /* delete character registry */ > if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `type`=3 AND `char_id`='%d'", reg_db, char_id) ) > Sql_ShowDebug(sql_handle); > > /* delete skills */ > if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id`='%d'", skill_db, char_id) ) > Sql_ShowDebug(sql_handle); >