mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 04:34:16 +01:00
[v9] Move GPose check to ClientState (#1378)
This commit is contained in:
parent
fb3d4b5b4c
commit
2c23e6fdb3
3 changed files with 11 additions and 15 deletions
|
|
@ -102,6 +102,9 @@ public sealed class ClientState : IDisposable, IServiceType, IClientState
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public bool IsPvPExcludingDen { get; private set; }
|
public bool IsPvPExcludingDen { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public bool IsGPosing => GameMain.IsInGPose();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets client state address resolver.
|
/// Gets client state address resolver.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
using Dalamud.Configuration.Internal;
|
using Dalamud.Configuration.Internal;
|
||||||
using Dalamud.Game;
|
using Dalamud.Game;
|
||||||
|
using Dalamud.Game.ClientState;
|
||||||
using Dalamud.Game.ClientState.Conditions;
|
using Dalamud.Game.ClientState.Conditions;
|
||||||
using Dalamud.Game.Gui;
|
using Dalamud.Game.Gui;
|
||||||
using Dalamud.Interface.GameFonts;
|
using Dalamud.Interface.GameFonts;
|
||||||
|
|
@ -179,20 +180,6 @@ public sealed class UiBuilder : IDisposable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether or not gpose is active.
|
|
||||||
/// </summary>
|
|
||||||
public bool GposeActive
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var condition = Service<Condition>.GetNullable();
|
|
||||||
if (condition == null)
|
|
||||||
return false;
|
|
||||||
return condition[ConditionFlag.WatchingCutscene];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether this plugin should modify the game's interface at this time.
|
/// Gets a value indicating whether this plugin should modify the game's interface at this time.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -448,6 +435,7 @@ public sealed class UiBuilder : IDisposable
|
||||||
{
|
{
|
||||||
this.hitchDetector.Start();
|
this.hitchDetector.Start();
|
||||||
|
|
||||||
|
var clientState = Service<ClientState>.Get();
|
||||||
var configuration = Service<DalamudConfiguration>.Get();
|
var configuration = Service<DalamudConfiguration>.Get();
|
||||||
var gameGui = Service<GameGui>.GetNullable();
|
var gameGui = Service<GameGui>.GetNullable();
|
||||||
if (gameGui == null)
|
if (gameGui == null)
|
||||||
|
|
@ -457,7 +445,7 @@ public sealed class UiBuilder : IDisposable
|
||||||
!(this.DisableUserUiHide || this.DisableAutomaticUiHide)) ||
|
!(this.DisableUserUiHide || this.DisableAutomaticUiHide)) ||
|
||||||
(this.CutsceneActive && configuration.ToggleUiHideDuringCutscenes &&
|
(this.CutsceneActive && configuration.ToggleUiHideDuringCutscenes &&
|
||||||
!(this.DisableCutsceneUiHide || this.DisableAutomaticUiHide)) ||
|
!(this.DisableCutsceneUiHide || this.DisableAutomaticUiHide)) ||
|
||||||
(this.GposeActive && configuration.ToggleUiHideDuringGpose &&
|
(clientState.IsGPosing && configuration.ToggleUiHideDuringGpose &&
|
||||||
!(this.DisableGposeUiHide || this.DisableAutomaticUiHide)))
|
!(this.DisableGposeUiHide || this.DisableAutomaticUiHide)))
|
||||||
{
|
{
|
||||||
if (!this.lastFrameUiHideState)
|
if (!this.lastFrameUiHideState)
|
||||||
|
|
|
||||||
|
|
@ -73,4 +73,9 @@ public interface IClientState
|
||||||
/// Gets a value indicating whether or not the user is playing PvP, excluding the Wolves' Den.
|
/// Gets a value indicating whether or not the user is playing PvP, excluding the Wolves' Den.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsPvPExcludingDen { get; }
|
public bool IsPvPExcludingDen { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether the client is currently in Group Pose (GPose) mode.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsGPosing { get; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue