ModernUO/Projects/UOContent.Tests/Tests/Engines/Chat/Packets.cs
Kamron Batman 60a3a6f501
feat: Splits Server in Core and Application (#1806)
> [!Note]
> **Developer Note**
> Now developers will only need to build/run the Application project instead of everything.
> When adding new projects, make sure to: 
> 1. Add a reference to that project in the Application project.
> 2. Add the dll file to the Distribution/Data/assemblies.json file

### Summary
- Adds an application project
- Consolidates process restarts to use `Core.Kill(true)`
- Removes some old messaging, for example processor optimization
- Fixes missing build cleanup
2024-05-30 23:34:03 -07:00

28 lines
No EOL
688 B
C#

using Server.Network;
namespace Server.Engines.Chat;
public sealed class ChatMessagePacket : Packet
{
public ChatMessagePacket(string lang, int number, string param1, string param2) : base(0xB2)
{
param1 ??= string.Empty;
param2 ??= string.Empty;
EnsureCapacity(13 + (param1.Length + param2.Length) * 2);
Stream.Write((ushort)(number - 20));
if (lang != null)
{
Stream.WriteAsciiFixed(lang, 4);
}
else
{
Stream.Write(0);
}
Stream.WriteBigUniNull(param1);
Stream.WriteBigUniNull(param2);
}
}