aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2017-02-05 21:05:00 +0100
committerShauren <shauren.trinity@gmail.com>2019-06-15 18:41:09 +0200
commit8d6d00dc15d85700c0cb8872303811a5fa6c5c85 (patch)
tree9560d9d9200d38f75bce80292a4b1cb8be02f229 /src
parentd1cbd8a837116a0fadae06cf5714a345035eb799 (diff)
Core/Spells: Corrected execution time calculation for dst targets (#19039)
(cherrypicked from c1ca852e1682c8a09b9fbb4143663674320ce021)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 066ffe84c9d..76c45ce96f4 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -803,7 +803,8 @@ void Spell::SelectSpellTargets()
}
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(SPELL_ATTR9_SPECIAL_DELAY_CALCULATION))
m_delayMoment = uint64(std::floor(dist / m_spellInfo->Speed * 1000.0f));
else