fix: run HandleRemovedNodes inbetween devplugin reloads

This commit is contained in:
goat 2022-02-14 01:53:26 +01:00
parent 08b5739369
commit e62984d270
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5

View file

@ -5,6 +5,7 @@ using System.Reflection;
using Dalamud.Configuration.Internal;
using Dalamud.Game;
using Dalamud.Game.Gui.Dtr;
using Dalamud.IoC.Internal;
using Dalamud.Logging.Internal;
using Dalamud.Plugin.Internal.Exceptions;
@ -416,6 +417,11 @@ namespace Dalamud.Plugin.Internal
public void Reload()
{
this.Unload(true);
// We need to handle removed DTR nodes here, as otherwise, plugins will not be able to re-add their bar entries after updates.
var dtr = Service<DtrBar>.Get();
dtr.HandleRemovedNodes();
this.Load(PluginLoadReason.Reload, true);
}