From 666d65288e7b2404c7aa0c5ceaab09300135f68e Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Thu, 6 Jun 2024 00:11:26 +0100 Subject: [PATCH] Fixed warnings and bumped CS. --- BossMod/Autorotation/MNK/MNKRotation.cs | 17 ++++++----------- BossMod/Network/PacketDecoder.cs | 2 +- FFXIVClientStructs | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/BossMod/Autorotation/MNK/MNKRotation.cs b/BossMod/Autorotation/MNK/MNKRotation.cs index add0019de..c32a52e21 100644 --- a/BossMod/Autorotation/MNK/MNKRotation.cs +++ b/BossMod/Autorotation/MNK/MNKRotation.cs @@ -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) @@ -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) diff --git a/BossMod/Network/PacketDecoder.cs b/BossMod/Network/PacketDecoder.cs index 5e7d450fb..5abbad7c9 100644 --- a/BossMod/Network/PacketDecoder.cs +++ b/BossMod/Network/PacketDecoder.cs @@ -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}"), diff --git a/FFXIVClientStructs b/FFXIVClientStructs index 705119e45..0d84c9736 160000 --- a/FFXIVClientStructs +++ b/FFXIVClientStructs @@ -1 +1 @@ -Subproject commit 705119e450a671a76166cec525364414380c5e90 +Subproject commit 0d84c97361201fc53e54ef485460f46171701e32