Scripts/Spells Update Divine Star
Port From (https://github.com/TrinityCore/TrinityCore/commit/0eada1d7086985b759e10684966e3aefdd7eefe7)
This commit is contained in:
@@ -754,17 +754,17 @@ namespace Game.Entities
|
||||
rotatedPoints.Add(new Vector3(x, y, z));
|
||||
}
|
||||
|
||||
InitSplines(rotatedPoints, timeToTarget);
|
||||
InitSplines(rotatedPoints.ToArray(), timeToTarget);
|
||||
}
|
||||
|
||||
public void InitSplines(List<Vector3> splinePoints, uint timeToTarget)
|
||||
public void InitSplines(Vector3[] splinePoints, uint timeToTarget)
|
||||
{
|
||||
if (splinePoints.Count < 2)
|
||||
if (splinePoints.Length < 2)
|
||||
return;
|
||||
|
||||
_movementTime = 0;
|
||||
|
||||
_spline.InitSpline(splinePoints.ToArray(), splinePoints.Count, EvaluationMode.Linear);
|
||||
_spline.InitSpline(splinePoints, splinePoints.Length, EvaluationMode.Linear);
|
||||
_spline.InitLengths();
|
||||
|
||||
// should be sent in object create packets only
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(TimeToTarget);
|
||||
data.WriteUInt32(ElapsedTimeForMovement);
|
||||
|
||||
data.WriteBits(Points.Count, 16);
|
||||
data.WriteBits(Points.Length, 16);
|
||||
data.FlushBits();
|
||||
|
||||
foreach (Vector3 point in Points)
|
||||
@@ -93,6 +93,6 @@ namespace Game.Networking.Packets
|
||||
|
||||
public uint TimeToTarget;
|
||||
public uint ElapsedTimeForMovement;
|
||||
public List<Vector3> Points = new();
|
||||
public Vector3[] Points = new Vector3[0];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user