From b7f6416ee313e2b557198431b1817a57c1c99940 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 15 Sep 2011 00:02:45 +0200 Subject: [PATCH] Core/Spells: Fixed summoning to instances --- src/server/game/Spells/Spell.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 7414ee9e1f..9f38ab18a3 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5189,8 +5189,9 @@ 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)) - return SPELL_FAILED_TARGET_LOCKED_TO_RAID_INSTANCE; + 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); if (!instance)