Reload recipe data on job level change

This fixes recipes that adjust to the job level (i.e., Cosmic
Exploration) not being set to the right level after a level up when the recipe
doesn't change. This happens frequently during Red Alerts.

This can be considered an extended fix for #43.
This commit is contained in:
Octavia Togami
2025-09-14 23:30:22 -07:00
parent 3359748d13
commit 78220ac7ab
+5
View File
@@ -267,6 +267,11 @@ public sealed unsafe class RecipeNote : Window, IDisposable
var characterStats = Gearsets.CalculateCharacterStats(gearStats, gearItems, RecipeData.ClassJob.GetPlayerLevel(), RecipeData.ClassJob.CanPlayerUseManipulation());
if (characterStats != CharacterStats)
{
// Re-initialize recipe data to recalculate adjusted level if needed
if (RecipeData.AdjustedJobLevel != null && characterStats.Level != CharacterStats?.Level)
{
RecipeData = new(RecipeData.RecipeId);
}
CharacterStats = characterStats;
StatsChanged = true;
}