From 22a7956069c293a3f8eab8adcd84a9f4703f364a Mon Sep 17 00:00:00 2001 From: Gustavo Date: Thu, 17 Aug 2017 12:03:56 -0300 Subject: 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. --- src/server/game/Spells/SpellEffects.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/server/game/Spells/SpellEffects.cpp') 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); } -- cgit v1.2.3