Fixed editor's "limit to my creatures" setting not updating properly, fixed mirror mode not working on reset buttons

This commit is contained in:
RisaDev
2024-01-09 22:14:41 +03:00
parent 44607e10d7
commit b979751ca4
9 changed files with 83 additions and 30 deletions

View File

@@ -18,6 +18,7 @@ using CustomizePlus.Core.Extensions;
using CustomizePlus.GameData.Data;
using CustomizePlus.GameData.Services;
using CustomizePlus.GameData.Extensions;
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
namespace CustomizePlus.Armatures.Services;
@@ -345,6 +346,7 @@ public unsafe sealed class ArmatureManager : IDisposable
if (type is not TemplateChanged.Type.NewBone &&
type is not TemplateChanged.Type.DeletedBone &&
type is not TemplateChanged.Type.EditorCharacterChanged &&
type is not TemplateChanged.Type.EditorLimitLookupToOwnedChanged &&
type is not TemplateChanged.Type.EditorEnabled &&
type is not TemplateChanged.Type.EditorDisabled)
return;
@@ -390,6 +392,21 @@ public unsafe sealed class ArmatureManager : IDisposable
return;
}
if(type == TemplateChanged.Type.EditorLimitLookupToOwnedChanged)
{
var profile = (Profile)arg3!;
if (profile.Armatures.Count == 0)
return;
foreach (var armature in profile.Armatures)
armature.IsPendingProfileRebind = true;
_logger.Debug($"ArmatureManager.OnTemplateChange Editor profile limit lookup setting changed, armature rebind scheduled: {type}, profile: {profile.Name.Text.Incognify()}->{profile.Enabled}");
return;
}
if (type == TemplateChanged.Type.EditorEnabled ||
type == TemplateChanged.Type.EditorDisabled)
{