From bce0e256d24850d32c1b89d35827e1217fdfdf43 Mon Sep 17 00:00:00 2001 From: Asriel Camora Date: Thu, 24 Apr 2025 01:47:02 -0700 Subject: [PATCH] Add patch offset changes --- Craftimizer/Utils/CSCraftEventHandler.cs | 16 ++++++++++++++++ Craftimizer/Utils/SynthesisValues.cs | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 Craftimizer/Utils/CSCraftEventHandler.cs diff --git a/Craftimizer/Utils/CSCraftEventHandler.cs b/Craftimizer/Utils/CSCraftEventHandler.cs new file mode 100644 index 0000000..a6523ab --- /dev/null +++ b/Craftimizer/Utils/CSCraftEventHandler.cs @@ -0,0 +1,16 @@ +using FFXIVClientStructs.FFXIV.Client.Game.Event; +using System.Runtime.InteropServices; + +namespace Craftimizer.Utils; + +[StructLayout(LayoutKind.Explicit)] +public unsafe struct CSCraftEventHandler +{ + [FieldOffset(0x48A)] public unsafe fixed ushort WKSClassLevels[2]; + [FieldOffset(0x48E)] public unsafe fixed ushort WKSClassJobs[2]; + + public static CSCraftEventHandler* Instance() + { + return (CSCraftEventHandler*)EventFramework.Instance()->GetCraftEventHandler(); + } +} diff --git a/Craftimizer/Utils/SynthesisValues.cs b/Craftimizer/Utils/SynthesisValues.cs index 8e48e3d..4d22243 100644 --- a/Craftimizer/Utils/SynthesisValues.cs +++ b/Craftimizer/Utils/SynthesisValues.cs @@ -15,7 +15,7 @@ internal sealed unsafe class SynthesisValues(AddonSynthesis* addon) private ReadOnlySpan Values => new(Addon->AtkUnitBase.AtkValues, Addon->AtkUnitBase.AtkValuesCount); // Always 0? - private uint Unk0 => GetUInt(0); + private uint IsInitializing => GetUInt(0); private bool IsTrialSynthesis => TryGetBool(1) ?? false; public SeString ItemName => GetString(2); public uint ItemIconId => GetUInt(3);