Skip to content

Commit

Permalink
forgot to display da window
Browse files Browse the repository at this point in the history
  • Loading branch information
xanunderscore committed Jan 29, 2025
1 parent 7998936 commit 517c914
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BossMod/BossModule/BossModuleHintsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
22 changes: 21 additions & 1 deletion BossMod/Framework/ActionManagerEx.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions BossMod/Framework/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -112,6 +114,7 @@ public void Dispose()
_wndAI.Dispose();
_wndRotation.Dispose();
_wndReplay.Dispose();
_wndZone.Dispose();
_wndBossmodHints.Dispose();
_wndBossmod.Dispose();
_configUI.Dispose();
Expand Down

0 comments on commit 517c914

Please sign in to comment.