### 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
22 lines
738 B
C#
22 lines
738 B
C#
using Server.Network;
|
|
|
|
namespace Server
|
|
{
|
|
public static class MessageHelper
|
|
{
|
|
public static void SendLocalizedMessageTo(Item from, Mobile to, int number, int hue)
|
|
{
|
|
SendLocalizedMessageTo(from, to, number, "", hue);
|
|
}
|
|
|
|
public static void SendLocalizedMessageTo(Item from, Mobile to, int number, string args, int hue)
|
|
{
|
|
to.NetState.SendMessageLocalized(from.Serial, from.ItemID, MessageType.Regular, hue, 3, number, "", args);
|
|
}
|
|
|
|
public static void SendMessageTo(Item from, Mobile to, string text, int hue)
|
|
{
|
|
to.NetState.SendMessage(from.Serial, from.ItemID, MessageType.Regular, hue, 3, false, "ENU", "", text);
|
|
}
|
|
}
|
|
}
|