mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 07:17:45 +01:00
Implement Print methods that work with Lumina SeString/ReadOnlySeString (#2106)
* Implement Print methods that work with Lumina SeString/ReadOnlySeString * null terminate before passing to Utf8String * Rename XivChatEntryReadOnly to XivChatEntryRaw * Fix error from wrong conversion method * Follow Rider suggestion * Switch from AppendMacroString to BeginMacro for optimization * More optimization suggested by kizer * More kizer suggested optimizations * Fix small mistake * Use XivChatEntry and read/write to Byte fields accordingly
This commit is contained in:
parent
bf7ef00ec0
commit
3a3d6b6e6a
3 changed files with 118 additions and 45 deletions
|
|
@ -20,12 +20,30 @@ public sealed class XivChatEntry
|
|||
/// <summary>
|
||||
/// Gets or sets the sender name.
|
||||
/// </summary>
|
||||
public SeString Name { get; set; } = string.Empty;
|
||||
public SeString Name
|
||||
{
|
||||
get => SeString.Parse(this.NameBytes);
|
||||
set => this.NameBytes = value.Encode();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the message.
|
||||
/// </summary>
|
||||
public SeString Message { get; set; } = string.Empty;
|
||||
public SeString Message
|
||||
{
|
||||
get => SeString.Parse(this.MessageBytes);
|
||||
set => this.MessageBytes = value.Encode();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets the name payloads
|
||||
/// </summary>
|
||||
public byte[] NameBytes { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets the message payloads.
|
||||
/// </summary>
|
||||
public byte[] MessageBytes { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether new message sounds should be silenced or not.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue