fix(core): Updates slice with range selectors (#583)
- [X] Replaces Span slicing with range selection - [X] Replaces string slicing with range selection
This commit is contained in:
parent
9f9d990f85
commit
a0893b68c0
62 changed files with 363 additions and 382 deletions
|
|
@ -246,7 +246,7 @@ namespace Server.Engines.PartySystem
|
|||
);
|
||||
|
||||
// : joined the party.
|
||||
buffer = buffer.SliceToLength(length);
|
||||
buffer = buffer[..length];
|
||||
SendToAll(buffer);
|
||||
SendToAllListeners(buffer);
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ namespace Server.Engines.PartySystem
|
|||
Serial.MinusOne, -1, MessageType.Regular, hue, 3, number, "System", args
|
||||
);
|
||||
|
||||
buffer = buffer.SliceToLength(length);
|
||||
buffer = buffer[..length];
|
||||
|
||||
SendToAll(buffer);
|
||||
SendToAllListeners(buffer);
|
||||
|
|
@ -438,7 +438,7 @@ namespace Server.Engines.PartySystem
|
|||
|
||||
if (length != buffer.Length)
|
||||
{
|
||||
buffer = buffer.SliceToLength(length); // Adjust to the actual size
|
||||
buffer = buffer[..length]; // Adjust to the actual size
|
||||
}
|
||||
|
||||
ns.Send(buffer);
|
||||
|
|
@ -528,7 +528,7 @@ namespace Server.Engines.PartySystem
|
|||
|
||||
if (length != buffer.Length)
|
||||
{
|
||||
buffer = buffer.SliceToLength(length); // Adjust to the actual size
|
||||
buffer = buffer[..length]; // Adjust to the actual size
|
||||
}
|
||||
|
||||
m.NetState?.Send(buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue