From c74af9a6f25019bddc4a935e0e3c177094af167b Mon Sep 17 00:00:00 2001 From: goaaats Date: Mon, 16 May 2022 13:28:17 +0200 Subject: [PATCH] fix: use GameMain.IsInPvPInstance() to check for PvP instance event --- Dalamud/Game/ClientState/ClientState.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs index 44d81735b..952c36abe 100644 --- a/Dalamud/Game/ClientState/ClientState.cs +++ b/Dalamud/Game/ClientState/ClientState.cs @@ -17,7 +17,7 @@ using Dalamud.Hooking; using Dalamud.IoC; using Dalamud.IoC.Internal; using Dalamud.Utility; -using Lumina.Excel.GeneratedSheets; +using FFXIVClientStructs.FFXIV.Client.Game; using Serilog; namespace Dalamud.Game.ClientState @@ -203,11 +203,7 @@ namespace Dalamud.Game.ClientState gameGui.ResetUiHideState(); } - if (this.TerritoryType != 0) - { - var terriRow = data.GetExcelSheet()!.GetRow(this.TerritoryType); - this.IsPvP = terriRow?.Bg.RawString.StartsWith("ffxiv/pvp") ?? false; - } + this.IsPvP = GameMain.IsInPvPInstance(); if (this.IsPvP != this.lastFramePvP) {