mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
FateTable update for ClientStructs
This commit is contained in:
parent
95eaca1ee8
commit
9f6c8cb9cf
2 changed files with 5 additions and 9 deletions
|
|
@ -131,6 +131,6 @@ namespace Dalamud.Game.ClientState.Fates
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the territory this <see cref="Fate"/> is located in.
|
/// Gets the territory this <see cref="Fate"/> is located in.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ExcelResolver<Lumina.Excel.GeneratedSheets.TerritoryType> TerritoryType => new(this.Struct->TerritoryID);
|
public ExcelResolver<Lumina.Excel.GeneratedSheets.TerritoryType> TerritoryType => new(this.Struct->TerritoryId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,16 +45,13 @@ namespace Dalamud.Game.ClientState.Fates
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Sonar used this to check if the table was safe to read
|
// Sonar used this to check if the table was safe to read
|
||||||
var check = Struct->Unk80.ToInt64();
|
if (Struct->FateDirector == null)
|
||||||
if (check == 0)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
var start = Struct->FirstFatePtr.ToInt64();
|
if (Struct->Fates.First == null || Struct->Fates.Last == null)
|
||||||
var end = Struct->LastFatePtr.ToInt64();
|
|
||||||
if (start == 0 || end == 0)
|
|
||||||
return 0;
|
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)
|
if (fateTable == IntPtr.Zero)
|
||||||
return IntPtr.Zero;
|
return IntPtr.Zero;
|
||||||
|
|
||||||
var firstFate = this.Struct->FirstFatePtr;
|
return *(IntPtr*)this.Struct->Fates.Get((ulong)index).Value;
|
||||||
return *(IntPtr*)(firstFate + (8 * index));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue