Merge branch 'master' into imgui-bindings

This commit is contained in:
Kaz Wolfe 2025-07-03 19:02:35 -07:00
commit f63ee5cb76
No known key found for this signature in database
GPG key ID: 258813F53A16EBB4
27 changed files with 399 additions and 290 deletions

View file

@ -527,18 +527,15 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa
/// <param name="affectedThisPlugin">If this plugin was affected by the change.</param>
internal void NotifyActivePluginsChanged(PluginListInvalidationKind kind, bool affectedThisPlugin)
{
if (this.ActivePluginsChanged is { } callback)
foreach (var action in Delegate.EnumerateInvocationList(this.ActivePluginsChanged))
{
foreach (var action in callback.GetInvocationList().Cast<IDalamudPluginInterface.ActivePluginsChangedDelegate>())
try
{
try
{
action(kind, affectedThisPlugin);
}
catch (Exception ex)
{
Log.Error(ex, "Exception during raise of {handler}", action.Method);
}
action(kind, affectedThisPlugin);
}
catch (Exception ex)
{
Log.Error(ex, "Exception during raise of {handler}", action.Method);
}
}
}
@ -547,18 +544,15 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa
{
this.UiLanguage = langCode;
if (this.LanguageChanged is { } callback)
foreach (var action in Delegate.EnumerateInvocationList(this.LanguageChanged))
{
foreach (var action in callback.GetInvocationList().Cast<IDalamudPluginInterface.LanguageChangedDelegate>())
try
{
try
{
action(langCode);
}
catch (Exception ex)
{
Log.Error(ex, "Exception during raise of {handler}", action.Method);
}
action(langCode);
}
catch (Exception ex)
{
Log.Error(ex, "Exception during raise of {handler}", action.Method);
}
}
}