mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
feat: show client structs hash in Game submenu
This commit is contained in:
parent
9588e12619
commit
6a977fb59e
4 changed files with 33 additions and 3 deletions
|
|
@ -22,7 +22,8 @@ namespace Dalamud.Utility
|
|||
/// </summary>
|
||||
public static class Util
|
||||
{
|
||||
private static string gitHashInternal;
|
||||
private static string? gitHashInternal;
|
||||
private static string? gitHashClientStructsInternal;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an httpclient for usage.
|
||||
|
|
@ -48,11 +49,29 @@ namespace Dalamud.Utility
|
|||
var asm = typeof(Util).Assembly;
|
||||
var attrs = asm.GetCustomAttributes<AssemblyMetadataAttribute>();
|
||||
|
||||
gitHashInternal = attrs.FirstOrDefault(a => a.Key == "GitHash")?.Value;
|
||||
gitHashInternal = attrs.First(a => a.Key == "GitHash").Value;
|
||||
|
||||
return gitHashInternal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the git hash value from the assembly
|
||||
/// or null if it cannot be found.
|
||||
/// </summary>
|
||||
/// <returns>The git hash of the assembly.</returns>
|
||||
public static string GetGitHashClientStructs()
|
||||
{
|
||||
if (gitHashClientStructsInternal != null)
|
||||
return gitHashClientStructsInternal;
|
||||
|
||||
var asm = typeof(Util).Assembly;
|
||||
var attrs = asm.GetCustomAttributes<AssemblyMetadataAttribute>();
|
||||
|
||||
gitHashClientStructsInternal = attrs.First(a => a.Key == "GitHashClientStructs").Value;
|
||||
|
||||
return gitHashClientStructsInternal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read memory from an offset and hexdump them via Serilog.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue