Add config values to allow ignoring auto accept and auto complete flags on quests.
This commit is contained in:
@@ -210,9 +210,14 @@ int32 Quest::GetRewOrReqMoney() const
|
|||||||
return int32(RewardOrRequiredMoney * sWorld->getRate(RATE_DROP_MONEY));
|
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
|
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
|
bool Quest::IsAllowedInRaid() const
|
||||||
|
|||||||
@@ -247,13 +247,13 @@ class Quest
|
|||||||
uint32 GetQuestStartScript() const { return StartScript; }
|
uint32 GetQuestStartScript() const { return StartScript; }
|
||||||
uint32 GetQuestCompleteScript() const { return CompleteScript; }
|
uint32 GetQuestCompleteScript() const { return CompleteScript; }
|
||||||
bool IsRepeatable() const { return Flags & QUEST_TRINITY_FLAGS_REPEATABLE; }
|
bool IsRepeatable() const { return Flags & QUEST_TRINITY_FLAGS_REPEATABLE; }
|
||||||
|
bool IsAutoAccept() const;
|
||||||
bool IsAutoComplete() const;
|
bool IsAutoComplete() const;
|
||||||
uint32 GetFlags() const { return Flags; }
|
uint32 GetFlags() const { return Flags; }
|
||||||
bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; }
|
bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; }
|
||||||
bool IsWeekly() const { return Flags & QUEST_FLAGS_WEEKLY; }
|
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 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 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 IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
|
||||||
bool IsAllowedInRaid() const;
|
bool IsAllowedInRaid() const;
|
||||||
bool IsDFQuest() const { return Flags & QUEST_TRINITY_FLAGS_DF_QUEST; }
|
bool IsDFQuest() const { return Flags & QUEST_TRINITY_FLAGS_DF_QUEST; }
|
||||||
|
|||||||
@@ -969,6 +969,8 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
if (m_int_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] > MAX_LEVEL)
|
if (m_int_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] > MAX_LEVEL)
|
||||||
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_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);
|
m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = ConfigMgr::GetIntDefault("Battleground.Random.ResetHour", 6);
|
||||||
if (m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23)
|
if (m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23)
|
||||||
|
|||||||
@@ -160,6 +160,8 @@ enum WorldBoolConfigs
|
|||||||
CONFIG_PRESERVE_CUSTOM_CHANNELS,
|
CONFIG_PRESERVE_CUSTOM_CHANNELS,
|
||||||
CONFIG_PDUMP_NO_PATHS,
|
CONFIG_PDUMP_NO_PATHS,
|
||||||
CONFIG_PDUMP_NO_OVERWRITE,
|
CONFIG_PDUMP_NO_OVERWRITE,
|
||||||
|
CONFIG_QUEST_IGNORE_AUTO_ACCEPT,
|
||||||
|
CONFIG_QUEST_IGNORE_AUTO_COMPLETE,
|
||||||
BOOL_CONFIG_VALUE_COUNT
|
BOOL_CONFIG_VALUE_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1248,6 +1248,22 @@ Quests.HighLevelHideDiff = 7
|
|||||||
|
|
||||||
Quests.IgnoreRaid = 0
|
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
|
# Guild.EventLogRecordsCount
|
||||||
# Description: Number of log entries for guild events that are stored per guild. Old entries
|
# Description: Number of log entries for guild events that are stored per guild. Old entries
|
||||||
|
|||||||
Reference in New Issue
Block a user