mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Add support for Occult Record items
This commit is contained in:
parent
68c02caf37
commit
6e8efabc3b
3 changed files with 111 additions and 88 deletions
|
|
@ -1,76 +0,0 @@
|
||||||
using Lumina.Excel.Sheets;
|
|
||||||
|
|
||||||
namespace Dalamud.Game;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Enum for <see cref="ItemAction.Type"/>.
|
|
||||||
/// </summary>
|
|
||||||
public enum ItemActionType : ushort
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock a companion (minion).
|
|
||||||
/// </summary>
|
|
||||||
Companion = 853,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock a chocobo companion barding.
|
|
||||||
/// </summary>
|
|
||||||
BuddyEquip = 1013,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock a mount.
|
|
||||||
/// </summary>
|
|
||||||
Mount = 1322,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock recipes from a crafting recipe book.
|
|
||||||
/// </summary>
|
|
||||||
SecretRecipeBook = 2136,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock various types of content (e.g. Riding Maps, Blue Mage Totems, Emotes, Hairstyles).
|
|
||||||
/// </summary>
|
|
||||||
UnlockLink = 2633,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock a Triple Triad Card.
|
|
||||||
/// </summary>
|
|
||||||
TripleTriadCard = 3357,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock gathering nodes of a Folklore Tome.
|
|
||||||
/// </summary>
|
|
||||||
FolkloreTome = 4107,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock an Orchestrion Roll.
|
|
||||||
/// </summary>
|
|
||||||
OrchestrionRoll = 25183,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock portrait designs.
|
|
||||||
/// </summary>
|
|
||||||
FramersKit = 29459,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock Bozjan Field Notes. These are server-side but are cached client-side.
|
|
||||||
/// </summary>
|
|
||||||
FieldNotes = 19743,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock an Ornament (fashion accessory).
|
|
||||||
/// </summary>
|
|
||||||
Ornament = 20086,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to unlock glasses.
|
|
||||||
/// </summary>
|
|
||||||
Glasses = 37312,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used for Company Seal Vouchers, which convert the item into Company Seals when used.<br/>
|
|
||||||
/// Can be used only if in a Grand Company.<br/>
|
|
||||||
/// IsUnlocked always returns false.
|
|
||||||
/// </summary>
|
|
||||||
CompanySealVouchers = 41120,
|
|
||||||
}
|
|
||||||
97
Dalamud/Game/UnlockState/ItemActionType.cs
Normal file
97
Dalamud/Game/UnlockState/ItemActionType.cs
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
using Lumina.Excel.Sheets;
|
||||||
|
|
||||||
|
namespace Dalamud.Game.UnlockState;
|
||||||
|
|
||||||
|
// TODO: Switch to FFXIVClientStructs.FFXIV.Client.Enums.ItemActionType.
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum for <see cref="ItemAction.Type"/>.
|
||||||
|
/// </summary>
|
||||||
|
internal enum ItemActionType : ushort
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No item action.
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks a companion (minion).
|
||||||
|
/// </summary>
|
||||||
|
Companion = 853,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks a chocobo companion barding.
|
||||||
|
/// </summary>
|
||||||
|
BuddyEquip = 1013,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks a mount.
|
||||||
|
/// </summary>
|
||||||
|
Mount = 1322,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks recipes from a crafting recipe book.
|
||||||
|
/// </summary>
|
||||||
|
SecretRecipeBook = 2136,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks various types of content (e.g. Riding Maps, Blue Mage Totems, Emotes, Hairstyles).
|
||||||
|
/// </summary>
|
||||||
|
UnlockLink = 2633,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks a Triple Triad Card.
|
||||||
|
/// </summary>
|
||||||
|
TripleTriadCard = 3357,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks gathering nodes of a Folklore Tome.
|
||||||
|
/// </summary>
|
||||||
|
FolkloreTome = 4107,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks an Orchestrion Roll.
|
||||||
|
/// </summary>
|
||||||
|
OrchestrionRoll = 25183,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks portrait designs.
|
||||||
|
/// </summary>
|
||||||
|
FramersKit = 29459,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks Bozjan Field Notes.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks> These are server-side but are cached client-side. </remarks>
|
||||||
|
FieldNotes = 19743,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks an Ornament (fashion accessory).
|
||||||
|
/// </summary>
|
||||||
|
Ornament = 20086,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks Glasses.
|
||||||
|
/// </summary>
|
||||||
|
Glasses = 37312,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Company Seal Vouchers, which convert the item into Company Seals when used.
|
||||||
|
/// </summary>
|
||||||
|
CompanySealVouchers = 41120,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks Occult Records in Occult Crescent.
|
||||||
|
/// </summary>
|
||||||
|
OccultRecords = 43141,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unlocks Phantom Jobs in Occult Crescent.
|
||||||
|
/// </summary>
|
||||||
|
SoulShards = 43142,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Star Contributor Certificate, which grants the Star Contributor status in Cosmic Exploration.
|
||||||
|
/// </summary>
|
||||||
|
StarContributorCertificate = 45189,
|
||||||
|
}
|
||||||
|
|
@ -263,6 +263,7 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
||||||
return PlayerState.Instance()->IsSecretRecipeBookUnlocked(row.ItemAction.Value.Data[0]);
|
return PlayerState.Instance()->IsSecretRecipeBookUnlocked(row.ItemAction.Value.Data[0]);
|
||||||
|
|
||||||
case ItemActionType.UnlockLink:
|
case ItemActionType.UnlockLink:
|
||||||
|
case ItemActionType.OccultRecords:
|
||||||
return UIState.Instance()->IsUnlockLinkUnlocked(row.ItemAction.Value.Data[0]);
|
return UIState.Instance()->IsUnlockLinkUnlocked(row.ItemAction.Value.Data[0]);
|
||||||
|
|
||||||
case ItemActionType.TripleTriadCard when row.AdditionalData.Is<TripleTriadCard>():
|
case ItemActionType.TripleTriadCard when row.AdditionalData.Is<TripleTriadCard>():
|
||||||
|
|
@ -387,18 +388,19 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
||||||
if (row.ItemAction.RowId == 0)
|
if (row.ItemAction.RowId == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return (ItemActionType)row.ItemAction.Value.Type is
|
return (ItemActionType)row.ItemAction.Value.Type
|
||||||
ItemActionType.Companion or
|
is ItemActionType.Companion
|
||||||
ItemActionType.BuddyEquip or
|
or ItemActionType.BuddyEquip
|
||||||
ItemActionType.Mount or
|
or ItemActionType.Mount
|
||||||
ItemActionType.SecretRecipeBook or
|
or ItemActionType.SecretRecipeBook
|
||||||
ItemActionType.UnlockLink or
|
or ItemActionType.UnlockLink
|
||||||
ItemActionType.TripleTriadCard or
|
or ItemActionType.TripleTriadCard
|
||||||
ItemActionType.FolkloreTome or
|
or ItemActionType.FolkloreTome
|
||||||
ItemActionType.OrchestrionRoll or
|
or ItemActionType.OrchestrionRoll
|
||||||
ItemActionType.FramersKit or
|
or ItemActionType.FramersKit
|
||||||
ItemActionType.Ornament or
|
or ItemActionType.Ornament
|
||||||
ItemActionType.Glasses;
|
or ItemActionType.Glasses
|
||||||
|
or ItemActionType.OccultRecords;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue