mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-25 22:21:49 +01:00
Add Quest support to IUnlockState
This commit is contained in:
parent
767af771ae
commit
4c5b5a604a
2 changed files with 23 additions and 0 deletions
|
|
@ -376,6 +376,15 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
||||||
return UIState.IsPublicContentUnlocked(row.RowId);
|
return UIState.IsPublicContentUnlocked(row.RowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool IsQuestCompleted(Quest row)
|
||||||
|
{
|
||||||
|
if (!this.IsLoaded)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return QuestManager.IsQuestComplete(row.RowId);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public bool IsRecipeUnlocked(Recipe row)
|
public bool IsRecipeUnlocked(Recipe row)
|
||||||
{
|
{
|
||||||
|
|
@ -536,6 +545,9 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
||||||
if (rowRef.TryGetValue<PublicContentSheet>(out var publicContentRow))
|
if (rowRef.TryGetValue<PublicContentSheet>(out var publicContentRow))
|
||||||
return this.IsPublicContentUnlocked(publicContentRow);
|
return this.IsPublicContentUnlocked(publicContentRow);
|
||||||
|
|
||||||
|
if (rowRef.TryGetValue<Quest>(out var questRow))
|
||||||
|
return this.IsQuestCompleted(questRow);
|
||||||
|
|
||||||
if (rowRef.TryGetValue<Recipe>(out var recipeRow))
|
if (rowRef.TryGetValue<Recipe>(out var recipeRow))
|
||||||
return this.IsRecipeUnlocked(recipeRow);
|
return this.IsRecipeUnlocked(recipeRow);
|
||||||
|
|
||||||
|
|
@ -629,6 +641,7 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
||||||
this.UpdateUnlocksForSheet<Ornament>();
|
this.UpdateUnlocksForSheet<Ornament>();
|
||||||
this.UpdateUnlocksForSheet<Perform>();
|
this.UpdateUnlocksForSheet<Perform>();
|
||||||
this.UpdateUnlocksForSheet<PublicContentSheet>();
|
this.UpdateUnlocksForSheet<PublicContentSheet>();
|
||||||
|
this.UpdateUnlocksForSheet<Quest>();
|
||||||
this.UpdateUnlocksForSheet<Recipe>();
|
this.UpdateUnlocksForSheet<Recipe>();
|
||||||
this.UpdateUnlocksForSheet<SecretRecipeBook>();
|
this.UpdateUnlocksForSheet<SecretRecipeBook>();
|
||||||
this.UpdateUnlocksForSheet<Trait>();
|
this.UpdateUnlocksForSheet<Trait>();
|
||||||
|
|
@ -822,6 +835,9 @@ internal class UnlockStatePluginScoped : IInternalDisposableService, IUnlockStat
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public bool IsPublicContentUnlocked(PublicContentSheet row) => this.unlockStateService.IsPublicContentUnlocked(row);
|
public bool IsPublicContentUnlocked(PublicContentSheet row) => this.unlockStateService.IsPublicContentUnlocked(row);
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool IsQuestCompleted(Quest row) => this.unlockStateService.IsQuestCompleted(row);
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public bool IsRecipeUnlocked(Recipe row) => this.unlockStateService.IsRecipeUnlocked(row);
|
public bool IsRecipeUnlocked(Recipe row) => this.unlockStateService.IsRecipeUnlocked(row);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -268,6 +268,13 @@ public interface IUnlockState : IDalamudService
|
||||||
/// <returns><see langword="true"/> if unlocked; otherwise, <see langword="false"/>.</returns>
|
/// <returns><see langword="true"/> if unlocked; otherwise, <see langword="false"/>.</returns>
|
||||||
bool IsPublicContentUnlocked(PublicContent row);
|
bool IsPublicContentUnlocked(PublicContent row);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Determines whether the specified Quest is completed.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="row">The Quest row to check.</param>
|
||||||
|
/// <returns><see langword="true"/> if completed; otherwise, <see langword="false"/>.</returns>
|
||||||
|
bool IsQuestCompleted(Quest row);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether the specified Recipe is unlocked.
|
/// Determines whether the specified Recipe is unlocked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue