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:
Kamron Batman 2020-11-20 21:50:13 -08:00 • committed by GitHub
parent 10d884fe30
commit b6cd408623
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 1160 additions and 1025 deletions

View file

@ -279,7 +279,7 @@ namespace Server.Items
inaccessible = true;
}
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", ""));
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Regular, 0x3B2, 3, number);
}
return inaccessible;

View file

@ -51,7 +51,7 @@ namespace Server.Items
return;
}
to.Send(new MessageLocalized(Serial, ItemID, MessageType.Regular, hue, 3, number, "", ""));
to.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Regular, hue, 3, number);
}
private void SendMessageTo(Mobile to, string text, int hue)
@ -61,7 +61,7 @@ namespace Server.Items
return;
}
to.Send(new UnicodeMessage(Serial, ItemID, MessageType.Regular, hue, 3, "ENU", "", text));
to.NetState.SendMessage(Serial, ItemID, MessageType.Regular, hue, 3, false, "ENU", "", text);
}
public virtual bool ExecuteTrap(Mobile from)