Merge pull request #5150 from Kline-/master

Core/Config: Add config option for Quest Auto Accept/Ignore

(commiter's note: there is no blizzlike reason for this but that doesn't mean it's not a good idea)
This commit is contained in:
Shocker
2012-02-09 10:28:02 -08:00
5 changed files with 27 additions and 2 deletions

View File

@@ -210,9 +210,14 @@ int32 Quest::GetRewOrReqMoney() const
return int32(RewardOrRequiredMoney * sWorld->getRate(RATE_DROP_MONEY));
}
bool Quest::IsAutoAccept() const
{
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT) ? false : Flags & QUEST_FLAGS_AUTO_ACCEPT;
}
bool Quest::IsAutoComplete() const
{
return Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE);
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) ? false : Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE);
}
bool Quest::IsAllowedInRaid() const

View File

@@ -247,13 +247,13 @@ class Quest
uint32 GetQuestStartScript() const { return StartScript; }
uint32 GetQuestCompleteScript() const { return CompleteScript; }
bool IsRepeatable() const { return Flags & QUEST_TRINITY_FLAGS_REPEATABLE; }
bool IsAutoAccept() const;
bool IsAutoComplete() const;
uint32 GetFlags() const { return Flags; }
bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; }
bool IsWeekly() const { return Flags & QUEST_FLAGS_WEEKLY; }
bool IsSeasonal() const { return (ZoneOrSort == -QUEST_SORT_SEASONAL || ZoneOrSort == -QUEST_SORT_SPECIAL || ZoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || ZoneOrSort == -QUEST_SORT_MIDSUMMER || ZoneOrSort == -QUEST_SORT_BREWFEST || ZoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || ZoneOrSort == -QUEST_SORT_NOBLEGARDEN); }
bool IsDailyOrWeekly() const { return Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
bool IsAutoAccept() const { return Flags & QUEST_FLAGS_AUTO_ACCEPT; }
bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
bool IsAllowedInRaid() const;
bool IsDFQuest() const { return Flags & QUEST_TRINITY_FLAGS_DF_QUEST; }

View File

@@ -969,6 +969,8 @@ void World::LoadConfigSettings(bool reload)
if (m_int_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] > MAX_LEVEL)
m_int_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = MAX_LEVEL;
m_bool_configs[CONFIG_QUEST_IGNORE_RAID] = ConfigMgr::GetBoolDefault("Quests.IgnoreRaid", false);
m_bool_configs[CONFIG_QUEST_IGNORE_AUTO_ACCEPT] = ConfigMgr::GetBoolDefault("Quests.IgnoreAutoAccept", false);
m_bool_configs[CONFIG_QUEST_IGNORE_AUTO_COMPLETE] = ConfigMgr::GetBoolDefault("Quests.IgnoreAutoComplete", false);
m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = ConfigMgr::GetIntDefault("Battleground.Random.ResetHour", 6);
if (m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23)

View File

@@ -160,6 +160,8 @@ enum WorldBoolConfigs
CONFIG_PRESERVE_CUSTOM_CHANNELS,
CONFIG_PDUMP_NO_PATHS,
CONFIG_PDUMP_NO_OVERWRITE,
CONFIG_QUEST_IGNORE_AUTO_ACCEPT,
CONFIG_QUEST_IGNORE_AUTO_COMPLETE,
BOOL_CONFIG_VALUE_COUNT
};

View File

@@ -1248,6 +1248,22 @@ Quests.HighLevelHideDiff = 7
Quests.IgnoreRaid = 0
#
# Quests.IgnoreAutoAccept
# Description: Ignore auto accept flag. Clients will have to manually accept all quests.
# Default: 0 - (Disabled, DB values determine if quest is marked auto accept or not.)
# 1 - (Enabled, clients will not be told to automatically accept any quest.)
Quests.IgnoreAutoAccept = 0
#
# Quests.IgnoreAutoComplete
# Description: Ignore auto complete flag. Clients will have to manually complete all quests.
# Default: 0 - (Disabled, DB values determine if quest is marked auto complete or not.)
# 1 - (Enabled, clients will not be told to automatically complete any quest.)
Quests.IgnoreAutoComplete = 0
#
# Guild.EventLogRecordsCount
# Description: Number of log entries for guild events that are stored per guild. Old entries