Skip to content

Commit

Permalink
bloody hell
Browse files Browse the repository at this point in the history
  • Loading branch information
xanunderscore committed Nov 15, 2024
1 parent 1375611 commit 5f48f2f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
6 changes: 2 additions & 4 deletions BossMod/Data/ActionEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ public static string DescribeFields(ActionEffect eff)
case ActionEffectType.StartActionCombo:
res.Append($"aid={eff.Value}");
break;
case ActionEffectType.Knockback1:
case ActionEffectType.Knockback2:
case ActionEffectType.Knockback:
var kbData = Service.LuminaRow<Lumina.Excel.Sheets.Knockback>(eff.Value);
res.Append($"row={eff.Value}, dist={kbData?.Distance}+{eff.Param0}, dir={(KnockbackDirection?)kbData?.Direction}{(kbData?.Direction == (byte)KnockbackDirection.Arg ? $" ({kbData?.DirectionArg}deg)" : "")}, speed={kbData?.Speed}");
break;
Expand Down Expand Up @@ -344,8 +343,7 @@ public static string DescribeUnknown(ActionEffect eff)
return "non-zero params";
else
return $"param0={eff.Param0}, value={eff.Value}"; // this has some meaning, TODO investigate
case ActionEffectType.Knockback1:
case ActionEffectType.Knockback2:
case ActionEffectType.Knockback:
return eff.Param1 != 0 || eff.Param2 != 0 || eff.Param3 != 0 || eff.Param4 != 0 ? "non-zero params" : "";
case ActionEffectType.Attract1:
case ActionEffectType.Attract2:
Expand Down
2 changes: 1 addition & 1 deletion BossMod/Data/PendingEffects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public int PendingMPDifference(ulong target)
return null;
}

public bool PendingKnockbacks(ulong target) => PendingEffectsAtTarget(_entries, target).Any(eff => eff.Type is >= ActionEffectType.Knockback1 and <= ActionEffectType.AttractCustom3);
public bool PendingKnockbacks(ulong target) => PendingEffectsAtTarget(_entries, target).Any(eff => eff.Type is >= ActionEffectType.Knockback and <= ActionEffectType.AttractCustom3);

private static IEnumerable<ActionEffect> PendingEffectsAtTarget(IEnumerable<Entry> entries, ulong target)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Meteors(BossModule module) : Components.GenericBaitAway(module)
{
public List<Actor> targets = [];

public override void OnEventIcon(Actor actor, uint iconID)
public override void OnEventIcon(Actor actor, uint iconID, ulong targetID)
{
if (iconID == (uint)IconID.Meteor)
{
Expand Down Expand Up @@ -105,4 +105,4 @@ public D061FirstBeastStates(BossModule module) : base(module)
}

[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "The Combat Reborn Team (Malediktus)", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 652, NameID = 8201)]
public class D061FirstBeast(WorldState ws, Actor primary) : BossModule(ws, primary, new(-80, 82), new ArenaBoundsSquare(19.5f));
public class D061FirstBeast(WorldState ws, Actor primary) : BossModule(ws, primary, new(-80, 82), new ArenaBoundsSquare(19.5f));
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class BlackFlame(BossModule module) : BossComponent(module)

private IEnumerable<Actor> Furniture => Raid.WithoutSlot().Where(x => x.Type == ActorType.Enemy);

public override void OnEventIcon(Actor actor, uint iconID)
public override void OnEventIcon(Actor actor, uint iconID, ulong targetID)
{
if (iconID == 25)
{
Expand Down Expand Up @@ -187,7 +187,7 @@ class FiresDomain(BossModule module) : BossComponent(module)
private readonly List<Actor> Baits = [];
private DateTime NextCharge;

public override void OnEventIcon(Actor actor, uint iconID)
public override void OnEventIcon(Actor actor, uint iconID, ulong targetID)
{
if ((IconID)iconID is >= IconID.Target1 and <= IconID.Target4)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Flatten(BossModule module) : Components.SingleTargetCast(module, ActionID.
class KanRhaiBait(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true)
{
public static readonly AOEShape Cross = new AOEShapeCross(15, 3);
public override void OnEventIcon(Actor actor, uint iconID)
public override void OnEventIcon(Actor actor, uint iconID, ulong targetID)
{
if (iconID == 260)
CurrentBaits.Add(new(Module.PrimaryActor, actor, Cross, IgnoreRotation: true));
Expand Down
4 changes: 2 additions & 2 deletions BossMod/Modules/Shadowbringers/Quest/CourageBornOfFear.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ private void Reset()
Timeout = DateTime.MaxValue;
}

public override void OnEventIcon(Actor actor, uint iconID)
public override void OnEventIcon(Actor actor, uint iconID, ulong targetID)
{
base.OnEventIcon(actor, iconID);
base.OnEventIcon(actor, iconID, targetID);
if (iconID == IID)
Timeout = WorldState.FutureTime(10);
}
Expand Down
3 changes: 1 addition & 2 deletions BossMod/Replay/Analysis/AbilityInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ public KnockbackAnalysis(List<Instance> infos)
{
switch (eff.Type)
{
case ActionEffectType.Knockback1:
case ActionEffectType.Knockback2:
case ActionEffectType.Knockback:
var kbData = Service.LuminaRow<Lumina.Excel.Sheets.Knockback>(eff.Value);
var kind = kbData != null ? (KnockbackDirection)kbData.Value.Direction switch
{
Expand Down

0 comments on commit 5f48f2f

Please sign in to comment.