diff options
-rwxr-xr-x | src/server/game/Spells/SpellMgr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 2d394d9860b..e1e9e6e02b9 100755 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -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); |