fix gpose world stuff

This commit is contained in:
Stanley Dimant
2025-04-10 20:17:58 +02:00
committed by Loporrit
parent 27bbe96618
commit 4acf78b0df
3 changed files with 45 additions and 26 deletions

View File

@@ -152,7 +152,17 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
get => TargetSystem.Instance()->GPoseTarget;
set => TargetSystem.Instance()->GPoseTarget = value;
}
public unsafe Dalamud.Game.ClientState.Objects.Types.IGameObject? GposeTargetGameObject => GposeTarget == null ? null : _objectTable[GposeTarget->ObjectIndex];
private unsafe bool HasGposeTarget => GposeTarget != null;
private unsafe int GPoseTargetIdx => !HasGposeTarget ? -1 : GposeTarget->ObjectIndex;
public async Task<IGameObject?> GetGposeTargetGameObjectAsync()
{
if (!HasGposeTarget)
return null;
return await _framework.RunOnFrameworkThread(() => _objectTable[GPoseTargetIdx]).ConfigureAwait(true);
}
public bool IsAnythingDrawing { get; private set; } = false;
public bool IsInCutscene { get; private set; } = false;
public bool IsInGpose { get; private set; } = false;