aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
authorGustavo <sirikfoll@hotmail.com>2017-08-17 12:03:56 -0300
committerGitHub <noreply@github.com>2017-08-17 12:03:56 -0300
commit22a7956069c293a3f8eab8adcd84a9f4703f364a (patch)
treee3bb77f4da2c3127be444a64808366e849f53935 /src/server/game/Spells/SpellEffects.cpp
parent7b747848ede0bdb7e12374d3560059ec708e177a (diff)
Core/Scripts: More fixes in boss Lich King (#20147)
* Core/Scripts: More fixes in boss Lich King Fix Valkyr charge spell, they will no longer ignore Z position and become unreachable. Correct height of Spirit Bomb and added the 3 seconds delay on his explosion. Set the Trigger inside frostmourne room as active, to avoid problems with reseting the room, e.g: Spirit Bombs not despawning and Wicked Spirits stuck in evade. Use correct InhabitType for Wicked and Vile Spirits, this avoid a situation where they could spawn falling.
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 5b4a767b5b4..f281b27b145 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -4655,9 +4655,13 @@ void Spell::EffectChargeDest(SpellEffIndex /*effIndex*/)
if (m_targets.HasDst())
{
Position pos = destTarget->GetPosition();
- float angle = m_caster->GetRelativeAngle(pos.GetPositionX(), pos.GetPositionY());
- float dist = m_caster->GetDistance(pos);
- pos = m_caster->GetFirstCollisionPosition(dist, angle);
+
+ if (!m_caster->IsWithinLOS(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ()))
+ {
+ float angle = m_caster->GetRelativeAngle(pos.GetPositionX(), pos.GetPositionY());
+ float dist = m_caster->GetDistance(pos);
+ pos = m_caster->GetFirstCollisionPosition(dist, angle);
+ }
m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ);
}