Core/Spells: Corrected execution time calculation for dst targets
Port TrinityCore Commit: https://github.com/TrinityCore/TrinityCore/commit/8d6d00dc15d85700c0cb8872303811a5fa6c5c85
This commit is contained in:
@@ -290,7 +290,8 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
else if (m_spellInfo.Speed > 0.0f)
|
else if (m_spellInfo.Speed > 0.0f)
|
||||||
{
|
{
|
||||||
float dist = m_caster.GetDistance(m_targets.GetDstPos());
|
// We should not subtract caster size from dist calculation (fixes execution time desync with animation on client, eg. Malleable Goo cast by PP)
|
||||||
|
float dist = m_caster.GetExactDist(m_targets.GetDstPos());
|
||||||
if (!m_spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation))
|
if (!m_spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation))
|
||||||
m_delayMoment = (ulong)Math.Floor(dist / m_spellInfo.Speed * 1000.0f);
|
m_delayMoment = (ulong)Math.Floor(dist / m_spellInfo.Speed * 1000.0f);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user