From 588d7135b2ba8f89d9153dd5498d941992005e3f Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 4 Sep 2019 13:34:24 -0400 Subject: [PATCH] Core/Spells: Fixed crash in delayed DEST spells Port From (https://github.com/TrinityCore/TrinityCore/commit/fa0dc88c23a9d9dc95dd9e444e8f240d91ca241a) --- Source/Game/Spells/Spell.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 158bdd584..85dc0f299 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -302,6 +302,8 @@ namespace Game.Spells float dist = m_caster.GetExactDist(m_targets.GetDstPos()); return (ulong)(Math.Floor((dist / m_spellInfo.Speed + launchDelay) * 1000.0f)); } + + return (ulong)Math.Floor(launchDelay * 1000.0f); } return 0; @@ -2913,6 +2915,9 @@ namespace Game.Spells } } + if (single_missile && t_offset == 0) + return m_delayMoment; + if (m_caster.IsTypeId(TypeId.Player)) m_caster.ToPlayer().SetSpellModTakingSpell(this, true);