qstbak/LLib/LLib.GameUI/LAtkValue.cs
2025-10-09 07:47:19 +10:00

21 lines
499 B
C#

using System;
using Dalamud.Memory;
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace LLib.GameUI;
public static class LAtkValue
{
public unsafe static string? ReadAtkString(this AtkValue atkValue)
{
if (atkValue.Type == FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Undefined)
{
return null;
}
if (atkValue.String.HasValue)
{
return MemoryHelper.ReadSeStringNullTerminated(new IntPtr((byte*)atkValue.String)).WithCertainMacroCodeReplacements();
}
return null;
}
}