mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-30 12:23:42 +01:00
Fix issues with Visor and Aesthetician
This commit is contained in:
parent
937e385cbc
commit
5417013bc3
3 changed files with 23 additions and 55 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
using Dalamud.Hooking;
|
||||
using Dalamud.Utility.Signatures;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
|
||||
|
|
@ -19,6 +20,9 @@ public unsafe class ChangeCustomizeService : EventWrapper<Action<Model, Ref<Cust
|
|||
{
|
||||
private readonly PenumbraReloaded _penumbraReloaded;
|
||||
|
||||
/// <summary> Check whether we in a manual customize update, in which case we need to not toggle certain flags. </summary>
|
||||
public static readonly ThreadLocal<bool> InUpdate = new(() => false);
|
||||
|
||||
public enum Priority
|
||||
{
|
||||
/// <seealso cref="State.StateListener.OnCustomizeChange"/>
|
||||
|
|
@ -62,9 +66,12 @@ public unsafe class ChangeCustomizeService : EventWrapper<Action<Model, Ref<Cust
|
|||
{
|
||||
if (!model.IsHuman)
|
||||
return false;
|
||||
|
||||
|
||||
Glamourer.Log.Verbose($"[ChangeCustomize] Invoked on 0x{model.Address:X} with {customize}.");
|
||||
return _changeCustomizeHook.Original(model.AsHuman, customize.Data, 1);
|
||||
InUpdate.Value = true;
|
||||
var ret = _changeCustomizeHook.Original(model.AsHuman, customize.Data, 1);
|
||||
InUpdate.Value = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool UpdateCustomize(Actor actor, CustomizeData customize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue