From 8930098acbf86a8d1cdc75887b9d38718d6e27aa Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Feb 2010 21:21:52 -0700 Subject: [PATCH] * 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 --- src/game/ObjectMgr.cpp | 5 +++++ src/game/ObjectMgr.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index c83026c946..13f991cd5a 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 63483958ab..faa29d4ce7 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 {