diff options
| author | Nay <dnpd.dd@gmail.com> | 2012-12-27 17:53:34 +0000 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2012-12-27 17:53:34 +0000 |
| commit | 7e196e8e58800c3e0cde80a07f20c4ecccd1a842 (patch) | |
| tree | d77aa80f8e6bd417eb2d8b368006fd3d7fc8fa19 /src/server/game/Quests/QuestDef.cpp | |
| parent | 79b1895223bbf16bfd6484e34e067beea457e4cc (diff) | |
| parent | 7fe2d7309ae3b850f3a7c75fc9bb6ec18bea00a1 (diff) | |
Merge remote-tracking branch 'origin/master' into mmaps
Diffstat (limited to 'src/server/game/Quests/QuestDef.cpp')
| -rw-r--r-- | src/server/game/Quests/QuestDef.cpp | 25 |
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); |
