diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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; |