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:
@@ -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 playSpellVisual = new();
|
||||||
playSpellVisual.Source = GetGUID();
|
playSpellVisual.Source = GetGUID();
|
||||||
@@ -1140,20 +1140,21 @@ namespace Game.Entities
|
|||||||
playSpellVisual.MissReason = missReason;
|
playSpellVisual.MissReason = missReason;
|
||||||
playSpellVisual.ReflectStatus = reflectStatus;
|
playSpellVisual.ReflectStatus = reflectStatus;
|
||||||
playSpellVisual.SpeedAsTime = speedAsTime;
|
playSpellVisual.SpeedAsTime = speedAsTime;
|
||||||
|
playSpellVisual.LaunchDelay = launchDelay;
|
||||||
SendMessageToSet(playSpellVisual, true);
|
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 playSpellVisual = new();
|
||||||
playSpellVisual.Source = GetGUID();
|
playSpellVisual.Source = GetGUID();
|
||||||
playSpellVisual.TargetPosition = targetPosition;
|
playSpellVisual.TargetPosition = targetPosition;
|
||||||
playSpellVisual.LaunchDelay = launchDelay;
|
|
||||||
playSpellVisual.SpellVisualID = spellVisualId;
|
playSpellVisual.SpellVisualID = spellVisualId;
|
||||||
playSpellVisual.TravelSpeed = travelSpeed;
|
playSpellVisual.TravelSpeed = travelSpeed;
|
||||||
playSpellVisual.MissReason = missReason;
|
playSpellVisual.MissReason = missReason;
|
||||||
playSpellVisual.ReflectStatus = reflectStatus;
|
playSpellVisual.ReflectStatus = reflectStatus;
|
||||||
playSpellVisual.SpeedAsTime = speedAsTime;
|
playSpellVisual.SpeedAsTime = speedAsTime;
|
||||||
|
playSpellVisual.LaunchDelay = launchDelay;
|
||||||
SendMessageToSet(playSpellVisual, true);
|
SendMessageToSet(playSpellVisual, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ namespace Scripts.Spells.Warrior
|
|||||||
{
|
{
|
||||||
int timeOffset = (int)(6 * i * aurEff.GetPeriod() / 25);
|
int timeOffset = (int)(6 * i * aurEff.GetPeriod() / 25);
|
||||||
Vector4 loc = GetTarget().MoveSpline.ComputePosition(timeOffset);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user