diff options
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 10e2d052c69..ef3394e367e 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -4068,26 +4068,21 @@ void Spell::EffectQuestClear() if (oldStatus == QUEST_STATUS_NONE) return; + player->RemoveActiveQuest(quest_id, false); + // remove all quest entries for 'entry' from quest log - for (uint8 slot = 0; slot < MAX_QUEST_LOG_SIZE; ++slot) + if (oldStatus != QUEST_STATUS_REWARDED) { - uint32 logQuest = player->GetQuestSlotQuestId(slot); - if (logQuest == quest_id) - { - player->SetQuestSlot(slot, 0); - - // we ignore unequippable quest items in this case, it's still be equipped - player->TakeQuestSourceItem(logQuest, false); + // we ignore unequippable quest items in this case, it's still be equipped + player->TakeQuestSourceItem(quest_id, false); - if (quest->HasFlag(QUEST_FLAGS_FLAGS_PVP)) - { - player->pvpInfo.IsHostile = player->pvpInfo.IsInHostileArea || player->HasPvPForcingQuest(); - player->UpdatePvPState(); - } + if (quest->HasFlag(QUEST_FLAGS_FLAGS_PVP)) + { + player->pvpInfo.IsHostile = player->pvpInfo.IsInHostileArea || player->HasPvPForcingQuest(); + player->UpdatePvPState(); } } - player->RemoveActiveQuest(quest_id, false); player->RemoveRewardedQuest(quest_id); player->DespawnPersonalSummonsForQuest(quest_id); |