using Dalamud.Data;
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using Lumina.Excel;
namespace Dalamud.Game.ClientState.Aetherytes;
///
/// Interface representing an aetheryte entry available to the game.
///
public interface IAetheryteEntry
{
///
/// Gets the Aetheryte ID.
///
uint AetheryteId { get; }
///
/// Gets the Territory ID.
///
uint TerritoryId { get; }
///
/// Gets the SubIndex used when there can be multiple Aetherytes with the same ID (Private/Shared Estates etc.).
///
byte SubIndex { get; }
///
/// Gets the Ward. Zero if not a Shared Estate.
///
byte Ward { get; }
///
/// Gets the Plot. Zero if not a Shared Estate.
///
byte Plot { get; }
///
/// Gets the Cost in Gil to Teleport to this location.
///
uint GilCost { get; }
///
/// Gets a value indicating whether the LocalPlayer has set this Aetheryte as Favorite or not.
///
bool IsFavourite { get; }
///
/// Gets a value indicating whether this Aetheryte is a Shared Estate or not.
///
bool IsSharedHouse { get; }
///
/// Gets a value indicating whether this Aetheryte is an Apartment or not.
///
bool IsApartment { get; }
///
/// Gets the Aetheryte data related to this aetheryte.
///
RowRef AetheryteData { get; }
}
///
/// Class representing an aetheryte entry available to the game.
///
internal sealed class AetheryteEntry : IAetheryteEntry
{
private readonly TeleportInfo data;
///
/// Initializes a new instance of the class.
///
/// Data read from the Aetheryte List.
internal AetheryteEntry(TeleportInfo data)
{
this.data = data;
}
///
public uint AetheryteId => this.data.AetheryteId;
///
public uint TerritoryId => this.data.TerritoryId;
///
public byte SubIndex => this.data.SubIndex;
///
public byte Ward => this.data.Ward;
///
public byte Plot => this.data.Plot;
///
public uint GilCost => this.data.GilCost;
///
public bool IsFavourite => this.data.IsFavourite;
///
public bool IsSharedHouse => this.data.IsSharedHouse;
///
public bool IsApartment => this.data.IsApartment;
///
public RowRef AetheryteData => LuminaUtils.CreateRef(this.AetheryteId);
}