preliminary api10 update

This commit is contained in:
Stanley Dimant 2024-07-17 00:35:28 +02:00
parent 8c56c91374
commit b9cf7eb6fa
34 changed files with 163 additions and 137 deletions

View file

@ -10,7 +10,7 @@ namespace MareSynchronos.Interop.Ipc;
public sealed class IpcCallerMoodles : IIpcCaller
{
private readonly ICallGateSubscriber<int> _moodlesApiVersion;
private readonly ICallGateSubscriber<PlayerCharacter, object> _moodlesOnChange;
private readonly ICallGateSubscriber<IPlayerCharacter, object> _moodlesOnChange;
private readonly ICallGateSubscriber<nint, string> _moodlesGetStatus;
private readonly ICallGateSubscriber<nint, string, object> _moodlesSetStatus;
private readonly ICallGateSubscriber<nint, object> _moodlesRevertStatus;
@ -18,7 +18,7 @@ public sealed class IpcCallerMoodles : IIpcCaller
private readonly DalamudUtilService _dalamudUtil;
private readonly MareMediator _mareMediator;
public IpcCallerMoodles(ILogger<IpcCallerMoodles> logger, DalamudPluginInterface pi, DalamudUtilService dalamudUtil,
public IpcCallerMoodles(ILogger<IpcCallerMoodles> logger, IDalamudPluginInterface pi, DalamudUtilService dalamudUtil,
MareMediator mareMediator)
{
_logger = logger;
@ -26,7 +26,7 @@ public sealed class IpcCallerMoodles : IIpcCaller
_mareMediator = mareMediator;
_moodlesApiVersion = pi.GetIpcSubscriber<int>("Moodles.Version");
_moodlesOnChange = pi.GetIpcSubscriber<PlayerCharacter, object>("Moodles.StatusManagerModified");
_moodlesOnChange = pi.GetIpcSubscriber<IPlayerCharacter, object>("Moodles.StatusManagerModified");
_moodlesGetStatus = pi.GetIpcSubscriber<nint, string>("Moodles.GetStatusManagerByPtr");
_moodlesSetStatus = pi.GetIpcSubscriber<nint, string, object>("Moodles.SetStatusManagerByPtr");
_moodlesRevertStatus = pi.GetIpcSubscriber<nint, object>("Moodles.ClearStatusManagerByPtr");
@ -36,7 +36,7 @@ public sealed class IpcCallerMoodles : IIpcCaller
CheckAPI();
}
private void OnMoodlesChange(PlayerCharacter character)
private void OnMoodlesChange(IPlayerCharacter character)
{
_mareMediator.Publish(new MoodlesMessage(character.Address));
}