diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index e28a7c437..d14ddb3c3 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -131,6 +131,16 @@ Quest::Quest(Field* questRecord) } _eventIdForQuest = 0; + + if (sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT)) + { + Flags &= ~QUEST_FLAGS_AUTO_ACCEPT; + } + + if (sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE)) + { + Flags &= ~QUEST_FLAGS_AUTOCOMPLETE; + } } void Quest::LoadQuestDetails(Field* fields) @@ -180,8 +190,10 @@ void Quest::LoadQuestTemplateAddon(Field* fields) RewardMailSenderEntry = fields[16].Get(); SpecialFlags = fields[17].Get(); - if (SpecialFlags & QUEST_SPECIAL_FLAGS_AUTO_ACCEPT) + if ((SpecialFlags & QUEST_SPECIAL_FLAGS_AUTO_ACCEPT) && !sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT)) + { Flags |= QUEST_FLAGS_AUTO_ACCEPT; + } } uint32 Quest::XPValue(uint8 playerLevel) const @@ -253,12 +265,12 @@ uint32 Quest::GetRewMoneyMaxLevel() const bool Quest::IsAutoAccept() const { - return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT) ? false : (Flags & QUEST_FLAGS_AUTO_ACCEPT); + return HasFlag(QUEST_FLAGS_AUTO_ACCEPT); } bool Quest::IsAutoComplete() const { - return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) ? false : HasFlag(QUEST_FLAGS_AUTOCOMPLETE); + return HasFlag(QUEST_FLAGS_AUTOCOMPLETE); } bool Quest::IsRaidQuest(Difficulty difficulty) const