diff --git a/Dalamud/Game/Chat/LogMessage.cs b/Dalamud/Game/Chat/LogMessage.cs index fbe3dec3f..931b3fb3a 100644 --- a/Dalamud/Game/Chat/LogMessage.cs +++ b/Dalamud/Game/Chat/LogMessage.cs @@ -76,9 +76,9 @@ public interface ILogMessage : IEquatable } /// -/// This struct represents a status effect an actor is afflicted by. +/// This struct represents log message in the queue to be added to the chat. /// -/// A pointer to the Status. +/// A pointer to the log message. internal unsafe readonly struct LogMessage(LogMessageQueueItem* ptr) : ILogMessage { /// diff --git a/Dalamud/Game/Chat/LogMessageEntity.cs b/Dalamud/Game/Chat/LogMessageEntity.cs index e4c81c16a..b465dc158 100644 --- a/Dalamud/Game/Chat/LogMessageEntity.cs +++ b/Dalamud/Game/Chat/LogMessageEntity.cs @@ -1,13 +1,13 @@ using System.Diagnostics.CodeAnalysis; using Dalamud.Data; -using Dalamud.Game.Text.SeStringHandling; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.UI.Misc; using Lumina.Excel; using Lumina.Excel.Sheets; +using Lumina.Text.ReadOnly; namespace Dalamud.Game.Chat; @@ -19,7 +19,7 @@ public interface ILogMessageEntity : IEquatable /// /// Gets the name of this entity. /// - SeString Name { get; } + ReadOnlySeString Name { get; } /// /// Gets the ID of the homeworld of this entity, if it is a player. @@ -44,14 +44,15 @@ public interface ILogMessageEntity : IEquatable /// -/// This struct represents a status effect an actor is afflicted by. +/// This struct represents an entity related to a log message. /// -/// A pointer to the Status. +/// A pointer to the log message item. +/// If represents the source entity of the log message, otherwise represents the target entity internal unsafe readonly struct LogMessageEntity(LogMessageQueueItem* ptr, bool source) : ILogMessageEntity { public Span NameSpan => source ? ptr->SourceName : ptr->TargetName; - public SeString Name => SeString.Parse(this.NameSpan); + public ReadOnlySeString Name => new ReadOnlySeString(this.NameSpan); public ushort HomeWorldId => source ? ptr->SourceHomeWorld : ptr->TargetHomeWorld;