Fixed many warnings, moved some classes to their own files.

This commit is contained in:
cake
2025-11-15 04:46:07 +01:00
parent e4a28c70eb
commit b56813c1de
20 changed files with 622 additions and 614 deletions

View File

@@ -140,14 +140,14 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
public bool IsWine { get; init; }
public unsafe GameObject* GposeTarget
public static unsafe GameObject* GposeTarget
{
get => TargetSystem.Instance()->GPoseTarget;
set => TargetSystem.Instance()->GPoseTarget = value;
}
private unsafe bool HasGposeTarget => GposeTarget != null;
private unsafe int GPoseTargetIdx => !HasGposeTarget ? -1 : GposeTarget->ObjectIndex;
private static unsafe bool HasGposeTarget => GposeTarget != null;
private static unsafe int GPoseTargetIdx => !HasGposeTarget ? -1 : GposeTarget->ObjectIndex;
public async Task<IGameObject?> GetGposeTargetGameObjectAsync()
{
@@ -513,15 +513,11 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
{
logger.LogTrace("[{redrawId}] Waiting for {handler} to finish drawing", redrawId, handler);
curWaitTime += tick;
await Task.Delay(tick).ConfigureAwait(true);
await Task.Delay(tick, ct.Value).ConfigureAwait(true);
}
logger.LogTrace("[{redrawId}] Finished drawing after {curWaitTime}ms", redrawId, curWaitTime);
}
catch (NullReferenceException ex)
{
logger.LogWarning(ex, "Error accessing {handler}, object does not exist anymore?", handler);
}
catch (AccessViolationException ex)
{
logger.LogWarning(ex, "Error accessing {handler}, object does not exist anymore?", handler);