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.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 1238afe2ee1..9e9bcffd871 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -140,9 +140,7 @@ Quest::Quest(Field* questRecord)
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
OfferRewardEmoteDelay[i] = questRecord[140+i].GetInt32();
- CompleteScript = questRecord[144].GetUInt32();
-
- // int32 WDBVerified = questRecord[145].GetInt32();
+ //int32 WDBVerified = questRecord[144].GetInt32();
Flags |= SpecialFlags << 20;
if (Flags & QUEST_TRINITY_FLAGS_AUTO_ACCEPT)
@@ -219,9 +217,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
+{
+ 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())
+ if (IsRaidQuest(difficulty))
return true;
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_RAID);