From aa1ae40e2cc4102255d5183f6a9455b5418d0669 Mon Sep 17 00:00:00 2001 From: bash Date: Wed, 21 Aug 2024 19:34:26 +0000 Subject: [PATCH] Minor correction in logging text and removed in_use from the playerbots_names table and added an additional index for the fallback --- sql/characters/playerbots_names.sql | 3 +-- src/RandomPlayerbotFactory.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sql/characters/playerbots_names.sql b/sql/characters/playerbots_names.sql index cadcac9da..ba42fe950 100644 --- a/sql/characters/playerbots_names.sql +++ b/sql/characters/playerbots_names.sql @@ -100010,5 +100010,4 @@ INSERT INTO `playerbots_names` VALUES DELETE FROM `playerbots_names` WHERE LENGTH(`name`) > 12; ALTER TABLE `playerbots_names` MODIFY `name` varchar(12); - -ALTER TABLE `playerbots_names` ADD in_use BIT default 0; \ No newline at end of file +ALTER TABLE `playerbots_names` ADD UNIQUE INDEX name(name, gender); diff --git a/src/RandomPlayerbotFactory.cpp b/src/RandomPlayerbotFactory.cpp index a0a02f1db..1171fc9e5 100644 --- a/src/RandomPlayerbotFactory.cpp +++ b/src/RandomPlayerbotFactory.cpp @@ -412,7 +412,7 @@ void RandomPlayerbotFactory::CreateRandomBots() std::vector> account_creations; int account_creation = 0; - LOG_INFO("playerbots", "Creating cache for names, gender and race."); + LOG_INFO("playerbots", "Creating cache for names per gender and race."); QueryResult result = CharacterDatabase.Query("SELECT name, gender FROM playerbots_names"); if (!result) {