Updates Message Packets (#321)
### API Breaking Change Combined `AsciiMessage` and `UnicodeMessage` into a single function that takes two arguments, `bool ascii` and `string lang`. Lang can be null (or anything) if ascii is true. - [X] Changes message packets - [X] Cleans up some code - [X] Uses benchmarks to determine if the spanwriter + copyfrom
This commit is contained in:
parent
10d884fe30
commit
b6cd408623
59 changed files with 1160 additions and 1025 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Buffers;
|
||||
using System.Buffers.Binary;
|
||||
using System.Collections.Generic;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
|
|
@ -8,7 +9,7 @@ using Server.Network;
|
|||
|
||||
namespace Benchmarks
|
||||
{
|
||||
[MemoryDiagnoser, SimpleJob(RuntimeMoniker.NetCoreApp31)]
|
||||
[SimpleJob(RuntimeMoniker.NetCoreApp50)]
|
||||
public class BenchmarkPacketConstruction
|
||||
{
|
||||
public List<BuyItemState> m_States;
|
||||
|
|
@ -150,7 +151,7 @@ namespace Benchmarks
|
|||
w.Write((ushort)buyState.Hue);
|
||||
}
|
||||
|
||||
return w.Pos;
|
||||
return w.Position;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue