mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Fix FavoriteAetherytes
This commit is contained in:
parent
a55c8ca773
commit
bcf651b5c1
2 changed files with 7 additions and 4 deletions
|
|
@ -118,15 +118,18 @@ internal unsafe class PlayerState : IServiceType, IPlayerState
|
|||
public RowRef<Aetheryte> HomeAetheryte => this.IsLoaded ? LuminaUtils.CreateRef<Aetheryte>(CSPlayerState.Instance()->HomeAetheryteId) : default;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ReadOnlySpan<RowRef<Aetheryte>> FavouriteAetherytes
|
||||
public ReadOnlySpan<RowRef<Aetheryte>> FavoriteAetherytes
|
||||
{
|
||||
get
|
||||
{
|
||||
var playerState = CSPlayerState.Instance();
|
||||
if (playerState->IsLoaded || playerState->FavouriteAetheryteCount == 0)
|
||||
return [];
|
||||
if (!playerState->IsLoaded)
|
||||
return default;
|
||||
|
||||
var count = playerState->FavouriteAetheryteCount;
|
||||
if (count == 0)
|
||||
return default;
|
||||
|
||||
var array = new RowRef<Aetheryte>[count];
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ public interface IPlayerState
|
|||
/// <summary>
|
||||
/// Gets a span of Aetheryte rows for the local player's favourite aetherytes.
|
||||
/// </summary>
|
||||
ReadOnlySpan<RowRef<Aetheryte>> FavouriteAetherytes { get; }
|
||||
ReadOnlySpan<RowRef<Aetheryte>> FavoriteAetherytes { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Aetheryte row for the local player's free aetheryte.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue