diff options
author | Kaev <Demonhunter@hotmail.de> | 2017-12-04 22:08:26 +0100 |
---|---|---|
committer | Yehonal <yehonal.azeroth@gmail.com> | 2017-12-04 22:08:26 +0100 |
commit | 7a6c6315b880969109e0cb95fb4938705461f17d (patch) | |
tree | f034c37f789bbc689ed2fa96b11d2bf1a53e47d0 /modules | |
parent | 069bdf280ff7650fa3886dc085f04002cd953cc2 (diff) |
Realmlist returns 0 instead of 1 characters after you deleted all characters (#724)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/worldengine/nucleus/src/Database/Implementation/CharacterDatabase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/worldengine/nucleus/src/Database/Implementation/CharacterDatabase.cpp b/modules/worldengine/nucleus/src/Database/Implementation/CharacterDatabase.cpp index a656b66884..c1ace0ccaa 100644 --- a/modules/worldengine/nucleus/src/Database/Implementation/CharacterDatabase.cpp +++ b/modules/worldengine/nucleus/src/Database/Implementation/CharacterDatabase.cpp @@ -136,7 +136,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES, "DELETE FROM account_instance_times WHERE accountId = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES, "INSERT INTO account_instance_times (accountId, instanceId, releaseTime) VALUES (?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_MATCH_MAKER_RATING, "SELECT matchMakerRating, maxMMR FROM character_arena_stats WHERE guid = ? AND slot = ?", CONNECTION_SYNCH); - PrepareStatement(CHAR_SEL_CHARACTER_COUNT, "SELECT account, COUNT(guid) FROM characters WHERE account = ? GROUP BY account", CONNECTION_ASYNC); + PrepareStatement(CHAR_SEL_CHARACTER_COUNT, "SELECT ? AS account,(SELECT COUNT(*) FROM characters WHERE account =?) AS cnt", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_NAME, "UPDATE characters set name = ?, at_login = at_login & ~ ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_DECLINED_NAME, "DELETE FROM character_declinedname WHERE guid = ?", CONNECTION_ASYNC); |