diff --git a/BossMod/BossModule/BossModuleHintsWindow.cs b/BossMod/BossModule/BossModuleHintsWindow.cs index 25b66b7208..52d8f31b56 100644 --- a/BossMod/BossModule/BossModuleHintsWindow.cs +++ b/BossMod/BossModule/BossModuleHintsWindow.cs @@ -42,5 +42,5 @@ public override void Draw() } } - private bool ShowZoneModule() => _mgr.ActiveModule?.StateMachine.ActivePhase == null && (_zmm.ActiveModule?.WantToBeDrawn() ?? false); + private bool ShowZoneModule() => _mgr.ActiveModule?.StateMachine.ActivePhase == null && _zmm.ActiveModule is ZoneModule z && z.WantToBeDrawn() && !z.DrawSeparately; } diff --git a/BossMod/Framework/ActionManagerEx.cs b/BossMod/Framework/ActionManagerEx.cs index 2082cdf422..8d15f1f4da 100644 --- a/BossMod/Framework/ActionManagerEx.cs +++ b/BossMod/Framework/ActionManagerEx.cs @@ -1,6 +1,7 @@ using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.Game.Character; using FFXIVClientStructs.FFXIV.Client.Game.Control; +using FFXIVClientStructs.FFXIV.Client.Game.Event; using FFXIVClientStructs.FFXIV.Client.Game.InstanceContent; using FFXIVClientStructs.FFXIV.Client.Game.Object; using FFXIVClientStructs.FFXIV.Client.Game.UI; @@ -292,12 +293,31 @@ private bool ExecuteAction(ActionID action, ulong targetId, Vector3 targetPos) // TODO: consider calling UsePetAction instead?.. return _useActionHook.Original(_inst, CSActionType.PetAction, action.ID, targetId, 0, ActionManager.UseActionMode.None, 0, null); } + + // fake action types case ActionType.BozjaHolsterSlot0: case ActionType.BozjaHolsterSlot1: - // fake action type - using action from bozja holster var state = PublicContentBozja.GetState(); // note: if it's non-null, the director instance can't be null too var holsterIndex = state != null ? state->HolsterActions.IndexOf((byte)action.ID) : -1; return holsterIndex >= 0 && PublicContentBozja.GetInstance()->UseFromHolster((uint)holsterIndex, action.Type == ActionType.BozjaHolsterSlot1 ? 1u : 0); + case ActionType.Pomander: + var dd = EventFramework.Instance()->GetInstanceContentDeepDungeon(); + var slot = _ws.DeepDungeon.GetPomanderSlot((PomanderID)action.ID); + if (dd != null && slot >= 0) + { + dd->UsePomander((uint)slot); + return true; + } + return false; + case ActionType.Magicite: + dd = EventFramework.Instance()->GetInstanceContentDeepDungeon(); + if (dd != null) + { + dd->UseStone(action.ID); + return true; + } + return false; + default: // fall back to UAL hook for everything not covered explicitly return _inst->UseActionLocation((CSActionType)action.Type, action.ID, targetId, &targetPos, 0); diff --git a/BossMod/Framework/Plugin.cs b/BossMod/Framework/Plugin.cs index a722cf09ce..e8c1e13bb7 100644 --- a/BossMod/Framework/Plugin.cs +++ b/BossMod/Framework/Plugin.cs @@ -36,6 +36,7 @@ public sealed class Plugin : IDalamudPlugin private readonly ConfigUI _configUI; // TODO: should be a proper window! private readonly BossModuleMainWindow _wndBossmod; private readonly BossModuleHintsWindow _wndBossmodHints; + private readonly ZoneModuleWindow _wndZone; private readonly ReplayManagementWindow _wndReplay; private readonly UIRotationWindow _wndRotation; private readonly AI.AIWindow _wndAI; @@ -91,6 +92,7 @@ public unsafe Plugin(IDalamudPluginInterface dalamud, ICommandManager commandMan _configUI = new(Service.Config, _ws, replayDir, _rotationDB); _wndBossmod = new(_bossmod, _zonemod); _wndBossmodHints = new(_bossmod, _zonemod); + _wndZone = new(_zonemod); _wndReplay = new(_ws, _bossmod, _rotationDB, replayDir); _wndRotation = new(_rotation, _amex, () => OpenConfigUI("Autorotation Presets")); _wndAI = new(_ai); @@ -112,6 +114,7 @@ public void Dispose() _wndAI.Dispose(); _wndRotation.Dispose(); _wndReplay.Dispose(); + _wndZone.Dispose(); _wndBossmodHints.Dispose(); _wndBossmod.Dispose(); _configUI.Dispose();