46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System;
|
|
using Dalamud.Game.Text.SeStringHandling;
|
|
using Dalamud.Memory;
|
|
using FFXIVClientStructs.FFXIV.Component.GUI;
|
|
|
|
namespace LLib.GameUI;
|
|
|
|
public static class LAtkValue
|
|
{
|
|
public unsafe static string? ReadAtkString(this AtkValue atkValue)
|
|
{
|
|
AtkValueType atkValueType = atkValue.Type & AtkValueType.TypeMask;
|
|
int num = ((atkValueType == AtkValueType.String) ? 1097061061 : 1097061058);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1097061057;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 5:
|
|
num = 1097061058;
|
|
break;
|
|
case 3:
|
|
num = ((atkValueType == AtkValueType.ConstString) ? 1097061061 : 1097061057);
|
|
break;
|
|
case 4:
|
|
num = ((!atkValue.String.HasValue) ? 1097061059 : 1097061056);
|
|
break;
|
|
case 1:
|
|
return _200F_206A_206C_206F_202D_202E_200D_200B_202D_200B_200B_202E_200C_200C_200C_206B_202A_202D_206C_202B_206A_200E_200E_202B_206C_200E_206D_202E_202B_206C_200F_200F_200B_206F_202B_202E_200E_202C_206A_202A_202E(new IntPtr((byte*)atkValue.String)).WithCertainMacroCodeReplacements();
|
|
case 2:
|
|
return null;
|
|
case 0:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
static SeString _200F_206A_206C_206F_202D_202E_200D_200B_202D_200B_200B_202E_200C_200C_200C_206B_202A_202D_206C_202B_206A_200E_200E_202B_206C_200E_206D_202E_202B_206C_200F_200F_200B_206F_202B_202E_200E_202C_206A_202A_202E(nint P_0)
|
|
{
|
|
return MemoryHelper.ReadSeStringNullTerminated(P_0);
|
|
}
|
|
}
|