fix(Core/Quest): Fixed implementation of CONFIG_QUEST_IGNORE_AUTO_ACCEPT and CONFIG_QUEST_IGNORE_AUTO_COMPLETE configs. (#13525)
Fixes #3503
This commit is contained in:
@@ -131,6 +131,16 @@ Quest::Quest(Field* questRecord)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_eventIdForQuest = 0;
|
_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)
|
void Quest::LoadQuestDetails(Field* fields)
|
||||||
@@ -180,8 +190,10 @@ void Quest::LoadQuestTemplateAddon(Field* fields)
|
|||||||
RewardMailSenderEntry = fields[16].Get<uint32>();
|
RewardMailSenderEntry = fields[16].Get<uint32>();
|
||||||
SpecialFlags = fields[17].Get<uint8>();
|
SpecialFlags = fields[17].Get<uint8>();
|
||||||
|
|
||||||
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;
|
Flags |= QUEST_FLAGS_AUTO_ACCEPT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Quest::XPValue(uint8 playerLevel) const
|
uint32 Quest::XPValue(uint8 playerLevel) const
|
||||||
@@ -253,12 +265,12 @@ uint32 Quest::GetRewMoneyMaxLevel() const
|
|||||||
|
|
||||||
bool Quest::IsAutoAccept() 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
|
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
|
bool Quest::IsRaidQuest(Difficulty difficulty) const
|
||||||
|
|||||||
Reference in New Issue
Block a user