Update offset & obsolete field names

This commit is contained in:
Asriel Camora
2025-04-29 14:34:37 -07:00
parent 419476718a
commit 8403fa57c7
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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()
{
+4 -4
View File
@@ -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,