Skip to content

Commit

Permalink
Merge pull request #37 from PunishXIV/autoRot
Browse files Browse the repository at this point in the history
Auto rot
  • Loading branch information
Taurenkey authored Nov 18, 2024
2 parents edce8b0 + 659b60a commit 06560a5
Show file tree
Hide file tree
Showing 127 changed files with 16,916 additions and 12,763 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
[submodule "ECommons"]
path = ECommons
url = https://github.com/NightmareXIV/ECommons.git
[submodule "PunishLib"]
path = PunishLib
url = https://github.com/PunishXIV/PunishLib.git
2 changes: 1 addition & 1 deletion ECommons
Submodule ECommons updated 146 files
1 change: 1 addition & 0 deletions PunishLib
Submodule PunishLib added at fd8fd4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<img src="https://img.shields.io/github/issues-raw/Nik-Potokar/XIVSlothCombo?color=EA9C0A&style=for-the-badge" /></a>
<a href="https://github.com/Nik-Potokar/XIVSlothCombo/graphs/contributors" alt="Contributors">
<img src="https://img.shields.io/github/contributors/Nik-Potokar/XIVSlothCombo?color=009009&style=for-the-badge" /></a>
<a href="https://discord.gg/punishxiv" alt="Discord">
<a href="https://discord.gg/Zzrcc8kmvy" alt="Discord">
<img src="https://img.shields.io/discord/1001823907193552978?color=5865F2&label=&logo=Discord&logoColor=ffffff&style=for-the-badge" /></a>
<br> <!-- Version -->
<a href="https://github.com/Nik-Potokar/XIVSlothCombo/tags" alt="Release">
Expand Down
8 changes: 8 additions & 0 deletions XIVSlothCombo.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Github Actions", "Github Ac
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{3E8E720E-9990-4202-9035-12F54C78CF47}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PunishLib", "PunishLib\PunishLib\PunishLib.csproj", "{768A2A82-B5F0-4C7B-9430-378DC290111B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand All @@ -38,6 +40,12 @@ Global
{3E8E720E-9990-4202-9035-12F54C78CF47}.GitBuild|x64.Build.0 = Debug|x64
{3E8E720E-9990-4202-9035-12F54C78CF47}.Release|x64.ActiveCfg = Release|x64
{3E8E720E-9990-4202-9035-12F54C78CF47}.Release|x64.Build.0 = Release|x64
{768A2A82-B5F0-4C7B-9430-378DC290111B}.Debug|x64.ActiveCfg = Debug|x64
{768A2A82-B5F0-4C7B-9430-378DC290111B}.Debug|x64.Build.0 = Debug|x64
{768A2A82-B5F0-4C7B-9430-378DC290111B}.GitBuild|x64.ActiveCfg = Debug|x64
{768A2A82-B5F0-4C7B-9430-378DC290111B}.GitBuild|x64.Build.0 = Debug|x64
{768A2A82-B5F0-4C7B-9430-378DC290111B}.Release|x64.ActiveCfg = Release|x64
{768A2A82-B5F0-4C7B-9430-378DC290111B}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
16 changes: 16 additions & 0 deletions XIVSlothCombo/Attributes/AutoActionAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;

namespace XIVSlothCombo.Attributes
{
[AttributeUsage(AttributeTargets.Field)]
internal class AutoActionAttribute : Attribute
{
public bool IsAoE;
public bool IsHeal;
internal AutoActionAttribute(bool isAoE, bool isHeal)
{
IsAoE = isAoE;
IsHeal = isHeal;
}
}
}
33 changes: 13 additions & 20 deletions XIVSlothCombo/Attributes/CustomComboInfoAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using ECommons.DalamudServices;
using Lumina.Excel.GeneratedSheets;
using Lumina.Excel.Sheets;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.CompilerServices;
using XIVSlothCombo.Combos.PvE;
using XIVSlothCombo.CustomComboNS.Functions;

namespace XIVSlothCombo.Attributes
{
Expand All @@ -14,41 +15,33 @@ namespace XIVSlothCombo.Attributes
internal class CustomComboInfoAttribute : Attribute
{
/// <summary> Initializes a new instance of the <see cref="CustomComboInfoAttribute"/> class. </summary>
/// <param name="fancyName"> Display name. </param>
/// <param name="name"> Display name. </param>
/// <param name="description"> Combo description. </param>
/// <param name="jobID"> Associated job ID. </param>
/// <param name="order"> Display order. </param>
/// <param name="memeName"> Display meme name </param>
/// <param name="memeDescription"> Meme description. </param>
internal CustomComboInfoAttribute(string fancyName, string description, byte jobID, [CallerLineNumber] int order = 0, string memeName = "", string memeDescription = "")
internal CustomComboInfoAttribute(string name, string description, byte jobID, [CallerLineNumber] int order = 0)
{
FancyName = fancyName;
Name = name;
Description = description;
JobID = jobID;
Order = order;
MemeName = memeName;
MemeDescription = memeDescription;
}

/// <summary> Gets the display name. </summary>
public string FancyName { get; }

///<summary> Gets the meme name. </summary>
public string MemeName { get; }
public string Name { get; }

/// <summary> Gets the description. </summary>
public string Description { get; }

/// <summary> Gets the meme description. </summary>
public string MemeDescription { get; }

/// <summary> Gets the job ID. </summary>
public byte JobID { get; }

/// <summary> Gets the job role. </summary>
public int Role => JobIDToRole(JobID);
public int Role => CustomComboFunctions.JobIDs.JobIDToRole(JobID);

public uint ClassJobCategory => JobIDToClassJobCategory(JobID);
public uint ClassJobCategory => CustomComboFunctions.JobIDs.JobIDToClassJobCategory(JobID);

private static int JobIDToRole(byte jobID)
{
Expand All @@ -61,7 +54,7 @@ private static int JobIDToRole(byte jobID)
private static uint JobIDToClassJobCategory(byte jobID)
{
if (Svc.Data.GetExcelSheet<ClassJob>().HasRow(jobID))
return Svc.Data.GetExcelSheet<ClassJob>().GetRow(jobID).ClassJobCategory.Row;
return Svc.Data.GetExcelSheet<ClassJob>().GetRow(jobID).ClassJobCategory.RowId;

return 0;
}
Expand All @@ -70,7 +63,7 @@ private static uint JobIDToClassJobCategory(byte jobID)
public int Order { get; }

/// <summary> Gets the job name. </summary>
public string JobName => JobIDToName(JobID);
public string JobName => CustomComboFunctions.JobIDs.JobIDToName(JobID);

public string JobShorthand => JobIDToShorthand(JobID);

Expand All @@ -84,7 +77,7 @@ private static string JobIDToShorthand(byte key)

if (ClassJobs.TryGetValue(key, out var job))
{
return job.Abbreviation.RawString;
return job.Abbreviation.ToString();
}
else
{
Expand All @@ -102,10 +95,10 @@ public static string JobIDToName(byte key)
//Override DOH/DOL
if (key is DOH.JobID) key = 08; //Set to Carpenter
if (key is DOL.JobID) key = 16; //Set to Miner
if (ClassJobs.TryGetValue(key, out ClassJob? job))
if (ClassJobs.TryGetValue(key, out ClassJob job))
{
//Grab Category name for DOH/DOL, else the normal Name for the rest
string jobname = key is 08 or 16 ? job.ClassJobCategory.Value.Name : job.Name;
string jobname = key is 08 or 16 ? job.ClassJobCategory.Value.Name.ToString() : job.Name.ToString();
//Job names are all lowercase by default. This capitalizes based on regional rules
string cultureID = Svc.ClientState.ClientLanguage switch
{
Expand Down
4 changes: 3 additions & 1 deletion XIVSlothCombo/Attributes/ReplaceSkillAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ internal ReplaceSkillAttribute(params uint[] actionIDs)
{
foreach (uint id in actionIDs)
{
if (ActionWatching.ActionSheet.TryGetValue(id, out var action) && action != null)
if (ActionWatching.ActionSheet.TryGetValue(id, out var action))
{
ActionIDs.Add(id);
ActionNames.Add($"{action.Name}");
ActionIcons.Add(action.Icon);
}
}
}

internal List<uint> ActionIDs { get; set; } = [];
internal List<string> ActionNames { get; set; } = [];

internal List<ushort> ActionIcons { get; set; } = [];
Expand Down
36 changes: 36 additions & 0 deletions XIVSlothCombo/AutoRotation/AutoRotationConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
namespace XIVSlothCombo.AutoRotation
{
public class AutoRotationConfig
{
public bool Enabled;
public bool InCombatOnly = false;
public bool BypassQuest = false;
public bool BypassFATE = false;
public int CombatDelay = 1;
public DPSRotationMode DPSRotationMode;
public HealerRotationMode HealerRotationMode;
public HealerSettings HealerSettings = new();
public DPSSettings DPSSettings = new();
}

public class DPSSettings
{
public bool FATEPriority = false;
public bool QuestPriority = false;
public int? DPSAoETargets = 3;
}

public class HealerSettings
{
public int SingleTargetHPP = 70;
public int AoETargetHPP = 80;
public int SingleTargetRegenHPP = 60;
public int? AoEHealTargetCount = 2;
public bool ManageKardia = false;
public bool KardiaTanksOnly = false;
public bool AutoRez = false;
public bool AutoCleanse = false;
public bool PreEmptiveHoT = false;

}
}
Loading

0 comments on commit 06560a5

Please sign in to comment.