From 2dabab812db61cb0aefa6ce4787cc8b88d503e69 Mon Sep 17 00:00:00 2001 From: goaaats Date: Fri, 17 Jun 2022 15:46:47 +0200 Subject: [PATCH] feat: correct IsPvP check, add IsPvPExcludingDen bool --- Dalamud/Game/ClientState/ClientState.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs index 952c36abe..ce816c994 100644 --- a/Dalamud/Game/ClientState/ClientState.cs +++ b/Dalamud/Game/ClientState/ClientState.cs @@ -100,12 +100,12 @@ namespace Dalamud.Game.ClientState /// /// Event that fires when a character is entering PvP. /// - public event System.Action EnterPvP; + public event Action EnterPvP; /// /// Event that fires when a character is leaving PvP. /// - public event System.Action LeavePvP; + public event Action LeavePvP; /// /// Event that gets fired when a duty is ready. @@ -142,6 +142,11 @@ namespace Dalamud.Game.ClientState /// public bool IsPvP { get; private set; } + /// + /// Gets a value indicating whether or not the user is playing PvP, excluding the Wolves' Den. + /// + public bool IsPvPExcludingDen { get; private set; } + /// /// Enable this module. /// @@ -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) {