mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-15 05:04:16 +01:00
Update API 9 and add data to items.
This commit is contained in:
parent
c98ed04bf3
commit
cb0da11529
62 changed files with 524 additions and 268 deletions
|
|
@ -1,14 +1,14 @@
|
|||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Plugin.Services;
|
||||
using OtterGui.Classes;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
||||
namespace Glamourer.Events;
|
||||
|
||||
public class GPoseService : EventWrapper<Action<bool>, GPoseService.Priority>
|
||||
{
|
||||
private readonly Framework _framework;
|
||||
private readonly IFramework _framework;
|
||||
private readonly IClientState _state;
|
||||
|
||||
private readonly ConcurrentQueue<Action> _onLeave = new();
|
||||
private readonly ConcurrentQueue<Action> _onEnter = new();
|
||||
|
|
@ -19,13 +19,14 @@ public class GPoseService : EventWrapper<Action<bool>, GPoseService.Priority>
|
|||
GlamourerIpc = int.MinValue,
|
||||
}
|
||||
|
||||
public bool InGPose { get; private set; } = false;
|
||||
public bool InGPose { get; private set; }
|
||||
|
||||
public GPoseService(Framework framework)
|
||||
public GPoseService(IFramework framework, IClientState state)
|
||||
: base(nameof(GPoseService))
|
||||
{
|
||||
_framework = framework;
|
||||
InGPose = GameMain.IsInGPose();
|
||||
_state = state;
|
||||
InGPose = state.IsGPosing;
|
||||
_framework.Update += OnFramework;
|
||||
}
|
||||
|
||||
|
|
@ -51,9 +52,9 @@ public class GPoseService : EventWrapper<Action<bool>, GPoseService.Priority>
|
|||
_onEnter.Enqueue(onEnter);
|
||||
}
|
||||
|
||||
private void OnFramework(Framework _)
|
||||
private void OnFramework(IFramework _)
|
||||
{
|
||||
var inGPose = GameMain.IsInGPose();
|
||||
var inGPose = _state.IsGPosing;
|
||||
if (InGPose == inGPose)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue