Jump to content

[10520][patch]CONDITION_QUEST_NONE


Guest virusav

Recommended Posts

In some of the gossip menu should appear when the quest is not on hand and never gave up, for example, the ancestors of the Lunar festival:

diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index c8681f9..98efb7c 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -8108,6 +8108,12 @@ bool PlayerCondition::Meets(Player const * player) const
            }
            return false;
        }
+        case CONDITION_QUEST_NONE:
+        {
+            if (!player->IsCurrentQuest(value1) && !player->GetQuestRewardStatus(value1))
+                return true;
+            return false;
+        }
        default:
            return false;
    }
@@ -8219,6 +8225,7 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val
        case CONDITION_QUESTREWARDED:
        case CONDITION_QUESTTAKEN:
        case CONDITION_QUESTAVAILABLE:
+        case CONDITION_QUEST_NONE:
        {
            Quest const *Quest = sObjectMgr.GetQuestTemplate(value1);
            if (!Quest)
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h
index a3e5e65..83bd582 100644
--- a/src/game/ObjectMgr.h
+++ b/src/game/ObjectMgr.h
@@ -607,9 +607,10 @@ enum ConditionType
    CONDITION_QUESTAVAILABLE        = 19,                   // quest_id     0       for case when loot/gossip possible only if player can start quest
    CONDITION_ACHIEVEMENT           = 20,                   // ach_id       0, 1 (0: has achievement, 1: hasn't achievement) for player
    CONDITION_ACHIEVEMENT_REALM     = 21,                   // ach_id       0, 1 (0: has achievement, 1: hasn't achievement) for server
+    CONDITION_QUEST_NONE            = 22                    // quest_id     0 (quest did not take and not rewarded)
};

-#define MAX_CONDITION                 22                    // maximum value in ConditionType enum
+#define MAX_CONDITION                 23                    // maximum value in ConditionType enum

struct PlayerCondition
{ 

Link to comment
Share on other sites

No.

If a player did not take and did not perform a certain quest, then it will be shown a hint where to find the NPC.

If a player has taken or has already passed the quest, then the hint disappears.

I would do all the conditions of quests reduced to one, and in the field value2 would indicate the status of the quest.

But it's been a division, so wrote a patch according to the current separation conditions.

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