Core/Spell: allow SPELL_EFFECT_QUEST_COMPLETE to set a quest to rewarded only if that quest is used as internal flag by the server (has flag 1024 - QUEST_FLAGS_TRACKING).

(cherry picked from commit 551a8ff8ae)
This commit is contained in:
SnapperRy
2016-10-16 22:39:36 +02:00
committed by joschiwald
parent f0ddceeff4
commit 8a4bfe94f9

View File

@@ -4156,8 +4156,8 @@ void Spell::EffectQuestComplete(SpellEffIndex /*effIndex*/)
uint16 logSlot = player->FindQuestSlot(questId);
if (logSlot < MAX_QUEST_LOG_SIZE)
player->AreaExploredOrEventHappens(questId);
else if (player->CanTakeQuest(quest, false)) // Check if the quest has already been turned in.
player->SetRewardedQuest(questId); // If not, set status to rewarded without broadcasting it to client.
else if (quest->HasFlag(QUEST_FLAGS_TRACKING)) // Check if the quest is used as a serverside flag.
player->SetRewardedQuest(questId); // If so, set status to rewarded without broadcasting it to client.
}
}