From 46095e461f00fe5fd2657c89b15e79568a38f664 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 14 Aug 2019 23:36:22 -0400 Subject: [PATCH] Core/Spells: Corrected execution time calculation for dst targets Port TrinityCore Commit: https://github.com/TrinityCore/TrinityCore/commit/8d6d00dc15d85700c0cb8872303811a5fa6c5c85 --- Source/Game/Spells/Spell.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index ff6482ff5..9ede814ca 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -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