Jump to content

[patch] [ReqSourceId]Drop an item of subsidiary


Guest virusav

Recommended Posts

At the moment, if the quest is completed but not delivered, then the player can not receive ancillary an item listed in ReqSourceId, cease to fall, but should.

Example: http://www.wowhead.com/quest=12068 (also in other quests of the chain). In the quest is the basic requirement to bring an item, but you have to gather 5 auxiliary item is that the player can impose on themselves the aura, see the NPC and to pass the quest.

Now when taking the quest item is impossible to dislodge support and pass the quest.

Patch:

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 8cf5741..bcaad71 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -14765,36 +14765,37 @@ void Player::ReputationChanged(FactionEntry const* factionEntry )

bool Player::HasQuestForItem( uint32 itemid ) const
{
-    for( int i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+    for (int i = 0; i < MAX_QUEST_LOG_SIZE; ++i)
    {
        uint32 questid = GetQuestSlotQuestId(i);
-        if ( questid == 0 )
+        if (questid == 0)
            continue;

        QuestStatusMap::const_iterator qs_itr = mQuestStatus.find(questid);
-        if(qs_itr == mQuestStatus.end())
+        if (qs_itr == mQuestStatus.end())
            continue;

        QuestStatusData const& q_status = qs_itr->second;

-        if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+        if (q_status.m_status == QUEST_STATUS_INCOMPLETE || q_status.m_status == QUEST_STATUS_COMPLETE)
        {
            Quest const* qinfo = sObjectMgr.GetQuestTemplate(questid);
-            if(!qinfo)
-                continue;
-
-            // hide quest if player is in raid-group and quest is no raid quest
-            if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid() && !InBattleGround())
+            if (!qinfo)
                continue;

-            // There should be no mixed ReqItem/ReqSource drop
-            // This part for ReqItem drop
-            for (int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
+            if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
            {
-                if(itemid == qinfo->ReqItemId[j] && q_status.m_itemcount[j] < qinfo->ReqItemCount[j] )
-                    return true;
+                // hide quest if player is in raid-group and quest is no raid quest
+                if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid() && !InBattleGround())
+                    continue;
+
+                // There should be no mixed ReqItem drop
+                for (int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
+                {
+                    if (itemid == qinfo->ReqItemId[j] && q_status.m_itemcount[j] < qinfo->ReqItemCount[j])
+                        return true;
+                }
            }
-            // This part - for ReqSource
            for (int j = 0; j < QUEST_SOURCE_ITEM_IDS_COUNT; ++j)
            {
                // examined item is a source item 

Link to comment
Share on other sites

In the quest cache ReqSourdeId an item listed.

An item falls in the presence of a quest, so the chance of a quest.

Or we are talking about condition_value1 and condition_value2 in `creature_loot_template`?

In this case, for each combination of an item and NPC should be created on 2 lines:

8 CONDITION_QUESTREWARDED Player must have completed a quest first

9 CONDITION_QUESTTAKEN Players must have the quest in the quest log and not completed yet

?

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use