diff options
author | Gildor <gildor55@gmail.com> | 2021-07-28 11:11:59 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-03-11 20:50:33 +0100 |
commit | 62df5e860fd3ecfcedbcca14a6d90bf5d8a1bbef (patch) | |
tree | dd63457531a2122d4b0b2c27998ab23e6e082f74 /src | |
parent | 851735d8081644c5b4825568a4cff69193070ee4 (diff) |
Core/Quests: Improve ItemRemovedQuestCheck logic (#26758)
Closes #25603
(cherry picked from commit 621f3f50c2fa2ce098ff13ad12a0bbc772300e2f)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 188294332ac..2fcf09032c2 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -16931,7 +16931,7 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count) UpdateQuestObjectiveProgress(QUEST_OBJECTIVE_ITEM, entry, count); } -void Player::ItemRemovedQuestCheck(uint32 entry, uint32 count) +void Player::ItemRemovedQuestCheck(uint32 entry, uint32 /*count*/) { for (QuestObjectiveStatusMap::value_type const& objectiveItr : Trinity::Containers::MapEqualRange(m_questObjectiveStatus, { QUEST_OBJECTIVE_ITEM, entry })) { @@ -16943,11 +16943,7 @@ void Player::ItemRemovedQuestCheck(uint32 entry, uint32 count) if (!IsQuestObjectiveCompletable(logSlot, quest, objective)) continue; - int32 curItemCount = GetQuestSlotObjectiveData(logSlot, objective); - if (curItemCount >= objective.Amount) // we may have more than what the status shows - curItemCount = GetItemCount(entry, false); - - int32 newItemCount = (int32(count) > curItemCount) ? 0 : curItemCount - count; + int32 newItemCount = GetItemCount(entry, false); // we may have more than what the status shows, so we have to iterate inventory if (newItemCount < objective.Amount) { |