mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Core/Quests): properly handle quests with QuestType=0. (#7718)
- Closes #6732
This commit is contained in:
@@ -115,7 +115,7 @@ void Player::SendPreparedQuest(ObjectGuid guid)
|
||||
if (quest->IsAutoAccept() && CanAddQuest(quest, true) && CanTakeQuest(quest, true))
|
||||
AddQuestAndCheckCompletion(quest, object);
|
||||
|
||||
if ((quest->IsAutoComplete() && quest->IsRepeatable() && !quest->IsDailyOrWeekly()) || quest->HasFlag(QUEST_FLAGS_AUTOCOMPLETE))
|
||||
if (quest->IsAutoComplete() || !quest->GetQuestMethod())
|
||||
PlayerTalkClass->SendQuestGiverRequestItems(quest, guid, CanCompleteRepeatableQuest(quest), true);
|
||||
else
|
||||
PlayerTalkClass->SendQuestGiverQuestDetails(quest, guid, true);
|
||||
@@ -269,7 +269,7 @@ bool Player::CanCompleteQuest(uint32 quest_id, const QuestStatusData* q_savedSta
|
||||
return false; // not allow re-complete quest
|
||||
|
||||
// auto complete quest
|
||||
if ((qInfo->IsAutoComplete() || qInfo->GetFlags() & QUEST_FLAGS_AUTOCOMPLETE) && CanTakeQuest(qInfo, false))
|
||||
if ((qInfo->IsAutoComplete() || !qInfo->GetQuestMethod()) && CanTakeQuest(qInfo, false))
|
||||
return true;
|
||||
|
||||
QuestStatusData q_status;
|
||||
@@ -355,7 +355,7 @@ bool Player::CanCompleteRepeatableQuest(Quest const* quest)
|
||||
bool Player::CanRewardQuest(Quest const* quest, bool msg)
|
||||
{
|
||||
// not auto complete quest and not completed quest (only cheating case, then ignore without message)
|
||||
if (!quest->IsDFQuest() && !quest->IsAutoComplete() && !(quest->GetFlags() & QUEST_FLAGS_AUTOCOMPLETE) && GetQuestStatus(quest->GetQuestId()) != QUEST_STATUS_COMPLETE)
|
||||
if (!quest->IsDFQuest() && !quest->IsAutoComplete() && quest->GetQuestMethod() && GetQuestStatus(quest->GetQuestId()) != QUEST_STATUS_COMPLETE)
|
||||
return false;
|
||||
|
||||
// daily quest can't be rewarded (25 daily quest already completed)
|
||||
|
||||
Reference in New Issue
Block a user