diff --git a/Craftimizer/Utils/CSCraftEventHandler.cs b/Craftimizer/Utils/CSCraftEventHandler.cs index a6523ab..93dca36 100644 --- a/Craftimizer/Utils/CSCraftEventHandler.cs +++ b/Craftimizer/Utils/CSCraftEventHandler.cs @@ -7,7 +7,7 @@ namespace Craftimizer.Utils; public unsafe struct CSCraftEventHandler { [FieldOffset(0x48A)] public unsafe fixed ushort WKSClassLevels[2]; - [FieldOffset(0x48E)] public unsafe fixed ushort WKSClassJobs[2]; + [FieldOffset(0x48E)] public unsafe fixed byte WKSClassJobs[2]; public static CSCraftEventHandler* Instance() { diff --git a/Craftimizer/Utils/RecipeData.cs b/Craftimizer/Utils/RecipeData.cs index 58691bf..fc66c25 100644 --- a/Craftimizer/Utils/RecipeData.cs +++ b/Craftimizer/Utils/RecipeData.cs @@ -34,10 +34,10 @@ public sealed record RecipeData ClassJob = (ClassJob)Recipe.CraftType.RowId; var resolvedLevelTableRow = Recipe.RecipeLevelTable.RowId; - if (Recipe.Unknown0 != 0) + if (Recipe.MaxAdjustableJobLevel != 0) { - AdjustedJobLevel = Math.Min(explicitlyAdjustedJobLevel ?? ClassJob.GetWKSSyncedLevel(), Recipe.Unknown0); - resolvedLevelTableRow = LuminaSheets.GathererCrafterLvAdjustTableSheet.GetRow(AdjustedJobLevel.Value).Unknown0; + AdjustedJobLevel = Math.Min(explicitlyAdjustedJobLevel ?? ClassJob.GetWKSSyncedLevel(), Recipe.MaxAdjustableJobLevel); + resolvedLevelTableRow = LuminaSheets.GathererCrafterLvAdjustTableSheet.GetRow(AdjustedJobLevel.Value).RecipeLevel; } Table = LuminaSheets.RecipeLevelTableSheet.GetRow(resolvedLevelTableRow); @@ -46,7 +46,7 @@ public sealed record RecipeData IsExpert = Recipe.IsExpert, ClassJobLevel = Table.ClassJobLevel, ConditionsFlag = Table.ConditionsFlag, - MaxDurability = (Recipe.Unknown0 != 0 ? 80 : Table.Durability) * Recipe.DurabilityFactor / 100, + MaxDurability = (Recipe.MaxAdjustableJobLevel != 0 ? 80 : Table.Durability) * Recipe.DurabilityFactor / 100, MaxQuality = (Recipe.CanHq || Recipe.IsExpert) ? (int)Table.Quality * Recipe.QualityFactor / 100 : 0, MaxProgress = Table.Difficulty * Recipe.DifficultyFactor / 100, QualityModifier = Table.QualityModifier,