Core/Spells: Fixed crash in delayed DEST spells

Port From (https://github.com/TrinityCore/TrinityCore/commit/fa0dc88c23a9d9dc95dd9e444e8f240d91ca241a)
This commit is contained in:
hondacrx
2019-09-04 13:34:24 -04:00
parent eaadad3774
commit 588d7135b2
+5
View File
@@ -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);