aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMalcrom <malcromdev@gmail.com>2012-02-12 17:16:54 -0330
committerMalcrom <malcromdev@gmail.com>2012-02-12 17:16:54 -0330
commit76ed571a25e56c0044129c52bf0b841747ad4b66 (patch)
tree5289e2040183869fbdac0c09d3872574ed7ac7fc /src
parent1329ec36865fea5c73ab6527a16a549bab3d79f0 (diff)
parent11d9f8e161b510fe1200cb253362ca4a00e7819f (diff)
Merge branch 'master' of git://github.com/TrinityCore/TrinityCore
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 7c578a39355..fda186f9c64 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3481,6 +3481,14 @@ void Spell::update(uint32 difftime)
{
if (m_timer > 0)
{
+ // Cancel the cast if the target is not in line of sight
+ if (m_targets.GetUnitTarget() && !m_caster->IsWithinLOSInMap(m_targets.GetUnitTarget()))
+ {
+ SendCastResult(SPELL_FAILED_LINE_OF_SIGHT);
+ cancel();
+ return;
+ }
+
if (difftime >= (uint32)m_timer)
m_timer = 0;
else