Fix Ritual of Summoning in dungeons (#18)

For Warlocks it is no longer possible to summon an other player into a
dungeon.
This commit is contained in:
Nølin 2017-04-02 15:12:51 +02:00 committed by Antz
parent a1f3a3fd2d
commit 3c0491a1dd

View File

@ -5073,7 +5073,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (sMapStore.LookupEntry(m_caster->GetMapId())->IsDungeon()) if (sMapStore.LookupEntry(m_caster->GetMapId())->IsDungeon())
{ {
InstanceTemplate const* instance = ObjectMgr::GetInstanceTemplate(m_caster->GetMapId()); InstanceTemplate const* instance = ObjectMgr::GetInstanceTemplate(m_caster->GetMapId());
if (!instance) if (m_caster->GetMap() != target->GetMap())
{ return SPELL_FAILED_TARGET_NOT_IN_INSTANCE; } { return SPELL_FAILED_TARGET_NOT_IN_INSTANCE; }
if (instance->levelMin > target->getLevel()) if (instance->levelMin > target->getLevel())
{ return SPELL_FAILED_LOWLEVEL; } { return SPELL_FAILED_LOWLEVEL; }