fix(core): Converts mobile moving packet (#357)
- [X] Converts mobile moving packet
This commit is contained in:
parent
c2143584bc
commit
10a6e17640
9 changed files with 147 additions and 170 deletions
|
|
@ -13,6 +13,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
*************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
|
@ -38,5 +39,17 @@ namespace Server.Network
|
|||
writer.Write((ushort)length);
|
||||
writer.Seek(length, SeekOrigin.Begin);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void InitializePackets(this Span<byte> buffer, int chunkLength)
|
||||
{
|
||||
var index = 0;
|
||||
|
||||
while (index < buffer.Length)
|
||||
{
|
||||
buffer[index] = 0;
|
||||
index += chunkLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue