diff --git a/Dalamud/Configuration/CustomComboPreset.cs b/Dalamud/Configuration/CustomComboPreset.cs index 132906fd1..c4b0ca053 100644 --- a/Dalamud/Configuration/CustomComboPreset.cs +++ b/Dalamud/Configuration/CustomComboPreset.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; namespace XIVLauncher.Dalamud { - //CURRENT HIGHEST FLAG IS 45 + //CURRENT HIGHEST FLAG IS 44 [Flags] public enum CustomComboPreset : long { None = 0, // DRAGOON - [CustomComboInfo("Coerthan Torment Combo", "Replace Coearthan Torment with its combo chain", 22)] + [CustomComboInfo("Coerthan Torment Combo", "Replace Coerthan Torment with its combo chain", 22)] DragoonCoerthanTormentCombo = 1L << 0, [CustomComboInfo("Chaos Thrust Combo", "Replace Chaos Thrust with its combo chain", 22)] @@ -68,8 +68,6 @@ namespace XIVLauncher.Dalamud // NINJA - [CustomComboInfo("Shadow Fang Combo", "Replace Shadow Fang with its combo chain", 30)] - NinjaShadowFangCombo = 1L << 16, [CustomComboInfo("Armor Crush Combo", "Replace Armor Crush with its combo chain", 30)] NinjaArmorCrushCombo = 1L << 17, @@ -166,7 +164,7 @@ namespace XIVLauncher.Dalamud MonkRearCombo = 1L << 44, [CustomComboInfo("Rockbreaker Combo", "Replaces Rockbreaker according to stance. When PB is active, prefer RB (with non-max GL) > Twin Snakes (with no TS active) > AotD.", 20)] - MonkAoECombo = 1L << 45, + MonkAoECombo = 1L << 16, // RED MAGE [CustomComboInfo("One-button White Magic", "Replaces Verstone with the following priority: Scorch > Verholy > Dual/Swiftcast Veraero > Verstone proc > Opener Veraero > Jolt.", 35)] diff --git a/Dalamud/Game/ClientState/Structs/JobGauge/BLMGauge.cs b/Dalamud/Game/ClientState/Structs/JobGauge/BLMGauge.cs index a46a03553..8bbb74610 100644 --- a/Dalamud/Game/ClientState/Structs/JobGauge/BLMGauge.cs +++ b/Dalamud/Game/ClientState/Structs/JobGauge/BLMGauge.cs @@ -14,7 +14,7 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge { [FieldOffset(4)] private byte ElementStance; //ui/af [FieldOffset(5)] public byte NumUmbralHearts; //number of umbral hearts [FieldOffset(6)] public byte NumPolyglotStacks; //number of polyglot stacks - [FieldOffset(7)] public bool IsEnoActive; //eno active? + [FieldOffset(7)] private byte EnoState; //eno active? public bool InUmbralIce() { return ElementStance > 4; @@ -24,6 +24,10 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge { return ElementStance > 0 && ElementStance < 4; } + public bool IsEnoActive() { + return EnoState > 0; + } + } diff --git a/Dalamud/Game/ClientState/Structs/JobGauge/DRKGauge.cs b/Dalamud/Game/ClientState/Structs/JobGauge/DRKGauge.cs index 0d160713a..052b4e8ed 100644 --- a/Dalamud/Game/ClientState/Structs/JobGauge/DRKGauge.cs +++ b/Dalamud/Game/ClientState/Structs/JobGauge/DRKGauge.cs @@ -10,7 +10,11 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge { public struct DRKGauge { [FieldOffset(0)] public short Blood; [FieldOffset(2)] public short DarksideTimeRemaining; - [FieldOffset(4)] public bool HasDarkArts; + [FieldOffset(4)] private byte DarkArtsState; [FieldOffset(6)] public short ShadowTimeRemaining; + + public bool HasDarkArts() { + return DarkArtsState > 0; + } } } diff --git a/Dalamud/Game/ClientState/Structs/JobGauge/MNKGauge.cs b/Dalamud/Game/ClientState/Structs/JobGauge/MNKGauge.cs index 5741f3d7c..0d40ee780 100644 --- a/Dalamud/Game/ClientState/Structs/JobGauge/MNKGauge.cs +++ b/Dalamud/Game/ClientState/Structs/JobGauge/MNKGauge.cs @@ -12,6 +12,10 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge { [FieldOffset(0)] public byte GLTimer; [FieldOffset(2)] public byte NumGLStacks; [FieldOffset(3)] public byte NumChakra; - [FieldOffset(4)] public bool IsGLTimerFrozen; + [FieldOffset(4)] private byte GLTimerFreezeState; + + public bool IsGLTimerFroze() { + return GLTimerFreezeState > 0; + } } } diff --git a/Dalamud/Game/Internal/Gui/IconReplacer.cs b/Dalamud/Game/Internal/Gui/IconReplacer.cs index 2deb6528a..032c021d4 100644 --- a/Dalamud/Game/Internal/Gui/IconReplacer.cs +++ b/Dalamud/Game/Internal/Gui/IconReplacer.cs @@ -193,7 +193,10 @@ namespace Dalamud.Game.Internal.Gui { if (actionID == 3539) { if (comboTime > 0) { if (lastMove == 9 && level >= 4) return 15; - if (lastMove == 15 && level >= 60) return 3539; + if (lastMove == 15) { + if (level >= 60) return 3539; + if (level >= 26) return 21; + } } return 9; @@ -307,16 +310,6 @@ namespace Dalamud.Game.Internal.Gui { // NINJA - // Replace Shadow Fang with Shadow Fang combo - if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.NinjaShadowFangCombo)) { - if (actionID == 2257) { - if (comboTime > 0) { - if (lastMove == 2240 && level >= 30) return 2257; - } - return 2240; - } - } - // Replace Armor Crush with Armor Crush combo if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.NinjaArmorCrushCombo)) { if (actionID == 3563) { @@ -392,8 +385,14 @@ namespace Dalamud.Game.Internal.Gui { if (actionID == 7413) { if (this.dalamud.ClientState.JobGauges.Get().IsOverheated() && level >= 35) return 7410; if (comboTime > 0) { - if (lastMove == 2866 && level >= 2) return 7412; - if (lastMove == 2868 && level >= 26) return 7413; + if (lastMove == 2866) { + if (level >= 60) return 7412; + if (level >= 2) return 2868; + } + if (lastMove == 2868) { + if (level >= 64) return 7413; + if (level >= 26) return 2873; + } } return 7411; } @@ -410,11 +409,10 @@ namespace Dalamud.Game.Internal.Gui { // BLACK MAGE // Enochian changes to B4 or F4 depending on stance. - // TODO: For some reason this breaks only on my Crystal alt. if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.BlackEnochianFeature)) { if (actionID == 3575) { BLMGauge jobInfo = this.dalamud.ClientState.JobGauges.Get(); - if (jobInfo.IsEnoActive) { + if (jobInfo.IsEnoActive()) { if (jobInfo.InUmbralIce() && level >= 58) return 3576; if (level >= 60) return 3577; } @@ -425,7 +423,8 @@ namespace Dalamud.Game.Internal.Gui { // Umbral Soul and Transpose if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.BlackManaFeature)) { if (actionID == 149) { - if (this.dalamud.ClientState.JobGauges.Get().InUmbralIce() && level >= 76) return 16506; + BLMGauge gauge = this.dalamud.ClientState.JobGauges.Get(); + if (gauge.InUmbralIce() && gauge.IsEnoActive() && level >= 76) return 16506; return 149; } } @@ -449,10 +448,12 @@ namespace Dalamud.Game.Internal.Gui { return 4405; case CardType.SPIRE: return 4406; + /* case CardType.LORD: return 7444; case CardType.LADY: return 7445; + */ default: return 3590; } @@ -710,7 +711,7 @@ namespace Dalamud.Game.Internal.Gui { } // Replace Rockbreaker with AoE combo. - // During PB, RB (with sub-max stacks) > Twin Snakes (if not applied) > AotD. + // During PB, RB (with sub-max stacks) > Twin Snakes (if not applied) > RB. if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.MonkAoECombo)) { if (actionID == 70) { if (SearchBuffArray(110)) { @@ -722,7 +723,7 @@ namespace Dalamud.Game.Internal.Gui { return 70; } else if (!SearchBuffArray(101)) return 61; - else return 62; + else return 70; } else { if (SearchBuffArray(107)) return 62;