diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index c1e38ff6f..07d4a1424 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -319,7 +319,7 @@ Spell::Spell( Unit* caster, SpellEntry const *info, bool triggered, ObjectGuid o if (info->SpellDifficultyId && caster->GetTypeId() != TYPEID_PLAYER && caster->IsInWorld() && caster->GetMap()->IsDungeon()) { - if (SpellEntry const* spellEntry = GetSpellEntryByDifficulty(info->SpellDifficultyId, caster->GetMap()->GetDifficulty())) + if (SpellEntry const* spellEntry = GetSpellEntryByDifficulty(info->SpellDifficultyId, caster->GetMap()->GetDifficulty(), caster->GetMap()->IsRaid())) m_spellInfo = spellEntry; else m_spellInfo = info; diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index ee7cdc0c5..737b62c66 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -4496,16 +4496,18 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 return true; } -SpellEntry const* GetSpellEntryByDifficulty(uint32 id, Difficulty difficulty) +SpellEntry const* GetSpellEntryByDifficulty(uint32 id, Difficulty difficulty, bool isRaid) { SpellDifficultyEntry const* spellDiff = sSpellDifficultyStore.LookupEntry(id); if (!spellDiff) return NULL; - if (!spellDiff->spellId[difficulty]) - return NULL; + for (Difficulty diff = difficulty; diff >= REGULAR_DIFFICULTY; diff = GetPrevDifficulty(diff, isRaid)) + { + if (spellDiff->spellId[diff]) + return sSpellStore.LookupEntry(spellDiff->spellId[difficulty]); + } - SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellDiff->spellId[difficulty]); - return spellEntry; + return NULL; } diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 1b130b89f..ac9e849c7 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -531,7 +531,7 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group); DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group); int32 GetDiminishingReturnsLimitDuration(DiminishingGroup group, SpellEntry const* spellproto); -SpellEntry const* GetSpellEntryByDifficulty(uint32 id, Difficulty difficulty); +SpellEntry const* GetSpellEntryByDifficulty(uint32 id, Difficulty difficulty, bool isRaid); // Spell proc event related declarations (accessed using SpellMgr functions) enum ProcFlags diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 837e8152d..17eb9f3e5 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11609" + #define REVISION_NR "11610" #endif // __REVISION_NR_H__