mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: correct IsPvP check, add IsPvPExcludingDen bool
This commit is contained in:
parent
dd686fe6a0
commit
2dabab812d
1 changed files with 9 additions and 3 deletions
|
|
@ -100,12 +100,12 @@ namespace Dalamud.Game.ClientState
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event that fires when a character is entering PvP.
|
/// Event that fires when a character is entering PvP.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event System.Action EnterPvP;
|
public event Action EnterPvP;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event that fires when a character is leaving PvP.
|
/// Event that fires when a character is leaving PvP.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event System.Action LeavePvP;
|
public event Action LeavePvP;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event that gets fired when a duty is ready.
|
/// Event that gets fired when a duty is ready.
|
||||||
|
|
@ -142,6 +142,11 @@ namespace Dalamud.Game.ClientState
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsPvP { get; private set; }
|
public bool IsPvP { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether or not the user is playing PvP, excluding the Wolves' Den.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsPvPExcludingDen { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enable this module.
|
/// Enable this module.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -203,7 +208,8 @@ namespace Dalamud.Game.ClientState
|
||||||
gameGui.ResetUiHideState();
|
gameGui.ResetUiHideState();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.IsPvP = GameMain.IsInPvPInstance();
|
this.IsPvP = GameMain.IsInPvPArea();
|
||||||
|
this.IsPvPExcludingDen = this.IsPvP && this.TerritoryType != 250;
|
||||||
|
|
||||||
if (this.IsPvP != this.lastFramePvP)
|
if (this.IsPvP != this.lastFramePvP)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue