From 85b68d886aa5ebc92dbd28ad83f710c0fd655579 Mon Sep 17 00:00:00 2001 From: krz Date: Fri, 5 Jun 2009 01:21:11 +0200 Subject: Send interrupt message at spell cast end if target is not visible for caster. --HG-- branch : trunk --- src/game/Spell.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 82756ad118f..d8cf24c2933 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2238,6 +2238,11 @@ void Spell::cancel() void Spell::cast(bool skipCheck) { + if(m_targets.getUnitTarget() && !m_targets.getUnitTarget()->isVisibleForOrDetect(m_caster, true)) + { + cancel(); + return; + } SetExecutedCurrently(true); uint8 castResult = 0; -- cgit v1.2.3