Fix the bug that players couldn't talk with Spirit Healer

--HG--
branch : trunk
This commit is contained in:
krz
2009-06-07 02:02:00 +02:00
parent 715f410fb7
commit 2e4fae75a4

View File

@@ -2238,13 +2238,13 @@ void Spell::cancel()
void Spell::cast(bool skipCheck)
{
if(m_targets.getUnitTarget() && !m_targets.getUnitTarget()->isVisibleForOrDetect(m_caster, true))
if(m_targets.getUnitTarget() && m_targets.getUnitTarget()->isAlive() && !m_targets.getUnitTarget()->isVisibleForOrDetect(m_caster, true))
{
cancel();
return;
}
SetExecutedCurrently(true);
SetExecutedCurrently(true);
uint8 castResult = 0;
// update pointers base at GUIDs to prevent access to non-existed already object