aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Quests/QuestDef.cpp
diff options
context:
space:
mode:
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);