ArmatureChanged.Type.Rebound -> Updated IsPendingProfileRebind is now being set instead of calling RebuildBoneTemplateBinding and that function is called as a part of rebind process (not always though, pending rewrite) Profiles can no longer be toggled in the UI while editor is active ProfileChanged is no longer used in IPC, instead we are fully relying on armature events Added warnings to legacy IPC messages to not use it
54 lines
1.6 KiB
C#
54 lines
1.6 KiB
C#
using CustomizePlus.Armatures.Events;
|
|
using CustomizePlus.Core.Services;
|
|
using CustomizePlus.Game.Services;
|
|
using CustomizePlus.Profiles;
|
|
using CustomizePlus.Profiles.Events;
|
|
using Dalamud.Plugin;
|
|
using ECommons.EzIpcManager;
|
|
using OtterGui.Log;
|
|
using System;
|
|
|
|
namespace CustomizePlus.Api;
|
|
|
|
public partial class CustomizePlusIpc : IDisposable
|
|
{
|
|
private readonly DalamudPluginInterface _pluginInterface;
|
|
private readonly Logger _logger;
|
|
private readonly HookingService _hookingService;
|
|
private readonly ProfileManager _profileManager;
|
|
private readonly GameObjectService _gameObjectService;
|
|
|
|
private readonly ArmatureChanged _armatureChangedEvent;
|
|
|
|
/// <summary>
|
|
/// Shows if IPC failed to initialize or any other unrecoverable fatal error occured.
|
|
/// </summary>
|
|
public bool IPCFailed { get; private set; }
|
|
|
|
public CustomizePlusIpc(
|
|
DalamudPluginInterface pluginInterface,
|
|
Logger logger,
|
|
HookingService hookingService,
|
|
ProfileManager profileManager,
|
|
GameObjectService gameObjectService,
|
|
ArmatureChanged armatureChangedEvent)
|
|
{
|
|
_pluginInterface = pluginInterface;
|
|
_logger = logger;
|
|
_hookingService = hookingService;
|
|
_profileManager = profileManager;
|
|
_gameObjectService = gameObjectService;
|
|
|
|
_armatureChangedEvent = armatureChangedEvent;
|
|
|
|
EzIPC.Init(this, "CustomizePlus");
|
|
|
|
_armatureChangedEvent.Subscribe(OnArmatureChanged, ArmatureChanged.Priority.CustomizePlusIpc);
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
_armatureChangedEvent.Unsubscribe(OnArmatureChanged);
|
|
}
|
|
}
|