Partial cherry-pick 653954c14d6136295691e18d7e21918d46d0761f to fix build

Core/Misc:
- Update LocaleConstant enum
- Update Quest locale system for WoD
- Fix some rnd typo in quest template

Conflicts:
	src/server/game/Chat/ChatLink.cpp
	src/server/game/Entities/Creature/GossipDef.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Globals/ObjectMgr.h
	src/server/game/Quests/QuestDef.cpp
	src/server/game/Quests/QuestDef.h
	src/server/game/Server/Packets/QuestPackets.cpp
	src/server/game/World/World.cpp
	src/server/scripts/Commands/cs_reload.cpp
	src/server/shared/Common.cpp
	src/server/shared/Common.h
This commit is contained in:
ariel- committed 2016-01-11 23:27:47 -03:00
1 parent b14208520e
commit 471002f233
3 files changed
+14 -12

No files matched your search

+4 -3
View File
@@ -27,15 +27,16 @@ char const* localeNames[TOTAL_LOCALES] = {
"zhTW",
"esES",
"esMX",
"ruRU"
"ruRU",
"none",
"ptBR"
};
LocaleConstant GetLocaleByName(const std::string& name)
{
for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
if (name==localeNames[i])
if (name == localeNames[i])
return LocaleConstant(i);
return LOCALE_enUS; // including enGB case
}
+2 -1
View File
@@ -125,9 +125,10 @@ enum LocaleConstant
TOTAL_LOCALES
};
const uint8 OLD_TOTAL_LOCALES = 9; /// @todo convert in simple system
#define DEFAULT_LOCALE LOCALE_enUS
#define MAX_LOCALES 8
#define MAX_LOCALES 10
#define MAX_ACCOUNT_TUTORIAL_VALUES 8
extern char const* localeNames[TOTAL_LOCALES];
+8 -8
View File
@@ -334,7 +334,7 @@ void ObjectMgr::LoadCreatureLocales()
CreatureLocale& data = _creatureLocaleStore[entry];
for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
for (uint8 i = OLD_TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
AddLocaleString(fields[1 + 3 * (i - 1)].GetString(), locale, data.Name);
@@ -371,7 +371,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
GossipMenuItemsLocale& data = _gossipMenuItemsLocaleStore[MAKE_PAIR32(menuId, id)];
for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
for (uint8 i = OLD_TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
AddLocaleString(fields[2 + 2 * (i - 1)].GetString(), locale, data.OptionText);
@@ -402,7 +402,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
PointOfInterestLocale& data = _pointOfInterestLocaleStore[entry];
for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
for (uint8 i = OLD_TOTAL_LOCALES - 1; i > 0; --i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.IconName);
} while (result->NextRow());
@@ -4704,7 +4704,7 @@ void ObjectMgr::LoadQuestLocales()
QuestLocale& data = _questLocaleStore[entry];
for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
for (uint8 i = OLD_TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
@@ -5331,7 +5331,7 @@ void ObjectMgr::LoadPageTextLocales()
PageTextLocale& data = _pageTextLocaleStore[entry];
for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
for (uint8 i = OLD_TOTAL_LOCALES - 1; i > 0; --i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Text);
} while (result->NextRow());
@@ -5594,7 +5594,7 @@ void ObjectMgr::LoadNpcTextLocales()
NpcTextLocale& data = _npcTextLocaleStore[entry];
for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
for (uint8 i = OLD_TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant) i;
for (uint8 j = 0; j < MAX_GOSSIP_TEXT_OPTIONS; ++j)
@@ -7815,7 +7815,7 @@ bool ObjectMgr::LoadTrinityStrings()
data.Content.resize(DEFAULT_LOCALE + 1);
for (int8 i = TOTAL_LOCALES - 1; i >= 0; --i)
for (int8 i = OLD_TOTAL_LOCALES - 1; i >= 0; --i)
AddLocaleString(fields[i + 1].GetString(), LocaleConstant(i), data.Content);
}
while (result->NextRow());
@@ -8813,7 +8813,7 @@ void ObjectMgr::LoadBroadcastTextLocales()
continue;
}
for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
for (uint8 i = OLD_TOTAL_LOCALES - 1; i > 0; --i)
{
LocaleConstant locale = LocaleConstant(i);
AddLocaleString(fields[1 + (i - 1)].GetString(), locale, bct->second.MaleText);