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).

This commit is contained in:
SnapperRy
2016-10-16 22:39:36 +02:00
parent 7666296f54
commit 551a8ff8ae

View File

@@ -4579,8 +4579,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.
}
}