From 66f4feb1da0593885d2a90081ab3be3fecd152e7 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 11 Feb 2023 19:50:19 -0300 Subject: [PATCH] chore(DB/SQL): Correct file to comply with standards (#14953) --- data/sql/updates/db_world/2023_02_11_09.sql | 13 ++++++------- src/server/game/Globals/ObjectMgr.cpp | 6 +++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/data/sql/updates/db_world/2023_02_11_09.sql b/data/sql/updates/db_world/2023_02_11_09.sql index 6b532dec2..fa26c445d 100644 --- a/data/sql/updates/db_world/2023_02_11_09.sql +++ b/data/sql/updates/db_world/2023_02_11_09.sql @@ -9,13 +9,13 @@ Table structure for table `pet_name_generation_locale` */ DROP TABLE IF EXISTS `pet_name_generation_locale`; CREATE TABLE `pet_name_generation_locale` ( - `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `locale` varchar(4) NOT NULL, - `word` tinytext NOT NULL, - `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', - `half` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ID` mediumint unsigned NOT NULL, + `Locale` varchar(4) NOT NULL, + `Word` tinytext NOT NULL, + `Entry` mediumint unsigned NOT NULL DEFAULT '0', + `Half` tinyint unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`ID`,`locale`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; +); INSERT INTO `pet_name_generation_locale` (`id`, `locale`, `word`, `entry`, `half`) VALUES (261, 'esES', 'piedras', 26125, 1), (262, 'esES', 'rocas', 26125, 1), @@ -123,4 +123,3 @@ INSERT INTO `pet_name_generation_locale` (`id`, `locale`, `word`, `entry`, `half (311, 'esMX', 'Captura', 26125, 0), (312, 'esMX', 'Bebe', 26125, 0), (313, 'esMX', 'Rebana', 26125, 0); - diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index d71c4b1e8..e05a041a2 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -453,7 +453,7 @@ void ObjectMgr::LoadPetNamesLocales() uint32 oldMSTime = getMSTime(); // 0 1 2 3 - QueryResult result = WorldDatabase.Query("SELECT locale, word, entry, half FROM pet_name_generation_locale"); + QueryResult result = WorldDatabase.Query("SELECT Locale, Word, Entry, Half FROM pet_name_generation_locale"); if (!result) { @@ -474,9 +474,13 @@ void ObjectMgr::LoadPetNamesLocales() bool half = fields[3].Get(); std::pair pairkey = std::make_pair(entry, locale); if (half) + { _petHalfLocaleName1[pairkey].push_back(word); + } else + { _petHalfLocaleName0[pairkey].push_back(word); + } ++count; } while (result->NextRow());