mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-15 21:24:18 +01:00
Fix some cases of Glamourer not respecting the Apply Fixed Designs setting.
This commit is contained in:
parent
131844e54f
commit
f21d430811
2 changed files with 13 additions and 6 deletions
|
|
@ -6,6 +6,7 @@ using Dalamud.Game.ClientState.Objects.Types;
|
||||||
using Dalamud.Logging;
|
using Dalamud.Logging;
|
||||||
using Glamourer.FileSystem;
|
using Glamourer.FileSystem;
|
||||||
using Penumbra.GameData.Enums;
|
using Penumbra.GameData.Enums;
|
||||||
|
using Penumbra.PlayerWatch;
|
||||||
|
|
||||||
namespace Glamourer.Designs
|
namespace Glamourer.Designs
|
||||||
{
|
{
|
||||||
|
|
@ -57,9 +58,15 @@ namespace Glamourer.Designs
|
||||||
}
|
}
|
||||||
|
|
||||||
design.Enabled = true;
|
design.Enabled = true;
|
||||||
if (Dalamud.Objects.FirstOrDefault(o => o.ObjectKind == ObjectKind.Player && o.Name.ToString() == design.Name)
|
if (Glamourer.Config.ApplyFixedDesigns)
|
||||||
is Character character)
|
{
|
||||||
OnPlayerChange(character);
|
var character =
|
||||||
|
CharacterFactory.Convert(Dalamud.Objects.FirstOrDefault(o
|
||||||
|
=> o.ObjectKind == ObjectKind.Player && o.Name.ToString() == design.Name));
|
||||||
|
if (character != null)
|
||||||
|
OnPlayerChange(character);
|
||||||
|
}
|
||||||
|
|
||||||
return changes;
|
return changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,10 @@ namespace Glamourer
|
||||||
Designs = new DesignManager();
|
Designs = new DesignManager();
|
||||||
Penumbra = new PenumbraAttach(Config.AttachToPenumbra);
|
Penumbra = new PenumbraAttach(Config.AttachToPenumbra);
|
||||||
PlayerWatcher = PlayerWatchFactory.Create(Dalamud.Framework, Dalamud.ClientState, Dalamud.Objects);
|
PlayerWatcher = PlayerWatchFactory.Create(Dalamud.Framework, Dalamud.ClientState, Dalamud.Objects);
|
||||||
FixedDesigns = new FixedDesigns(Designs);
|
if (!Config.ApplyFixedDesigns)
|
||||||
|
PlayerWatcher.Disable();
|
||||||
|
|
||||||
if (Config.ApplyFixedDesigns)
|
FixedDesigns = new FixedDesigns(Designs);
|
||||||
PlayerWatcher.Enable();
|
|
||||||
|
|
||||||
Dalamud.Commands.AddHandler("/glamourer", new CommandInfo(OnGlamourer)
|
Dalamud.Commands.AddHandler("/glamourer", new CommandInfo(OnGlamourer)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue