Replace GetPlugin(Delegate) stub by actual implementation

This commit is contained in:
Exter-N 2025-11-13 19:55:32 +01:00
parent 5be021b0eb
commit e240a42a2c

View file

@ -100,7 +100,12 @@ public sealed class IntegrationSettingsRegistry : IService, IDisposable
}
private IExposedPlugin? GetPlugin(Delegate @delegate)
=> null; // TODO Use IDalamudPluginInterface.GetPlugin(Assembly) when it's in Dalamud stable.
=> @delegate.Method.DeclaringType
switch
{
null => null,
var type => _pluginInterface.GetPlugin(type.Assembly),
};
private int FindSectionIndex(string internalName)
=> _sections.FindIndex(section => section.InternalName.Equals(internalName, StringComparison.Ordinal));