mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Added Loading.Locales to enable/disable the load of locales (#30013)
This commit is contained in:
committed by
GitHub
parent
18fd59d965
commit
3fd9677543
@@ -309,6 +309,9 @@ void Quest::LoadQuestObjectiveVisualEffect(Field* fields)
|
||||
void Quest::LoadConditionalConditionalQuestDescription(Field* fields)
|
||||
{
|
||||
LocaleConstant locale = GetLocaleByName(fields[4].GetStringView());
|
||||
if (!sWorld->getBoolConfig(CONFIG_LOAD_LOCALES) && locale != DEFAULT_LOCALE)
|
||||
return;
|
||||
|
||||
if (locale >= TOTAL_LOCALES)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `quest_description_conditional` has invalid locale {} set for quest {}. Skipped.", fields[4].GetCString(), fields[0].GetUInt32());
|
||||
@@ -329,6 +332,9 @@ void Quest::LoadConditionalConditionalQuestDescription(Field* fields)
|
||||
void Quest::LoadConditionalConditionalRequestItemsText(Field* fields)
|
||||
{
|
||||
LocaleConstant locale = GetLocaleByName(fields[4].GetStringView());
|
||||
if (!sWorld->getBoolConfig(CONFIG_LOAD_LOCALES) && locale != DEFAULT_LOCALE)
|
||||
return;
|
||||
|
||||
if (locale >= TOTAL_LOCALES)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `quest_request_items_conditional` has invalid locale {} set for quest {}. Skipped.", fields[4].GetCString(), fields[0].GetUInt32());
|
||||
@@ -349,6 +355,9 @@ void Quest::LoadConditionalConditionalRequestItemsText(Field* fields)
|
||||
void Quest::LoadConditionalConditionalOfferRewardText(Field* fields)
|
||||
{
|
||||
LocaleConstant locale = GetLocaleByName(fields[4].GetStringView());
|
||||
if (!sWorld->getBoolConfig(CONFIG_LOAD_LOCALES) && locale != DEFAULT_LOCALE)
|
||||
return;
|
||||
|
||||
if (locale >= TOTAL_LOCALES)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `quest_offer_reward_conditional` has invalid locale {} set for quest {}. Skipped.", fields[4].GetCString(), fields[0].GetUInt32());
|
||||
@@ -369,6 +378,9 @@ void Quest::LoadConditionalConditionalOfferRewardText(Field* fields)
|
||||
void Quest::LoadConditionalConditionalQuestCompletionLog(Field* fields)
|
||||
{
|
||||
LocaleConstant locale = GetLocaleByName(fields[4].GetStringView());
|
||||
if (!sWorld->getBoolConfig(CONFIG_LOAD_LOCALES) && locale != DEFAULT_LOCALE)
|
||||
return;
|
||||
|
||||
if (locale >= TOTAL_LOCALES)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `quest_completion_log_conditional` has invalid locale {} set for quest {}. Skipped.", fields[4].GetCString(), fields[0].GetUInt32());
|
||||
@@ -604,7 +616,12 @@ bool Quest::CanIncreaseRewardedQuestCounters() const
|
||||
void Quest::InitializeQueryData()
|
||||
{
|
||||
for (uint8 loc = LOCALE_enUS; loc < TOTAL_LOCALES; ++loc)
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_LOAD_LOCALES) && loc != DEFAULT_LOCALE)
|
||||
continue;
|
||||
|
||||
QueryData[loc] = BuildQueryData(static_cast<LocaleConstant>(loc), nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket Quest::BuildQueryData(LocaleConstant loc, Player* player) const
|
||||
|
||||
Reference in New Issue
Block a user