Core/Spells: Fixed summoning to instances

This commit is contained in:
Shauren
2011-09-15 00:02:45 +02:00
parent 8d31aba768
commit b7f6416ee3
+2 -1
View File
@@ -5189,7 +5189,8 @@ SpellCastResult Spell::CheckCast(bool strict)
Difficulty difficulty = m_caster->GetMap()->GetDifficulty();
if (map->IsRaid())
if (InstancePlayerBind* targetBind = target->GetBoundInstance(mapId, difficulty))
if (targetBind->perm && targetBind != m_caster->ToPlayer()->GetBoundInstance(mapId, difficulty))
if (InstancePlayerBind* casterBind = m_caster->ToPlayer()->GetBoundInstance(mapId, difficulty))
if (targetBind->perm && targetBind->save != casterBind->save)
return SPELL_FAILED_TARGET_LOCKED_TO_RAID_INSTANCE;
InstanceTemplate const* instance = sObjectMgr->GetInstanceTemplate(mapId);