mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Spells: SPELL_EFFECT_CHARGE_DEST will now also use speed values from DBC
*Scripts/GB: General Umbriss will now properly charge to his Blitz target
This commit is contained in:
@@ -4479,6 +4479,7 @@ void Spell::EffectChargeDest(SpellEffIndex /*effIndex*/)
|
||||
if (m_targets.HasDst())
|
||||
{
|
||||
Position pos = destTarget->GetPosition();
|
||||
float speed = G3D::fuzzyGt(m_spellInfo->Speed, 0.0f) ? m_spellInfo->Speed : SPEED_CHARGE;
|
||||
|
||||
if (!m_caster->IsWithinLOS(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ()))
|
||||
{
|
||||
@@ -4487,7 +4488,7 @@ void Spell::EffectChargeDest(SpellEffIndex /*effIndex*/)
|
||||
pos = m_caster->GetFirstCollisionPosition(dist, angle);
|
||||
}
|
||||
|
||||
m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ);
|
||||
m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user