From c3eb0484208455c7804f5d6ee2090abb8a424511 Mon Sep 17 00:00:00 2001 From: Sophie Hamilton Date: Mon, 24 Feb 2020 16:15:59 +0000 Subject: [PATCH] Update deleteCharacter, remove charainfofriendlist Not all data was deleted when deleting a character, making it impossible to play a new character with the same name. Add in delete commands for the additional tables and remove the reference to the (non-existent) charainfofriendlist table. --- src/api/SapphireApi.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/SapphireApi.cpp b/src/api/SapphireApi.cpp index f12da082..e31e37c1 100644 --- a/src/api/SapphireApi.cpp +++ b/src/api/SapphireApi.cpp @@ -192,13 +192,15 @@ void SapphireApi::deleteCharacter( std::string name, const uint32_t accountId ) g_charaDb.execute( "DELETE FROM characlass WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); g_charaDb.execute( "DELETE FROM charaglobalitem WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); g_charaDb.execute( "DELETE FROM charainfoblacklist WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charainfofriendlist WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); g_charaDb.execute( "DELETE FROM charainfolinkshell WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); g_charaDb.execute( "DELETE FROM charainfosearch WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); g_charaDb.execute( "DELETE FROM charaitemcrystal WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charaitemcurrency WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); g_charaDb.execute( "DELETE FROM charaiteminventory WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); g_charaDb.execute( "DELETE FROM charaitemgearset WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charamonsternote WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); g_charaDb.execute( "DELETE FROM charaquest WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charastatus WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); } std::vector< PlayerMinimal > SapphireApi::getCharList( uint32_t accountId )