Skip to content

Commit

Permalink
Fixes after merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Apr 4, 2024
1 parent a0c672e commit d1abc5e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
14 changes: 8 additions & 6 deletions BossMod/Framework/IPCProvider.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
using BossMod.Components;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.ClientState.Objects.Types;

namespace BossMod;

class IPCProvider : IDisposable
{
private List<Action> _disposeActions = new();

public IPCProvider(Autorotation autorotation, BossModuleManager bossmod)
public IPCProvider(Autorotation autorotation)
{
Register("ActiveModuleComponentBaseList", () => bossmod.ActiveModule?.Components.Select(c => c.GetType().BaseType?.Name).ToList() ?? default);
Register("ActiveModuleComponentList", () => bossmod.ActiveModule?.Components.Select(c => c.GetType().Name).ToList() ?? default);
Register("ActiveModuleHasComponent", (string name) => bossmod.ActiveModule?.Components.Any(c => c.GetType().Name == name || c.GetType().BaseType?.Name == name) ?? false);
// TODO: this really needs to be reconsidered, this exposes implementation detail
// for usecase description, see PR 330 - really AI itself should handle heal range
Register("ActiveModuleComponentBaseList", () => autorotation.Bossmods.ActiveModule?.Components.Select(c => c.GetType().BaseType?.Name).ToList() ?? default);
Register("ActiveModuleComponentList", () => autorotation.Bossmods.ActiveModule?.Components.Select(c => c.GetType().Name).ToList() ?? default);
Register("ActiveModuleHasComponent", (string name) => autorotation.Bossmods.ActiveModule?.Components.Any(c => c.GetType().Name == name || c.GetType().BaseType?.Name == name) ?? false);

Register("HasModule", (GameObject obj) => ModuleRegistry.FindByOID(obj.DataId) != null);
Register("IsMoving", () => ActionManagerEx.Instance!.InputOverride.IsMoving());
Register("ForbiddenZonesCount", () => autorotation.Hints.ForbiddenZones.Count);
Expand Down
2 changes: 1 addition & 1 deletion BossMod/Framework/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Plugin(
_autorotation = new(_bossmod);
_ai = new(_autorotation);
_broadcast = new();
_ipc = new(_autorotation, _bossmod);
_ipc = new(_autorotation);

_wndBossmod = new(_bossmod);
_wndBossmodPlan = new(_bossmod);
Expand Down
14 changes: 3 additions & 11 deletions BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using BossMod.RealmReborn.Dungeon.D11DzemaelDarkhold.D111AllSeeingEye;

namespace BossMod.RealmReborn.Dungeon.D10StoneVigil.D101ChudoYudo;
namespace BossMod.RealmReborn.Dungeon.D10StoneVigil.D101ChudoYudo;

public enum OID : uint
{
Expand All @@ -26,18 +24,13 @@ class Swinge : Components.SelfTargetedLegacyRotationAOEs
}

// due to relatively short casts and the fact that boss likes moving across arena to cast swinge, we always want non-tanks to be positioned slightly behind
// I think cleave is better for this so we can still move around.
/*class Positioning : BossComponent
class Positioning : BossComponent
{
public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
{
if (actor.Role != Role.Tank)
hints.AddForbiddenZone(ShapeDistance.Cone(module.PrimaryActor.Position, 10, module.PrimaryActor.Rotation, 90.Degrees()));
}
}*/
class AutoAttack : Components.Cleave
{
public AutoAttack() : base(ActionID.MakeSpell(AID.AutoAttack), new AOEShapeCone(40, 30.Degrees())) { }
}

class D101ChudoYudoStates : StateMachineBuilder
Expand All @@ -47,8 +40,7 @@ public D101ChudoYudoStates(BossModule module) : base(module)
TrivialPhase()
.ActivateOnEnter<LionsBreath>()
.ActivateOnEnter<Swinge>()
.ActivateOnEnter<AutoAttack>();
//.ActivateOnEnter<Positioning>();
.ActivateOnEnter<Positioning>();
}
}

Expand Down

0 comments on commit d1abc5e

Please sign in to comment.