mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-30 08:53:47 +00:00
@@ -456,6 +456,13 @@ void RandomPlayerbotFactory::CreateRandomBots()
|
|||||||
CharacterDatabase.Execute("DELETE FROM characters WHERE account IN (SELECT id FROM acore_auth.account WHERE username LIKE '{}%%')",
|
CharacterDatabase.Execute("DELETE FROM characters WHERE account IN (SELECT id FROM acore_auth.account WHERE username LIKE '{}%%')",
|
||||||
sPlayerbotAIConfig->randomBotAccountPrefix.c_str());
|
sPlayerbotAIConfig->randomBotAccountPrefix.c_str());
|
||||||
|
|
||||||
|
// Clean up orphaned entries in playerbots_guild_tasks
|
||||||
|
PlayerbotsDatabase.Execute("DELETE FROM playerbots_guild_tasks WHERE owner NOT IN (SELECT guid FROM acore_characters.characters)");
|
||||||
|
|
||||||
|
// Clean up orphaned entries in playerbots_db_store
|
||||||
|
PlayerbotsDatabase.Execute("DELETE FROM playerbots_db_store WHERE guid NOT IN (SELECT guid FROM acore_characters.characters WHERE account IN (SELECT id FROM acore_auth.account WHERE username NOT LIKE '{}%%'))",
|
||||||
|
sPlayerbotAIConfig->randomBotAccountPrefix.c_str());
|
||||||
|
|
||||||
// Clean up orphaned records in character-related tables
|
// Clean up orphaned records in character-related tables
|
||||||
CharacterDatabase.Execute("DELETE FROM arena_team_member WHERE guid NOT IN (SELECT guid FROM characters)");
|
CharacterDatabase.Execute("DELETE FROM arena_team_member WHERE guid NOT IN (SELECT guid FROM characters)");
|
||||||
CharacterDatabase.Execute("DELETE FROM arena_team WHERE arenaTeamId NOT IN (SELECT arenaTeamId FROM arena_team_member)");
|
CharacterDatabase.Execute("DELETE FROM arena_team WHERE arenaTeamId NOT IN (SELECT arenaTeamId FROM arena_team_member)");
|
||||||
|
|||||||
Reference in New Issue
Block a user