Skip to content
Open
13 changes: 13 additions & 0 deletions WrathCombo.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@
<File Path="docs/CODEOWNERS" />
<File Path="README.md" />
</Folder>
<Folder Name="/Control Files/">
<File Path="res/motd.txt" />
<File Path="res/ipc_status.txt" />
</Folder>
<Folder Name="/Images/">
<File Path="res/plugin/wrathcombo.png" />
<File Path="res/custom_action_images/SingleTargetDPS.png" />
<File Path="res/custom_action_images/SingleTargetHeals.png" />
<File Path="res/custom_action_images/AoEDPS.png" />
<File Path="res/custom_action_images/AoEHeals.png" />
<File Path="res/readme_images/adding_repo.jpg" />
<File Path="res/readme_images/demo.gif" />
</Folder>
<Project Path="ECommons/ECommons/ECommons.csproj">
<Platform Project="x64" />
</Project>
Expand Down
32 changes: 16 additions & 16 deletions WrathCombo/Attributes/SettingAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using System;
using WrathCombo.Resources.Localization.UI.Settings;

// ReSharper disable ClassNeverInstantiated.Global

#endregion
Expand Down Expand Up @@ -29,11 +30,11 @@ public string LocalizedCategoryName
{
return TheCategory switch
{
Category.Main_UI_Options => SettingsCfgUI.MainUIOptions_Category,
Category.Main_UI_Options => SettingsCfgUI.MainUIOptions_Category,
Category.Rotation_Behavior_Options => SettingsCfgUI.RotationBehaviourOptions_Category,
Category.Targeting_Options => SettingsCfgUI.TargetingOptions_Category,
Category.Troubleshooting_Options => SettingsCfgUI.TroubleshootingOptions_Category,
_ => "UNKNOWN"
Category.Targeting_Options => SettingsCfgUI.TargetingOptions_Category,
Category.Troubleshooting_Options => SettingsCfgUI.TroubleshootingOptions_Category,
_ => "UNKNOWN"
};
}
}
Expand All @@ -49,6 +50,7 @@ public class SettingGroup(
internal string NameSpace { get; } = nameSpace;
internal bool ShouldThisGroupGetDisabled { get; } = shouldThisGroupGetDisabled;
}

[AttributeUsage(AttributeTargets.Field)]
public class SettingCollapsibleGroup(string groupName) : Attribute
{
Expand Down Expand Up @@ -80,22 +82,20 @@ public enum Type
Slider_Float,
Stack,
}

internal string Name { get; }
internal string HelpMark { get; }
internal string RecommendedValue { get; }
internal string DefaultValue { get; }
internal string? UnitLabel { get; }

// All text is now fetched when loaded from attribute from our localizations

internal Type TheType { get; } = type;
internal string? ExtraHelpMark { get; }
internal string? WarningMark { get; }
internal string? ExtraText { get; }
internal float? MinFloat { get; } =

internal float? MinFloat { get; } =
float.IsNaN(minFloat) ? null : minFloat;
internal float? MaxFloat { get; } =

internal float? MaxFloat { get; } =
float.IsNaN(maxFloat) ? null : maxFloat;

internal int? MinInt { get; } =
minInt == int.MinValue ? null : minInt;

internal int? MaxInt { get; } =
maxInt == int.MaxValue ? null : maxInt;

Expand All @@ -115,4 +115,4 @@ public class SettingUI_Or : Attribute
[AttributeUsage(AttributeTargets.Field)]
public class SettingUI_RetargetIcon : Attribute
{
}
}
7 changes: 7 additions & 0 deletions WrathCombo/AutoRotation/AutoRotationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ internal unsafe class AutoRotationController

public static bool WouldLikeToGroundTarget;
public static bool Paused;
#pragma warning disable CS0649
public static int UnpauseSeconds;
#pragma warning restore CS0649

public static IGameObject? AutorotHealTarget;
public static bool AutorotRaidwiding;
Expand Down Expand Up @@ -87,6 +89,11 @@ private void ScanForWarnings(Dalamud.Game.Chat.IHandleableChatMessage message)
Paused = true;
Svc.Framework.RunOnTick(() => Paused = false, TimeSpan.FromSeconds(UnpauseSeconds));
}

if (raidwideWarningFound)
{
//
}
}

public void Dispose()
Expand Down
8 changes: 4 additions & 4 deletions WrathCombo/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -792,11 +792,11 @@ internal void HandleOpenCommand
}
else
{
DuoLog.Error($"{argument[0]} is not a correct job abbreviation.");
return;
if (argument[0].Length < 4)
DuoLog.Error($"{argument[0]} is not a correct job abbreviation.");
else
DuoLog.Error($"{argument[0]} is not an understood command.");
}


}

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion WrathCombo/Data/ActionWatching.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public static class ActionWatching
private static CancellationToken token;

public static bool UpdatingActions;
private static bool _tainted;

static unsafe ActionWatching()
{
Expand Down
28 changes: 23 additions & 5 deletions WrathCombo/Native/CustomActionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public sealed unsafe class CustomActionSetup : IDisposable
public (int Hotbar, int Slot)? HoveredSlot = null;

[EzHook("48 89 5C 24 ?? 48 89 6C 24 ?? 48 89 74 24 ?? 48 89 7C 24 ?? 41 56 48 83 EC 20 48 8B 7C 24 ?? 48 8B D9", false)]
private EzHook<AddonActionBarBase.Delegates.ReceiveEvent>? AddonActionBarBase_ReceiveEventHook;
private EzHook<AddonActionBarBase.Delegates.ReceiveEvent>? AddonActionBarBase_ReceiveEventHook = null!;

private unsafe void AddonActionBarBase_ReceiveEventDetour(AddonActionBarBase* thisPtr, AtkEventType eventType, int eventParam, AtkEvent* atkEvent, AtkEventData* atkEventData)
{
Expand All @@ -367,10 +367,28 @@ public CustomActionSetup()
EzSignatureHelper.Initialize(this);
AddonActionBarBase_ReceiveEventHook?.Enable();
Manager = new(Svc.SigScanner, Svc.Hook, Svc.Texture, Svc.Framework);
_singleTargetDPS = new(All.SingleTargetDPS, "Single Target DPS", "This is for the Single Target DPS combos.", 1504, customIconPath: Path.Combine(Svc.PluginInterface.AssemblyLocation.DirectoryName!, "Resources/SingleTargetDPS.png"));
_aoeDPS = new(All.AoEDPS, "AoE DPS", "This is for the AoE DPS combos.", 1505, customIconPath: Path.Combine(Svc.PluginInterface.AssemblyLocation.DirectoryName!, "Resources/AoEDPS.png"));
_singleTargeHeals = new(All.SingleTargetHeals, "Single Target Heals", "This is for the Single Target Heal combos.", 1508, customIconPath: Path.Combine(Svc.PluginInterface.AssemblyLocation.DirectoryName!, "Resources/SingleTargetHeals.png"));
_aoeHeals = new(All.AoeHeals, "AoE Heals", "This is for the AoE Heal combos.", 1510, customIconPath: Path.Combine(Svc.PluginInterface.AssemblyLocation.DirectoryName!, "Resources/AoEHeals.png"));
var path = Svc.PluginInterface.AssemblyLocation.Directory?.FullName!;

_singleTargetDPS = new(All.SingleTargetDPS,
"Single Target DPS",
"This is for the Single Target DPS combos.", 1504,
customIconPath: Path.Combine(path,
"images\\SingleTargetDPS.png"));
_aoeDPS = new(All.AoEDPS,
"AoE DPS",
"This is for the AoE DPS combos.", 1505,
customIconPath: Path.Combine(path,
"images\\AoEDPS.png"));
_singleTargeHeals = new(All.SingleTargetHeals,
"Single Target Heals",
"This is for the Single Target Heal combos.", 1508,
customIconPath: Path.Combine(path,
"images\\SingleTargetHeals.png"));
_aoeHeals = new(All.AoeHeals,
"AoE Heals",
"This is for the AoE Heal combos.", 1510,
customIconPath: Path.Combine(path,
"images\\AoEHeals.png"));

Manager.Register(_singleTargetDPS, _aoeDPS, _singleTargeHeals, _aoeHeals);
}
Expand Down
1 change: 0 additions & 1 deletion WrathCombo/Services/IPC/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ internal bool CheckForBailConditionsAtSetTime
/// <returns>The Opposite-mode preset.</returns>
internal static Preset? GetOppositeModeCombo(Preset preset)
{
const StringComparison lower = StringComparison.CurrentCultureIgnoreCase;
var presetData = preset.Attributes();

// Bail if it is not one of the main combos
Expand Down
1 change: 1 addition & 0 deletions WrathCombo/Window/Functions/Setting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public Setting(string settingName)
if (CachedSettings.TryGetValue(settingName, out var cachedSetting))
{
Category = cachedSetting.Category;
CategoryName = cachedSetting.CategoryName;
Name = cachedSetting.Name;
HelpMark = cachedSetting.HelpMark;
RecommendedValue = cachedSetting.RecommendedValue;
Expand Down
8 changes: 0 additions & 8 deletions WrathCombo/Window/Functions/UserConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public static bool DrawSliderInt(int minValue, int maxValue, string config, stri
IsSubBox = true,
ContentsFunc = () =>
{
bool inputChanged = false;
Vector2 currentPos = ImGui.GetCursorPos();
ImGui.SetCursorPosX(currentPos.X + itemWidth);
ImGui.PushTextWrapPos(wrapPos);
Expand All @@ -64,17 +63,10 @@ public static bool DrawSliderInt(int minValue, int maxValue, string config, stri
Vector2 textLength = ImGui.CalcTextSize(sliderDescription);
string newLines = "";
for (int i = 1; i < lines; i++)
{
if (i % 2 == 0)
{
newLines += "\n";
}
else
{
newLines += "\n\n";
}

}

if (hasAdditionalChoice)
{
Expand Down
22 changes: 5 additions & 17 deletions WrathCombo/WrathCombo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Native\Icons\**" />
<EmbeddedResource Remove="Native\Icons\**" />
<None Remove="Native\Icons\**" />
</ItemGroup>
<!-- Styling Rules -->
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
Expand Down Expand Up @@ -72,6 +67,11 @@
<!-- Logo -->
<ItemGroup>
<Content Include="..\res\plugin\wrathcombo.png" Link="images\wrathcombo.png" CopyToOutputDirectory="PreserveNewest" Visible="false" />

<Content Include="..\res\custom_action_images\AoEDPS.png" Link="images\AoEDPS.png" CopyToOutputDirectory="PreserveNewest" Visible="false" />
<Content Include="..\res\custom_action_images\AoEHeals.png" Link="images\AoEHeals.png" CopyToOutputDirectory="PreserveNewest" Visible="false" />
<Content Include="..\res\custom_action_images\SingleTargetDPS.png" Link="images\SingleTargetDPS.png" CopyToOutputDirectory="PreserveNewest" Visible="false" />
<Content Include="..\res\custom_action_images\SingleTargetHeals.png" Link="images\SingleTargetHeals.png" CopyToOutputDirectory="PreserveNewest" Visible="false" />
</ItemGroup>

<!-- Dalamud Packaging -->
Expand Down Expand Up @@ -431,18 +431,6 @@

<!-- Release Manifest -->
<ItemGroup>
<None Update="Resources\AoEDPS.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Resources\AoEHeals.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Resources\SingleTargetDPS.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Resources\SingleTargetHeals.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="WrathCombo.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
File renamed without changes