From 3648cb585d3c4690923139486eb72fe8e862f7b3 Mon Sep 17 00:00:00 2001 From: Asriel Camora Date: Tue, 26 Sep 2023 16:05:58 -0700 Subject: [PATCH] Use exp array idx for job levels --- Craftimizer/SimulatorUtils.cs | 3 +++ Craftimizer/Utils/RecipeNote.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Craftimizer/SimulatorUtils.cs b/Craftimizer/SimulatorUtils.cs index 1ca6aea..27eeb87 100644 --- a/Craftimizer/SimulatorUtils.cs +++ b/Craftimizer/SimulatorUtils.cs @@ -142,6 +142,9 @@ internal static class ClassJobUtils _ => null }; + public static sbyte GetExpArrayIdx(this ClassJob me) => + LuminaSheets.ClassJobSheet.GetRow(me.GetClassJobIndex())!.ExpArrayIndex; + public static string GetName(this ClassJob classJob) { var job = LuminaSheets.ClassJobSheet.GetRow(classJob.GetClassJobIndex())!; diff --git a/Craftimizer/Utils/RecipeNote.cs b/Craftimizer/Utils/RecipeNote.cs index 315bbcd..9178682 100644 --- a/Craftimizer/Utils/RecipeNote.cs +++ b/Craftimizer/Utils/RecipeNote.cs @@ -122,7 +122,7 @@ public sealed unsafe class RecipeNote : IDisposable Table = Recipe.RecipeLevelTable.Value!; Info = CreateInfo(); ClassJob = (ClassJob)Recipe.CraftType.Row; - CharacterLevel = PlayerState.Instance()->ClassJobLevelArray[ClassJob.GetClassJobIndex()]; + CharacterLevel = PlayerState.Instance()->ClassJobLevelArray[ClassJob.GetExpArrayIdx()]; CanUseManipulation = ActionManager.CanUseActionOnTarget(ActionType.Manipulation.GetId(ClassJob), (GameObject*)Service.ClientState.LocalPlayer!.Address); HQIngredientCount = Recipe.UnkData5 .Where(i =>