Kaynağa Gözat

hide the local hunts window while in cutscenes

Lilith Song 1 yıl önce
ebeveyn
işleme
81ba566d65
2 değiştirilmiş dosya ile 8 ekleme ve 0 silme
  1. 6 0
      HuntBuddy/Service.cs
  2. 2 0
      HuntBuddy/Windows/LocalHuntsWindow.cs

+ 6 - 0
HuntBuddy/Service.cs

@@ -65,4 +65,10 @@ public class Service {
 		get;
 		set;
 	} = null!;
+
+	[PluginService]
+	public static ICondition Condition {
+		get;
+		set;
+	} = null!;
 }

+ 2 - 0
HuntBuddy/Windows/LocalHuntsWindow.cs

@@ -1,6 +1,7 @@
 using System.Linq;
 using System.Numerics;
 
+using Dalamud.Game.ClientState.Conditions;
 using Dalamud.Interface;
 using Dalamud.Interface.Windowing;
 
@@ -47,6 +48,7 @@ public class LocalHuntsWindow: Window {
 	}
 
 	public override unsafe bool DrawConditions() => Plugin.Instance.Configuration.ShowLocalHunts
+		&& !Service.Condition.Any(ConditionFlag.WatchingCutscene, ConditionFlag.OccupiedInCutSceneEvent)
 		&& !Plugin.Instance.CurrentAreaMobHuntEntries.IsEmpty
 		&& Plugin.Instance.CurrentAreaMobHuntEntries
 			.Count(x => Plugin.Instance.MobHuntStruct->CurrentKills[x.CurrentKillsOffset] == x.NeededKills) != Plugin.Instance.CurrentAreaMobHuntEntries.Count;