mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: use GameMain.IsInPvPInstance() to check for PvP instance event
This commit is contained in:
parent
25e46f8d1c
commit
c74af9a6f2
1 changed files with 2 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ using Dalamud.Hooking;
|
||||||
using Dalamud.IoC;
|
using Dalamud.IoC;
|
||||||
using Dalamud.IoC.Internal;
|
using Dalamud.IoC.Internal;
|
||||||
using Dalamud.Utility;
|
using Dalamud.Utility;
|
||||||
using Lumina.Excel.GeneratedSheets;
|
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState
|
namespace Dalamud.Game.ClientState
|
||||||
|
|
@ -203,11 +203,7 @@ namespace Dalamud.Game.ClientState
|
||||||
gameGui.ResetUiHideState();
|
gameGui.ResetUiHideState();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.TerritoryType != 0)
|
this.IsPvP = GameMain.IsInPvPInstance();
|
||||||
{
|
|
||||||
var terriRow = data.GetExcelSheet<TerritoryType>()!.GetRow(this.TerritoryType);
|
|
||||||
this.IsPvP = terriRow?.Bg.RawString.StartsWith("ffxiv/pvp") ?? false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.IsPvP != this.lastFramePvP)
|
if (this.IsPvP != this.lastFramePvP)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue