chore(DB/SQL): Correct file to comply with standards (#14953)

This commit is contained in:
Skjalf
2023-02-11 19:50:19 -03:00
committed by GitHub
parent 18cf1761dc
commit 66f4feb1da
2 changed files with 11 additions and 8 deletions

View File

@@ -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);

View File

@@ -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<bool>();
std::pair<uint32, LocaleConstant> pairkey = std::make_pair(entry, locale);
if (half)
{
_petHalfLocaleName1[pairkey].push_back(word);
}
else
{
_petHalfLocaleName0[pairkey].push_back(word);
}
++count;
} while (result->NextRow());