mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Cache completed Quests in RecipeData too
This commit is contained in:
parent
62fdd2c60d
commit
5905afdf10
1 changed files with 9 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ using CommunityToolkit.HighPerformance;
|
||||||
using Dalamud.Data;
|
using Dalamud.Data;
|
||||||
using Dalamud.Game.Gui;
|
using Dalamud.Game.Gui;
|
||||||
|
|
||||||
|
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||||
using FFXIVClientStructs.Interop;
|
using FFXIVClientStructs.Interop;
|
||||||
|
|
||||||
|
|
@ -33,6 +34,7 @@ internal unsafe class RecipeData : IInternalDisposableService
|
||||||
private readonly ushort[,] noteBookDivisionIds;
|
private readonly ushort[,] noteBookDivisionIds;
|
||||||
private byte[]? cachedUnlockedSecretRecipeBooks;
|
private byte[]? cachedUnlockedSecretRecipeBooks;
|
||||||
private byte[]? cachedUnlockLinks;
|
private byte[]? cachedUnlockLinks;
|
||||||
|
private byte[]? cachedCompletedQuests;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="RecipeData"/> class.
|
/// Initializes a new instance of the <see cref="RecipeData"/> class.
|
||||||
|
|
@ -105,6 +107,7 @@ internal unsafe class RecipeData : IInternalDisposableService
|
||||||
{
|
{
|
||||||
this.cachedUnlockedSecretRecipeBooks = null;
|
this.cachedUnlockedSecretRecipeBooks = null;
|
||||||
this.cachedUnlockLinks = null;
|
this.cachedUnlockLinks = null;
|
||||||
|
this.cachedCompletedQuests = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
@ -252,6 +255,12 @@ internal unsafe class RecipeData : IInternalDisposableService
|
||||||
changed |= true;
|
changed |= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.cachedCompletedQuests == null || !QuestManager.Instance()->CompletedQuestsBitmask.SequenceEqual(this.cachedCompletedQuests))
|
||||||
|
{
|
||||||
|
this.cachedCompletedQuests = QuestManager.Instance()->CompletedQuestsBitmask.ToArray();
|
||||||
|
changed |= true;
|
||||||
|
}
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue