mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[9789] Implement spell selection, for creatures in instances, based on map difficulty
This commit is contained in:
parent
6ad2d18f1a
commit
51546e1ff9
10 changed files with 45 additions and 10 deletions
|
|
@ -3591,3 +3591,17 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
SpellEntry const* GetSpellEntryByDifficulty(uint32 id, Difficulty difficulty)
|
||||
{
|
||||
SpellDifficultyEntry const* spellDiff = sSpellDifficultyStore.LookupEntry(id);
|
||||
|
||||
if (!spellDiff)
|
||||
return NULL;
|
||||
|
||||
if (!spellDiff->spellId[difficulty])
|
||||
return NULL;
|
||||
|
||||
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellDiff->spellId[difficulty]);
|
||||
return spellEntry;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue