From 75e7cf7eb5ba0218eb5d29d8f961a619347df78d Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 24 Dec 2012 19:53:28 +0100 Subject: Core/Quests: Added support for 10/25 man only raid quests --- src/server/game/Quests/QuestDef.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/server/game/Quests/QuestDef.cpp') 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); -- cgit v1.2.3