chore: remove all MonoMod hooks for now

This commit is contained in:
goat 2023-11-14 20:28:36 +01:00
parent 8a2ba70cc3
commit f8bd6d20ef
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
4 changed files with 22 additions and 19 deletions

View file

@ -136,7 +136,8 @@ internal partial class PluginManager : IDisposable, IServiceType
this.configuration.PluginTestingOptIns ??= new List<PluginTestingOptIn>();
this.ApplyPatches();
// NET8 CHORE
//this.ApplyPatches();
}
/// <summary>
@ -393,8 +394,9 @@ internal partial class PluginManager : IDisposable, IServiceType
plugin.ExplicitDisposeIgnoreExceptions($"Error disposing {plugin.Name}", Log);
}
this.assemblyLocationMonoHook?.Dispose();
this.assemblyCodeBaseMonoHook?.Dispose();
// NET8 CHORE
// this.assemblyLocationMonoHook?.Dispose();
// this.assemblyCodeBaseMonoHook?.Dispose();
}
/// <summary>
@ -804,7 +806,8 @@ internal partial class PluginManager : IDisposable, IServiceType
this.installedPluginsList.Remove(plugin);
}
PluginLocations.Remove(plugin.AssemblyName?.FullName ?? string.Empty, out _);
// NET8 CHORE
// PluginLocations.Remove(plugin.AssemblyName?.FullName ?? string.Empty, out _);
this.NotifyinstalledPluginsListChanged();
this.NotifyAvailablePluginsChanged();
@ -1443,7 +1446,8 @@ internal partial class PluginManager : IDisposable, IServiceType
}
catch (InvalidPluginException)
{
PluginLocations.Remove(plugin.AssemblyName?.FullName ?? string.Empty, out _);
// NET8 CHORE
// PluginLocations.Remove(plugin.AssemblyName?.FullName ?? string.Empty, out _);
throw;
}
catch (BannedPluginException)
@ -1489,7 +1493,8 @@ internal partial class PluginManager : IDisposable, IServiceType
}
else
{
PluginLocations.Remove(plugin.AssemblyName?.FullName ?? string.Empty, out _);
// NET8 CHORE
// PluginLocations.Remove(plugin.AssemblyName?.FullName ?? string.Empty, out _);
throw;
}
}
@ -1580,6 +1585,8 @@ internal partial class PluginManager : IDisposable, IServiceType
}
}
// NET8 CHORE
/*
/// <summary>
/// Class responsible for loading and unloading plugins.
/// This contains the assembly patching functionality to resolve assembly locations.
@ -1687,3 +1694,4 @@ internal partial class PluginManager
this.assemblyCodeBaseMonoHook = new MonoMod.RuntimeDetour.Hook(codebaseTarget, codebasePatch);
}
}
*/

View file

@ -408,7 +408,8 @@ internal class LocalPlugin : IDisposable
}
// Update the location for the Location and CodeBase patches
PluginManager.PluginLocations[this.pluginType.Assembly.FullName] = new PluginPatchData(this.DllFile);
// NET8 CHORE
// PluginManager.PluginLocations[this.pluginType.Assembly.FullName] = new PluginPatchData(this.DllFile);
this.DalamudInterface =
new DalamudPluginInterface(this, reason);