Implemented rest of profile methods for IPC
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
using CustomizePlus.Core.Services;
|
||||
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;
|
||||
@@ -7,12 +10,16 @@ using System;
|
||||
|
||||
namespace CustomizePlus.Api;
|
||||
|
||||
public partial class CustomizePlusIpc
|
||||
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 ProfileChanged _profileChangedEvent;
|
||||
private readonly ArmatureChanged _armatureChangedEvent;
|
||||
|
||||
/// <summary>
|
||||
/// Shows if IPC failed to initialize or any other unrecoverable fatal error occured.
|
||||
@@ -23,13 +30,30 @@ public partial class CustomizePlusIpc
|
||||
DalamudPluginInterface pluginInterface,
|
||||
Logger logger,
|
||||
HookingService hookingService,
|
||||
ProfileManager profileManager)
|
||||
ProfileManager profileManager,
|
||||
GameObjectService gameObjectService,
|
||||
ArmatureChanged armatureChangedEvent,
|
||||
ProfileChanged profileChangedEvent)
|
||||
{
|
||||
_pluginInterface = pluginInterface;
|
||||
_logger = logger;
|
||||
_hookingService = hookingService;
|
||||
_profileManager = profileManager;
|
||||
_gameObjectService = gameObjectService;
|
||||
|
||||
|
||||
_profileChangedEvent = profileChangedEvent;
|
||||
_armatureChangedEvent = armatureChangedEvent;
|
||||
|
||||
EzIPC.Init(this, "CustomizePlus");
|
||||
|
||||
_profileChangedEvent.Subscribe(OnProfileChange, ProfileChanged.Priority.CustomizePlusIpc);
|
||||
_armatureChangedEvent.Subscribe(OnArmatureChanged, ArmatureChanged.Priority.CustomizePlusIpc);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_profileChangedEvent.Unsubscribe(OnProfileChange);
|
||||
_armatureChangedEvent.Unsubscribe(OnArmatureChanged);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user