mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-25 06:01:49 +01:00
Reorder, bail out early in Recipe and McGuffin
This commit is contained in:
parent
4c5b5a604a
commit
98ef505b38
1 changed files with 15 additions and 9 deletions
|
|
@ -310,12 +310,6 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
return nativeRow != null && UIState.Instance()->IsItemActionUnlocked(nativeRow) == 1;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMcGuffinUnlocked(McGuffin row)
|
||||
{
|
||||
return PlayerState.Instance()->IsMcGuffinUnlocked(row.RowId);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMJILandmarkUnlocked(MJILandmark row)
|
||||
{
|
||||
|
|
@ -328,6 +322,15 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
return this.IsUnlockLinkUnlocked(row.UnlockLink);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMcGuffinUnlocked(McGuffin row)
|
||||
{
|
||||
if (!this.IsLoaded)
|
||||
return false;
|
||||
|
||||
return PlayerState.Instance()->IsMcGuffinUnlocked(row.RowId);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMountUnlocked(Mount row)
|
||||
{
|
||||
|
|
@ -388,6 +391,9 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
/// <inheritdoc/>
|
||||
public bool IsRecipeUnlocked(Recipe row)
|
||||
{
|
||||
if (!this.IsLoaded)
|
||||
return false;
|
||||
|
||||
return this.recipeData.IsRecipeUnlocked(row);
|
||||
}
|
||||
|
||||
|
|
@ -808,15 +814,15 @@ internal class UnlockStatePluginScoped : IInternalDisposableService, IUnlockStat
|
|||
/// <inheritdoc/>
|
||||
public bool IsItemUnlocked(Item row) => this.unlockStateService.IsItemUnlocked(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMcGuffinUnlocked(McGuffin row) => this.unlockStateService.IsMcGuffinUnlocked(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMJILandmarkUnlocked(MJILandmark row) => this.unlockStateService.IsMJILandmarkUnlocked(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMKDLoreUnlocked(MKDLore row) => this.unlockStateService.IsMKDLoreUnlocked(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMcGuffinUnlocked(McGuffin row) => this.unlockStateService.IsMcGuffinUnlocked(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMountUnlocked(Mount row) => this.unlockStateService.IsMountUnlocked(row);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue