chore: Use var everywhere (#2294)
This commit is contained in:
parent
0b34cc4417
commit
ebaf104935
267 changed files with 873 additions and 873 deletions
|
|
@ -1372,7 +1372,7 @@ namespace Server.Multis
|
|||
}
|
||||
|
||||
// Changing the interval or flipping between commands: "Forward" and "Forward One"
|
||||
TimeSpan delay = TimeSpan.Zero;
|
||||
var delay = TimeSpan.Zero;
|
||||
if (interval.TotalMilliseconds > Math.Abs(moverTimerNext))
|
||||
{
|
||||
var addedDelay = (int)(interval.TotalMilliseconds - Math.Abs(moverTimerNext));
|
||||
|
|
@ -1789,7 +1789,7 @@ namespace Server.Multis
|
|||
list.Add(e);
|
||||
}
|
||||
|
||||
Span<byte> moveBoatPacket = stackalloc byte[BoatPackets.GetMoveBoatHSPacketLength(list.Count)]
|
||||
var moveBoatPacket = stackalloc byte[BoatPackets.GetMoveBoatHSPacketLength(list.Count)]
|
||||
.InitializePacket();
|
||||
|
||||
// Packet must be sent before actual locations are changed
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ public abstract partial class BaseDockedBoat : Item
|
|||
return;
|
||||
}
|
||||
|
||||
Point3D p = ip switch
|
||||
var p = ip switch
|
||||
{
|
||||
Item item => item.GetWorldTop(),
|
||||
Mobile m => m.Location,
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public static class BoatPackets
|
|||
return;
|
||||
}
|
||||
|
||||
Span<byte> moveBoatPacket = stackalloc byte[GetMoveBoatHSPacketLength(entities.Count)]
|
||||
var moveBoatPacket = stackalloc byte[GetMoveBoatHSPacketLength(entities.Count)]
|
||||
.InitializePacket();
|
||||
|
||||
CreateMoveBoatHS(moveBoatPacket, boat, entities, d, speed, xOffset, yOffset);
|
||||
|
|
@ -113,7 +113,7 @@ public static class BoatPackets
|
|||
continue;
|
||||
}
|
||||
|
||||
Span<byte> buffer = builder.GetSpan(OutgoingEntityPackets.MaxWorldEntityPacketLength).InitializePacket();
|
||||
var buffer = builder.GetSpan(OutgoingEntityPackets.MaxWorldEntityPacketLength).InitializePacket();
|
||||
var bytesWritten = OutgoingEntityPackets.CreateWorldEntity(buffer, entity, true);
|
||||
builder.Advance(bytesWritten);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue