diff --git a/Dalamud/Game/ClientState/Fates/Fate.cs b/Dalamud/Game/ClientState/Fates/Fate.cs index 5f9a4cb95..c6327ed64 100644 --- a/Dalamud/Game/ClientState/Fates/Fate.cs +++ b/Dalamud/Game/ClientState/Fates/Fate.cs @@ -131,6 +131,6 @@ namespace Dalamud.Game.ClientState.Fates /// /// Gets the territory this is located in. /// - public ExcelResolver TerritoryType => new(this.Struct->TerritoryID); + public ExcelResolver TerritoryType => new(this.Struct->TerritoryId); } } diff --git a/Dalamud/Game/ClientState/Fates/FateTable.cs b/Dalamud/Game/ClientState/Fates/FateTable.cs index ff0361db9..82e7865ec 100644 --- a/Dalamud/Game/ClientState/Fates/FateTable.cs +++ b/Dalamud/Game/ClientState/Fates/FateTable.cs @@ -45,16 +45,13 @@ namespace Dalamud.Game.ClientState.Fates return 0; // Sonar used this to check if the table was safe to read - var check = Struct->Unk80.ToInt64(); - if (check == 0) + if (Struct->FateDirector == null) return 0; - var start = Struct->FirstFatePtr.ToInt64(); - var end = Struct->LastFatePtr.ToInt64(); - if (start == 0 || end == 0) + if (Struct->Fates.First == null || Struct->Fates.Last == null) return 0; - return (int)((end - start) / 8); + return (int)Struct->Fates.Capacity(); } } @@ -102,8 +99,7 @@ namespace Dalamud.Game.ClientState.Fates if (fateTable == IntPtr.Zero) return IntPtr.Zero; - var firstFate = this.Struct->FirstFatePtr; - return *(IntPtr*)(firstFate + (8 * index)); + return *(IntPtr*)this.Struct->Fates.Get((ulong)index).Value; } ///