Prechádzať zdrojové kódy

hide the local hunts window while in cutscenes

Lilith Song 1 rok pred
rodič
commit
81ba566d65

+ 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;