mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Remove custom quest levels in title
This commit is contained in:
@@ -229,9 +229,6 @@ void PlayerMenu::SendGossipMenu(uint32 titleTextId, ObjectGuid objectGUID)
|
||||
++count;
|
||||
}
|
||||
|
||||
// Store this instead of checking the Singleton every loop iteration
|
||||
bool questLevelInTitle = sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS);
|
||||
|
||||
packet.GossipText.resize(_questMenu.GetMenuItemCount());
|
||||
count = 0;
|
||||
for (uint8 i = 0; i < _questMenu.GetMenuItemCount(); ++i)
|
||||
@@ -254,9 +251,6 @@ void PlayerMenu::SendGossipMenu(uint32 titleTextId, ObjectGuid objectGUID)
|
||||
if (QuestTemplateLocale const* localeData = sObjectMgr->GetQuestLocale(questID))
|
||||
ObjectMgr::GetLocaleString(localeData->LogTitle, localeConstant, text.QuestTitle);
|
||||
|
||||
if (questLevelInTitle)
|
||||
Quest::AddQuestLevelToTitle(text.QuestTitle, quest->GetQuestLevel());
|
||||
|
||||
++count;
|
||||
}
|
||||
}
|
||||
@@ -363,9 +357,6 @@ void PlayerMenu::SendQuestGiverQuestListMessage(Object* questgiver)
|
||||
ObjectMgr::GetLocaleString(questGreetingLocale->Greeting, localeConstant, questList.Greeting);
|
||||
}
|
||||
|
||||
// Store this instead of checking the Singleton every loop iteration
|
||||
bool questLevelInTitle = sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS);
|
||||
|
||||
for (uint32 i = 0; i < _questMenu.GetMenuItemCount(); ++i)
|
||||
{
|
||||
QuestMenuItem const& questMenuItem = _questMenu.GetItem(i);
|
||||
@@ -432,9 +423,6 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGU
|
||||
}
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS))
|
||||
Quest::AddQuestLevelToTitle(packet.QuestTitle, quest->GetQuestLevel());
|
||||
|
||||
packet.QuestGiverGUID = npcGUID;
|
||||
packet.InformUnit = _session->GetPlayer()->GetPlayerSharingQuest();
|
||||
packet.QuestID = quest->GetQuestId();
|
||||
@@ -518,9 +506,6 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, ObjectGuid npcGUI
|
||||
ObjectMgr::GetLocaleString(questOfferRewardLocale->RewardText, locale, packet.RewardText);
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS))
|
||||
Quest::AddQuestLevelToTitle(packet.QuestTitle, quest->GetQuestLevel());
|
||||
|
||||
WorldPackets::Quest::QuestGiverOfferReward& offer = packet.QuestData;
|
||||
|
||||
quest->BuildQuestRewards(offer.Rewards, _session->GetPlayer());
|
||||
@@ -575,9 +560,6 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const* quest, ObjectGuid npcGU
|
||||
ObjectMgr::GetLocaleString(questRequestItemsLocale->CompletionText, locale, packet.CompletionText);
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS))
|
||||
Quest::AddQuestLevelToTitle(packet.QuestTitle, quest->GetQuestLevel());
|
||||
|
||||
packet.QuestGiverGUID = npcGUID;
|
||||
|
||||
// Is there a better way? what about game objects?
|
||||
|
||||
@@ -563,10 +563,3 @@ WorldPacket Quest::BuildQueryData(LocaleConstant loc) const
|
||||
|
||||
return *response.Write();
|
||||
}
|
||||
|
||||
void Quest::AddQuestLevelToTitle(std::string& title, int32 level)
|
||||
{
|
||||
// Adds the quest level to the front of the quest title
|
||||
// example: [13] Westfall Stew
|
||||
title = Trinity::StringFormat("[%d] %s", level, title);
|
||||
}
|
||||
|
||||
@@ -492,7 +492,6 @@ class TC_GAME_API Quest
|
||||
void SetEventIdForQuest(uint16 eventId) { _eventIdForQuest = eventId; }
|
||||
uint16 GetEventIdForQuest() const { return _eventIdForQuest; }
|
||||
|
||||
static void AddQuestLevelToTitle(std::string& title, int32 level);
|
||||
void InitializeQueryData();
|
||||
WorldPacket BuildQueryData(LocaleConstant loc) const;
|
||||
|
||||
|
||||
@@ -1518,7 +1518,6 @@ void World::LoadConfigSettings(bool reload)
|
||||
// misc
|
||||
m_bool_configs[CONFIG_PDUMP_NO_PATHS] = sConfigMgr->GetBoolDefault("PlayerDump.DisallowPaths", true);
|
||||
m_bool_configs[CONFIG_PDUMP_NO_OVERWRITE] = sConfigMgr->GetBoolDefault("PlayerDump.DisallowOverwrite", true);
|
||||
m_bool_configs[CONFIG_UI_QUESTLEVELS_IN_DIALOGS] = sConfigMgr->GetBoolDefault("UI.ShowQuestLevelsInDialogs", false);
|
||||
|
||||
// Wintergrasp battlefield
|
||||
m_bool_configs[CONFIG_WINTERGRASP_ENABLE] = sConfigMgr->GetBoolDefault("Wintergrasp.Enable", false);
|
||||
|
||||
@@ -167,7 +167,6 @@ enum WorldBoolConfigs
|
||||
CONFIG_ENABLE_MMAPS,
|
||||
CONFIG_WINTERGRASP_ENABLE,
|
||||
CONFIG_TOLBARAD_ENABLE,
|
||||
CONFIG_UI_QUESTLEVELS_IN_DIALOGS, // Should we add quest levels to the title in the NPC dialogs?
|
||||
CONFIG_EVENT_ANNOUNCE,
|
||||
CONFIG_STATS_LIMITS_ENABLE,
|
||||
CONFIG_INSTANCES_RESET_ANNOUNCE,
|
||||
|
||||
@@ -3301,14 +3301,6 @@ PlayerDump.DisallowPaths = 1
|
||||
|
||||
PlayerDump.DisallowOverwrite = 1
|
||||
|
||||
#
|
||||
# UI.ShowQuestLevelsInDialogs
|
||||
# Description: Show quest levels next to quest titles in UI dialogs
|
||||
# Example: [13] Westfall Stew
|
||||
# Default: 0 - (Do not show)
|
||||
|
||||
UI.ShowQuestLevelsInDialogs = 0
|
||||
|
||||
#
|
||||
# Calculate.Creature.Zone.Area.Data
|
||||
# Description: Calculate at loading creature zoneId / areaId and save in creature table (WARNING: SLOW WORLD SERVER STARTUP)
|
||||
|
||||
Reference in New Issue
Block a user