mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +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 Glamourer.FileSystem;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.PlayerWatch;
|
||||
|
||||
namespace Glamourer.Designs
|
||||
{
|
||||
|
|
@ -57,9 +58,15 @@ namespace Glamourer.Designs
|
|||
}
|
||||
|
||||
design.Enabled = true;
|
||||
if (Dalamud.Objects.FirstOrDefault(o => o.ObjectKind == ObjectKind.Player && o.Name.ToString() == design.Name)
|
||||
is Character character)
|
||||
OnPlayerChange(character);
|
||||
if (Glamourer.Config.ApplyFixedDesigns)
|
||||
{
|
||||
var character =
|
||||
CharacterFactory.Convert(Dalamud.Objects.FirstOrDefault(o
|
||||
=> o.ObjectKind == ObjectKind.Player && o.Name.ToString() == design.Name));
|
||||
if (character != null)
|
||||
OnPlayerChange(character);
|
||||
}
|
||||
|
||||
return changes;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ namespace Glamourer
|
|||
Designs = new DesignManager();
|
||||
Penumbra = new PenumbraAttach(Config.AttachToPenumbra);
|
||||
PlayerWatcher = PlayerWatchFactory.Create(Dalamud.Framework, Dalamud.ClientState, Dalamud.Objects);
|
||||
FixedDesigns = new FixedDesigns(Designs);
|
||||
if (!Config.ApplyFixedDesigns)
|
||||
PlayerWatcher.Disable();
|
||||
|
||||
if (Config.ApplyFixedDesigns)
|
||||
PlayerWatcher.Enable();
|
||||
FixedDesigns = new FixedDesigns(Designs);
|
||||
|
||||
Dalamud.Commands.AddHandler("/glamourer", new CommandInfo(OnGlamourer)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue