Skip to content

Commit

Permalink
Fixed warnings and bumped CS.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Jun 5, 2024
1 parent 89770e0 commit 666d652
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
17 changes: 6 additions & 11 deletions BossMod/Autorotation/MNK/MNKRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ public static class Rotation
{
public enum Form { None, OpoOpo, Raptor, Coeurl }

private static readonly float SSSApplicationDelay = 0.62f;
private const float SSSApplicationDelay = 0.62f;

// make configurable? idk? only rotation devs would care about this
private static readonly bool Debug = false;
public static readonly bool Debug;

// full state needed for determining next action
public class State(WorldState ws) : CommonRotation.PlayerState(ws)
Expand Down Expand Up @@ -745,15 +745,10 @@ private static bool ShouldUseBrotherhood(State state, Strategy strategy, float d
if (!HaveTarget(state, strategy) || strategy.ActualFightEndIn < 15)
return false;

return !strategy.UseAOE
&& state.CD(CDGroup.RiddleOfFire) > 0
&& (
// opener timing mostly important as long as rof is used first, we just want to align with party buffs -
// the default opener is bhood after first bootshine
state.LeadenFistLeft == 0
// later uses can be asap
|| strategy.CombatTimer > 30
);
// opener timing mostly important as long as rof is used first, we just want to align with party buffs -
// the default opener is bhood after first bootshine
// later uses can be asap
return !strategy.UseAOE && state.CD(CDGroup.RiddleOfFire) > 0 && (state.LeadenFistLeft == 0 || strategy.CombatTimer > 30);
}

private static bool ShouldUsePB(State state, Strategy strategy, float deadline)
Expand Down
2 changes: 1 addition & 1 deletion BossMod/Network/PacketDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void LogNode(TextNode n, string prefix)
private TextNode? DecodePacket(PacketID id, byte* payload) => id switch
{
PacketID.RSVData when (RSVData*)payload is var p => new($"{MemoryHelper.ReadStringNullTerminated((nint)p->Key)} = {MemoryHelper.ReadString((nint)p->Value, p->ValueLength)} [{p->ValueLength}]"),
PacketID.Countdown when (ServerIPC.Countdown*)payload is var p => new($"{p->Time}s from {DecodeActor(p->SenderID)}{(p->FailedInCombat != 0 ? " fail-in-combat" : "")} '{MemoryHelper.ReadStringNullTerminated((nint)p->Text)}' u={p->u4:X4} {p->u9:X2} {p->u10:X2}"),
PacketID.Countdown when (Countdown*)payload is var p => new($"{p->Time}s from {DecodeActor(p->SenderID)}{(p->FailedInCombat != 0 ? " fail-in-combat" : "")} '{MemoryHelper.ReadStringNullTerminated((nint)p->Text)}' u={p->u4:X4} {p->u9:X2} {p->u10:X2}"),
PacketID.CountdownCancel when (CountdownCancel*)payload is var p => new($"from {DecodeActor(p->SenderID)} '{MemoryHelper.ReadStringNullTerminated((nint)p->Text)}' u={p->u4:X4} {p->u6:X4}"),
PacketID.StatusEffectList when (StatusEffectList*)payload is var p => DecodeStatusEffectList(p),
PacketID.StatusEffectListEureka when (StatusEffectListEureka*)payload is var p => DecodeStatusEffectList(&p->Data, $", rank={p->Rank}/{p->Element}/{p->u2}, pad={p->pad3:X2}"),
Expand Down

0 comments on commit 666d652

Please sign in to comment.