aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-02-16 21:21:52 -0700
committerBrian <runningnak3d@gmail.com>2010-02-16 21:21:52 -0700
commit8930098acbf86a8d1cdc75887b9d38718d6e27aa (patch)
tree9e2f369e99d675f4ec9096606cf23851a80ba773 /src
parent205a024d013553afe988b04b419722fac5ab1665 (diff)
* Add support for CONDITION_QUEST_NONE (14) as a loot condition and gossip
* condition. If set the player must never have taken or completed the quest * listed in value1 --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/ObjectMgr.cpp5
-rw-r--r--src/game/ObjectMgr.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index c83026c946e..13f991cd5a3 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -7612,6 +7612,11 @@ bool PlayerCondition::Meets(Player const * player) const
QuestStatus status = player->GetQuestStatus(value1);
return (status == QUEST_STATUS_INCOMPLETE);
}
+ case CONDITION_QUEST_NONE:
+ {
+ QuestStatus status = player->GetQuestStatus(value1);
+ return (status == QUEST_STATUS_NONE);
+ }
case CONDITION_AD_COMMISSION_AURA:
{
Unit::AuraApplicationMap const& auras = player->GetAppliedAuras();
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h
index 63483958ab0..faa29d4ce7f 100644
--- a/src/game/ObjectMgr.h
+++ b/src/game/ObjectMgr.h
@@ -311,9 +311,10 @@ enum ConditionType
CONDITION_NO_AURA = 11, // spell_id effindex
CONDITION_ACTIVE_EVENT = 12, // event_id
CONDITION_INSTANCE_DATA = 13, // entry data
+ CONDITION_QUEST_NONE = 14, // quest_id 0
};
-#define MAX_CONDITION 14 // maximum value in ConditionType enum
+#define MAX_CONDITION 15 // maximum value in ConditionType enum
struct PlayerCondition
{