mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Spells: Spell id being cast by player can now be changed depending on map difficulty
--HG-- branch : trunk
This commit is contained in:
@@ -1057,10 +1057,10 @@ class SpellMgr
|
||||
SpellEntry const* GetSpellForDifficultyFromSpell(SpellEntry const* spell, Unit* Caster)
|
||||
{
|
||||
//spell never can be NULL in this case!
|
||||
if (!Caster->ToCreature() || !Caster->ToCreature()->GetMap() || !Caster->ToCreature()->GetMap()->IsDungeon())
|
||||
if (!Caster || !Caster->GetMap() || !Caster->GetMap()->IsDungeon())
|
||||
return spell;
|
||||
|
||||
uint32 mode = uint32(Caster->ToCreature()->GetMap()->GetSpawnMode());
|
||||
uint32 mode = uint32(Caster->GetMap()->GetSpawnMode());
|
||||
if (mode >= MAX_DIFFICULTY)
|
||||
{
|
||||
sLog.outError("GetSpellForDifficultyFromSpell: Incorrect Difficulty for spell %u.", spell->Id);
|
||||
|
||||
Reference in New Issue
Block a user