Skip to content

Commit

Permalink
hide the local hunts window while in cutscenes
Browse files Browse the repository at this point in the history
  • Loading branch information
PrincessRTFM committed Jul 29, 2024
1 parent 1488670 commit 81ba566
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions HuntBuddy/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,10 @@ public static ITextureProvider TextureProvider {
get;
set;
} = null!;

[PluginService]
public static ICondition Condition {
get;
set;
} = null!;
}
2 changes: 2 additions & 0 deletions HuntBuddy/Windows/LocalHuntsWindow.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Linq;
using System.Numerics;

using Dalamud.Game.ClientState.Conditions;
using Dalamud.Interface;
using Dalamud.Interface.Windowing;

Expand Down Expand Up @@ -47,6 +48,7 @@ public override void PreOpenCheck() {
}

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;
Expand Down

0 comments on commit 81ba566

Please sign in to comment.