feat: correct IsPvP check, add IsPvPExcludingDen bool

This commit is contained in:
goaaats 2022-06-17 15:46:47 +02:00
parent dd686fe6a0
commit 2dabab812d
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -100,12 +100,12 @@ namespace Dalamud.Game.ClientState
/// <summary>
/// Event that fires when a character is entering PvP.
/// </summary>
public event System.Action EnterPvP;
public event Action EnterPvP;
/// <summary>
/// Event that fires when a character is leaving PvP.
/// </summary>
public event System.Action LeavePvP;
public event Action LeavePvP;
/// <summary>
/// Event that gets fired when a duty is ready.
@ -142,6 +142,11 @@ namespace Dalamud.Game.ClientState
/// </summary>
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>
/// Enable this module.
/// </summary>
@ -203,7 +208,8 @@ namespace Dalamud.Game.ClientState
gameGui.ResetUiHideState();
}
this.IsPvP = GameMain.IsInPvPInstance();
this.IsPvP = GameMain.IsInPvPArea();
this.IsPvPExcludingDen = this.IsPvP && this.TerritoryType != 250;
if (this.IsPvP != this.lastFramePvP)
{