mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
fix: don't refer to CS assembly by name
This commit is contained in:
parent
422463f9cf
commit
f39abd9dd2
1 changed files with 3 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ public unsafe partial class AddonTree
|
||||||
{
|
{
|
||||||
private static readonly Dictionary<string, Type?> AddonTypeDict = [];
|
private static readonly Dictionary<string, Type?> AddonTypeDict = [];
|
||||||
|
|
||||||
private static readonly Assembly? ClientStructs = AppDomain.CurrentDomain.GetAssemblies().SingleOrDefault(static a => a.GetName().Name == "FFXIVClientStructs");
|
private static readonly Assembly? ClientStructsAssembly = typeof(Addon).Assembly;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a collection of names for field offsets that have been documented in FFXIVClientStructs.
|
/// Gets or sets a collection of names for field offsets that have been documented in FFXIVClientStructs.
|
||||||
|
|
@ -30,11 +30,11 @@ public unsafe partial class AddonTree
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AddonTypeDict.TryAdd(this.AddonName, null) && ClientStructs != null)
|
if (AddonTypeDict.TryAdd(this.AddonName, null) && ClientStructsAssembly != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach (var t in from t in ClientStructs.GetTypes()
|
foreach (var t in from t in ClientStructsAssembly.GetTypes()
|
||||||
where t.IsPublic
|
where t.IsPublic
|
||||||
let xivAddonAttr = (Addon?)t.GetCustomAttribute(typeof(Addon), false)
|
let xivAddonAttr = (Addon?)t.GetCustomAttribute(typeof(Addon), false)
|
||||||
where xivAddonAttr != null
|
where xivAddonAttr != null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue