Core/Spells: Implemented new SpellMisc field, MinDuration that controls minimum spell missile travel time

Port From (https://github.com/TrinityCore/TrinityCore/commit/a63d404e7bf2dce3b15ce5f66ac98fe71a41f51c)
This commit is contained in:
Hondacrx
2025-08-13 21:35:10 -04:00
parent dcfe78ba77
commit f6c56c3293
4 changed files with 14 additions and 12 deletions
+2 -2
View File
@@ -2943,9 +2943,9 @@ namespace Game.Entities
// Set up missile speed based delay
float hitDelay = spellInfo.LaunchDelay;
if (spellInfo.HasAttribute(SpellAttr9.MissileSpeedIsDelayInSec))
hitDelay += spellInfo.Speed;
hitDelay += Math.Max(spellInfo.Speed, spellInfo.MinDuration);
else if (spellInfo.Speed > 0.0f)
hitDelay += Math.Max(victim.GetDistance(this), 5.0f) / spellInfo.Speed;
hitDelay += Math.Max(Math.Max(victim.GetDistance(this), 5.0f) / spellInfo.Speed, spellInfo.MinDuration);
uint delay = (uint)Math.Floor(hitDelay * 1000.0f);
// Schedule charge drop