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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user