Add support for EmjCostume rows

This commit is contained in:
Haselnussbomber 2025-10-18 03:52:31 +02:00
parent a06c0e3ed2
commit 69caffeb97
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1
2 changed files with 22 additions and 0 deletions

View file

@ -8,6 +8,7 @@ using Dalamud.IoC.Internal;
using Dalamud.Logging.Internal;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.Game.InstanceContent;
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using FFXIVClientStructs.FFXIV.Component.Exd;
@ -211,6 +212,14 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
return this.IsUnlockLinkUnlocked(row.Unknown26);
}
/// <inheritdoc/>
public bool IsEmjCostumeUnlocked(EmjCostume row)
{
return this.dataManager.GetExcelSheet<EmjVoiceNpc>().TryGetRow(row.RowId, out var emjVoiceNpcRow)
&& this.IsEmjVoiceNpcUnlocked(emjVoiceNpcRow)
&& QuestManager.IsQuestComplete(row.Unknown1);
}
/// <inheritdoc/>
public bool IsGeneralActionUnlocked(GeneralAction row)
{
@ -644,6 +653,9 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
// - FramersKit (is that just an Item?)
// - ... more?
// Subrow sheets, which are incompatible with the current Unlock event, since RowRef doesn't carry the SubrowId:
// - EmjCostume
// Probably not happening, because it requires fetching data from server:
// - Achievements
// - Titles
@ -768,6 +780,9 @@ internal class UnlockStatePluginScoped : IInternalDisposableService, IUnlockStat
/// <inheritdoc/>
public bool IsEmjVoiceNpcUnlocked(EmjVoiceNpc row) => this.unlockStateService.IsEmjVoiceNpcUnlocked(row);
/// <inheritdoc/>
public bool IsEmjCostumeUnlocked(EmjCostume row) => this.unlockStateService.IsEmjCostumeUnlocked(row);
/// <inheritdoc/>
public bool IsGeneralActionUnlocked(GeneralAction row) => this.unlockStateService.IsGeneralActionUnlocked(row);

View file

@ -157,6 +157,13 @@ public interface IUnlockState
/// <returns><see langword="true"/> if unlocked; otherwise, <see langword="false"/>.</returns>
bool IsEmjVoiceNpcUnlocked(EmjVoiceNpc row);
/// <summary>
/// Determines whether the specified EmjCostume (Doman Mahjong Character Costume) is unlocked.
/// </summary>
/// <param name="row">The EmjCostume row to check.</param>
/// <returns><see langword="true"/> if unlocked; otherwise, <see langword="false"/>.</returns>
bool IsEmjCostumeUnlocked(EmjCostume row);
/// <summary>
/// Determines whether the specified GeneralAction is unlocked.
/// </summary>