Core/Misc: Add launchDelay argument to Unit::SendPlaySpellVisual overload accepting Unit* argument

Port From (https://github.com/TrinityCore/TrinityCore/commit/982b60f39c526e217de3a3f24b740af41c4ede50)
This commit is contained in:
hondacrx
2023-03-13 02:39:10 -04:00
parent cd249ac67a
commit 17b7e6837f
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -1129,7 +1129,7 @@ namespace Game.Entities
}
}
public void SendPlaySpellVisual(Unit target, uint spellVisualId, ushort missReason, ushort reflectStatus, float travelSpeed, bool speedAsTime = false)
public void SendPlaySpellVisual(Unit target, uint spellVisualId, ushort missReason, ushort reflectStatus, float travelSpeed, bool speedAsTime = false, float launchDelay = 0f)
{
PlaySpellVisual playSpellVisual = new();
playSpellVisual.Source = GetGUID();
@@ -1140,20 +1140,21 @@ namespace Game.Entities
playSpellVisual.MissReason = missReason;
playSpellVisual.ReflectStatus = reflectStatus;
playSpellVisual.SpeedAsTime = speedAsTime;
playSpellVisual.LaunchDelay = launchDelay;
SendMessageToSet(playSpellVisual, true);
}
public void SendPlaySpellVisual(Position targetPosition, float launchDelay, uint spellVisualId, ushort missReason, ushort reflectStatus, float travelSpeed, bool speedAsTime = false)
public void SendPlaySpellVisual(Position targetPosition, uint spellVisualId, ushort missReason, ushort reflectStatus, float travelSpeed, bool speedAsTime = false, float launchDelay = 0f)
{
PlaySpellVisual playSpellVisual = new();
playSpellVisual.Source = GetGUID();
playSpellVisual.TargetPosition = targetPosition;
playSpellVisual.LaunchDelay = launchDelay;
playSpellVisual.SpellVisualID = spellVisualId;
playSpellVisual.TravelSpeed = travelSpeed;
playSpellVisual.MissReason = missReason;
playSpellVisual.ReflectStatus = reflectStatus;
playSpellVisual.SpeedAsTime = speedAsTime;
playSpellVisual.LaunchDelay = launchDelay;
SendMessageToSet(playSpellVisual, true);
}
+1 -1
View File
@@ -106,7 +106,7 @@ namespace Scripts.Spells.Warrior
{
int timeOffset = (int)(6 * i * aurEff.GetPeriod() / 25);
Vector4 loc = GetTarget().MoveSpline.ComputePosition(timeOffset);
GetTarget().SendPlaySpellVisual(new Position(loc.X, loc.Y, loc.Z), 0.0f, Misc.SpellVisualBlazingCharge, 0, 0, 1.0f, true);
GetTarget().SendPlaySpellVisual(new Position(loc.X, loc.Y, loc.Z), Misc.SpellVisualBlazingCharge, 0, 0, 1.0f, true);
}
}
}