mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[11610] Select proper spell difficulty subtitution.
Fix mostly affect cases when absent 25-man difficulties spell version. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
753b0cd969
commit
3a60c4ae3b
4 changed files with 10 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue