Core/Spells: Corrected execution time calculation for dst targets

Port TrinityCore Commit: https://github.com/TrinityCore/TrinityCore/commit/8d6d00dc15d85700c0cb8872303811a5fa6c5c85
This commit is contained in:
hondacrx
2019-08-14 23:36:22 -04:00
parent e6f049d531
commit 46095e461f
+2 -1
View File
@@ -290,7 +290,8 @@ namespace Game.Spells
}
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))
m_delayMoment = (ulong)Math.Floor(dist / m_spellInfo.Speed * 1000.0f);
else