aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Quests/QuestDef.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-12-24 19:53:28 +0100
committerShauren <shauren.trinity@gmail.com>2012-12-24 19:53:28 +0100
commit75e7cf7eb5ba0218eb5d29d8f961a619347df78d (patch)
treed8146cd735c75d24db62136124283f17b7880037 /src/server/game/Quests/QuestDef.cpp
parent6b7716a7e7c2735fb24548b2a94501c799ab6a60 (diff)
Core/Quests: Added support for 10/25 man only raid quests
Diffstat (limited to 'src/server/game/Quests/QuestDef.cpp')
-rw-r--r--src/server/game/Quests/QuestDef.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 1238afe2ee1..a918a19334f 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -219,9 +219,26 @@ bool Quest::IsAutoComplete() const
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) ? false : (Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE));
}
-bool Quest::IsAllowedInRaid() const
+bool Quest::IsRaidQuest(Difficulty difficulty) const
{
- if (IsRaidQuest())
+ switch (Type)
+ {
+ case QUEST_TYPE_RAID:
+ return true;
+ case QUEST_TYPE_RAID_10:
+ return !(difficulty & RAID_DIFFICULTY_MASK_25MAN);
+ case QUEST_TYPE_RAID_25:
+ return difficulty & RAID_DIFFICULTY_MASK_25MAN;
+ default:
+ break;
+ }
+
+ return false;
+}
+
+bool Quest::IsAllowedInRaid(Difficulty difficulty) const
+{
+ if (IsRaidQuest(difficulty))
return true;
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_RAID);