rewview (3) and fix some copy docs comments

This commit is contained in:
RedworkDE 2025-12-23 12:41:46 +01:00
parent 9da178ad56
commit f76d77f79d
2 changed files with 8 additions and 7 deletions

View file

@ -76,9 +76,9 @@ public interface ILogMessage : IEquatable<ILogMessage>
} }
/// <summary> /// <summary>
/// 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.
/// </summary> /// </summary>
/// <param name="ptr">A pointer to the Status.</param> /// <param name="ptr">A pointer to the log message.</param>
internal unsafe readonly struct LogMessage(LogMessageQueueItem* ptr) : ILogMessage internal unsafe readonly struct LogMessage(LogMessageQueueItem* ptr) : ILogMessage
{ {
/// <inheritdoc/> /// <inheritdoc/>

View file

@ -1,13 +1,13 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using Dalamud.Data; using Dalamud.Data;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.UI.Misc; using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using Lumina.Excel; using Lumina.Excel;
using Lumina.Excel.Sheets; using Lumina.Excel.Sheets;
using Lumina.Text.ReadOnly;
namespace Dalamud.Game.Chat; namespace Dalamud.Game.Chat;
@ -19,7 +19,7 @@ public interface ILogMessageEntity : IEquatable<ILogMessageEntity>
/// <summary> /// <summary>
/// Gets the name of this entity. /// Gets the name of this entity.
/// </summary> /// </summary>
SeString Name { get; } ReadOnlySeString Name { get; }
/// <summary> /// <summary>
/// Gets the ID of the homeworld of this entity, if it is a player. /// Gets the ID of the homeworld of this entity, if it is a player.
@ -44,14 +44,15 @@ public interface ILogMessageEntity : IEquatable<ILogMessageEntity>
/// <summary> /// <summary>
/// This struct represents a status effect an actor is afflicted by. /// This struct represents an entity related to a log message.
/// </summary> /// </summary>
/// <param name="ptr">A pointer to the Status.</param> /// <param name="ptr">A pointer to the log message item.</param>
/// <param name="source">If <see langword="true"/> represents the source entity of the log message, otherwise represents the target entity</param>
internal unsafe readonly struct LogMessageEntity(LogMessageQueueItem* ptr, bool source) : ILogMessageEntity internal unsafe readonly struct LogMessageEntity(LogMessageQueueItem* ptr, bool source) : ILogMessageEntity
{ {
public Span<byte> NameSpan => source ? ptr->SourceName : ptr->TargetName; public Span<byte> 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; public ushort HomeWorldId => source ? ptr->SourceHomeWorld : ptr->TargetHomeWorld;