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
|
|
@ -226,17 +226,18 @@ namespace Server.Misc
|
|||
|
||||
if (sb.Length + 1 + v.Length >= 256)
|
||||
{
|
||||
sender.Send(
|
||||
new AsciiMessage(
|
||||
Server.Serial.MinusOne,
|
||||
-1,
|
||||
MessageType.Label,
|
||||
0x35,
|
||||
3,
|
||||
"System",
|
||||
sb.ToString()
|
||||
)
|
||||
sender.SendMessage(
|
||||
Server.Serial.MinusOne,
|
||||
-1,
|
||||
MessageType.Label,
|
||||
0x35,
|
||||
3,
|
||||
true,
|
||||
null,
|
||||
"System",
|
||||
sb.ToString()
|
||||
);
|
||||
|
||||
sb = new StringBuilder();
|
||||
sb.Append(v);
|
||||
}
|
||||
|
|
@ -249,16 +250,16 @@ namespace Server.Misc
|
|||
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
sender.Send(
|
||||
new AsciiMessage(
|
||||
Server.Serial.MinusOne,
|
||||
-1,
|
||||
MessageType.Label,
|
||||
0x35,
|
||||
3,
|
||||
"System",
|
||||
sb.ToString()
|
||||
)
|
||||
sender.SendMessage(
|
||||
Server.Serial.MinusOne,
|
||||
-1,
|
||||
MessageType.Label,
|
||||
0x35,
|
||||
3,
|
||||
true,
|
||||
null,
|
||||
"System",
|
||||
sb.ToString()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue