mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Update RecipeData when levels changed
This commit is contained in:
parent
5905afdf10
commit
c4dd75bdda
1 changed files with 12 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ internal unsafe class RecipeData : IInternalDisposableService
|
|||
|
||||
this.clientState.Login += this.Update;
|
||||
this.clientState.Logout += this.OnLogout;
|
||||
this.clientState.LevelChanged += this.OnlevelChanged;
|
||||
this.gameGui.UnlocksUpdate += this.Update;
|
||||
}
|
||||
|
||||
|
|
@ -61,6 +62,7 @@ internal unsafe class RecipeData : IInternalDisposableService
|
|||
{
|
||||
this.clientState.Login -= this.Update;
|
||||
this.clientState.Logout -= this.OnLogout;
|
||||
this.clientState.LevelChanged -= this.OnlevelChanged;
|
||||
this.gameGui.UnlocksUpdate -= this.Update;
|
||||
}
|
||||
|
||||
|
|
@ -110,9 +112,18 @@ internal unsafe class RecipeData : IInternalDisposableService
|
|||
this.cachedCompletedQuests = null;
|
||||
}
|
||||
|
||||
private void OnlevelChanged(uint classJobId, uint level)
|
||||
{
|
||||
if (this.dataManager.GetExcelSheet<ClassJob>().TryGetRow(classJobId, out var classJobRow) &&
|
||||
classJobRow.ClassJobCategory.RowId == 33) // Crafter
|
||||
{
|
||||
this.Update();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// Client::Game::UI::RecipeNote.InitializeStructs
|
||||
// based on Client::Game::UI::RecipeNote.InitializeStructs
|
||||
|
||||
if (!this.NeedsUpdate())
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue