mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 00:08:01 +00:00
chore(DB/SQL): Correct file to comply with standards (#14953)
This commit is contained in:
@@ -9,13 +9,13 @@ Table structure for table `pet_name_generation_locale` */
|
|||||||
|
|
||||||
DROP TABLE IF EXISTS `pet_name_generation_locale`;
|
DROP TABLE IF EXISTS `pet_name_generation_locale`;
|
||||||
CREATE TABLE `pet_name_generation_locale` (
|
CREATE TABLE `pet_name_generation_locale` (
|
||||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
`ID` mediumint unsigned NOT NULL,
|
||||||
`locale` varchar(4) NOT NULL,
|
`Locale` varchar(4) NOT NULL,
|
||||||
`word` tinytext NOT NULL,
|
`Word` tinytext NOT NULL,
|
||||||
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
`Entry` mediumint unsigned NOT NULL DEFAULT '0',
|
||||||
`half` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
`Half` tinyint unsigned NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`ID`,`locale`)
|
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),
|
INSERT INTO `pet_name_generation_locale` (`id`, `locale`, `word`, `entry`, `half`) VALUES (261, 'esES', 'piedras', 26125, 1),
|
||||||
(262, 'esES', 'rocas', 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),
|
(311, 'esMX', 'Captura', 26125, 0),
|
||||||
(312, 'esMX', 'Bebe', 26125, 0),
|
(312, 'esMX', 'Bebe', 26125, 0),
|
||||||
(313, 'esMX', 'Rebana', 26125, 0);
|
(313, 'esMX', 'Rebana', 26125, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ void ObjectMgr::LoadPetNamesLocales()
|
|||||||
uint32 oldMSTime = getMSTime();
|
uint32 oldMSTime = getMSTime();
|
||||||
|
|
||||||
// 0 1 2 3
|
// 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)
|
if (!result)
|
||||||
{
|
{
|
||||||
@@ -474,9 +474,13 @@ void ObjectMgr::LoadPetNamesLocales()
|
|||||||
bool half = fields[3].Get<bool>();
|
bool half = fields[3].Get<bool>();
|
||||||
std::pair<uint32, LocaleConstant> pairkey = std::make_pair(entry, locale);
|
std::pair<uint32, LocaleConstant> pairkey = std::make_pair(entry, locale);
|
||||||
if (half)
|
if (half)
|
||||||
|
{
|
||||||
_petHalfLocaleName1[pairkey].push_back(word);
|
_petHalfLocaleName1[pairkey].push_back(word);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
_petHalfLocaleName0[pairkey].push_back(word);
|
_petHalfLocaleName0[pairkey].push_back(word);
|
||||||
|
}
|
||||||
++count;
|
++count;
|
||||||
} while (result->NextRow());
|
} while (result->NextRow());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user