fix(Core/Spell): EffectQuestComplete, set quest to rewarded instead of complete (#20358)

set quest to rewarded instead of complete when targetted by SPELL_EFFECT_QUEST_COMPLETE

Prevents people from ending up with strange quests in their quest logs.

https://github.com/TrinityCore/TrinityCore/commit/6d62f852acf3e1a3ee57cde2442832280aee814

Co-authored-by: SnapperRy <snapperryen@gmail.com>
This commit is contained in:
Jelle Meeus
2024-11-15 07:47:41 +01:00
committed by GitHub
parent 6fd034c8b3
commit 9f58216383
3 changed files with 10 additions and 4 deletions

View File

@@ -4771,8 +4771,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)) // never rewarded before
player->CompleteQuest(questId); // quest not in log - for internal use
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.
}
}