Skip to content

Commit 06560a5

Browse files
authored
Merge pull request #37 from PunishXIV/autoRot
Auto rot
2 parents edce8b0 + 659b60a commit 06560a5

File tree

127 files changed

+16916
-12763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+16916
-12763
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
[submodule "ECommons"]
99
path = ECommons
1010
url = https://github.com/NightmareXIV/ECommons.git
11+
[submodule "PunishLib"]
12+
path = PunishLib
13+
url = https://github.com/PunishXIV/PunishLib.git

ECommons

Submodule ECommons updated 146 files

PunishLib

Submodule PunishLib added at fd8fd44

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<img src="https://img.shields.io/github/issues-raw/Nik-Potokar/XIVSlothCombo?color=EA9C0A&style=for-the-badge" /></a>
1818
<a href="https://github.com/Nik-Potokar/XIVSlothCombo/graphs/contributors" alt="Contributors">
1919
<img src="https://img.shields.io/github/contributors/Nik-Potokar/XIVSlothCombo?color=009009&style=for-the-badge" /></a>
20-
<a href="https://discord.gg/punishxiv" alt="Discord">
20+
<a href="https://discord.gg/Zzrcc8kmvy" alt="Discord">
2121
<img src="https://img.shields.io/discord/1001823907193552978?color=5865F2&label=&logo=Discord&logoColor=ffffff&style=for-the-badge" /></a>
2222
<br> <!-- Version -->
2323
<a href="https://github.com/Nik-Potokar/XIVSlothCombo/tags" alt="Release">

XIVSlothCombo.sln

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Github Actions", "Github Ac
1919
EndProject
2020
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{3E8E720E-9990-4202-9035-12F54C78CF47}"
2121
EndProject
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PunishLib", "PunishLib\PunishLib\PunishLib.csproj", "{768A2A82-B5F0-4C7B-9430-378DC290111B}"
23+
EndProject
2224
Global
2325
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2426
Debug|x64 = Debug|x64
@@ -38,6 +40,12 @@ Global
3840
{3E8E720E-9990-4202-9035-12F54C78CF47}.GitBuild|x64.Build.0 = Debug|x64
3941
{3E8E720E-9990-4202-9035-12F54C78CF47}.Release|x64.ActiveCfg = Release|x64
4042
{3E8E720E-9990-4202-9035-12F54C78CF47}.Release|x64.Build.0 = Release|x64
43+
{768A2A82-B5F0-4C7B-9430-378DC290111B}.Debug|x64.ActiveCfg = Debug|x64
44+
{768A2A82-B5F0-4C7B-9430-378DC290111B}.Debug|x64.Build.0 = Debug|x64
45+
{768A2A82-B5F0-4C7B-9430-378DC290111B}.GitBuild|x64.ActiveCfg = Debug|x64
46+
{768A2A82-B5F0-4C7B-9430-378DC290111B}.GitBuild|x64.Build.0 = Debug|x64
47+
{768A2A82-B5F0-4C7B-9430-378DC290111B}.Release|x64.ActiveCfg = Release|x64
48+
{768A2A82-B5F0-4C7B-9430-378DC290111B}.Release|x64.Build.0 = Release|x64
4149
EndGlobalSection
4250
GlobalSection(SolutionProperties) = preSolution
4351
HideSolutionNode = FALSE
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
3+
namespace XIVSlothCombo.Attributes
4+
{
5+
[AttributeUsage(AttributeTargets.Field)]
6+
internal class AutoActionAttribute : Attribute
7+
{
8+
public bool IsAoE;
9+
public bool IsHeal;
10+
internal AutoActionAttribute(bool isAoE, bool isHeal)
11+
{
12+
IsAoE = isAoE;
13+
IsHeal = isHeal;
14+
}
15+
}
16+
}

XIVSlothCombo/Attributes/CustomComboInfoAttribute.cs

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
using ECommons.DalamudServices;
2-
using Lumina.Excel.GeneratedSheets;
2+
using Lumina.Excel.Sheets;
33
using System;
44
using System.Collections.Generic;
55
using System.Globalization;
66
using System.Linq;
77
using System.Runtime.CompilerServices;
88
using XIVSlothCombo.Combos.PvE;
9+
using XIVSlothCombo.CustomComboNS.Functions;
910

1011
namespace XIVSlothCombo.Attributes
1112
{
@@ -14,41 +15,33 @@ namespace XIVSlothCombo.Attributes
1415
internal class CustomComboInfoAttribute : Attribute
1516
{
1617
/// <summary> Initializes a new instance of the <see cref="CustomComboInfoAttribute"/> class. </summary>
17-
/// <param name="fancyName"> Display name. </param>
18+
/// <param name="name"> Display name. </param>
1819
/// <param name="description"> Combo description. </param>
1920
/// <param name="jobID"> Associated job ID. </param>
2021
/// <param name="order"> Display order. </param>
2122
/// <param name="memeName"> Display meme name </param>
2223
/// <param name="memeDescription"> Meme description. </param>
23-
internal CustomComboInfoAttribute(string fancyName, string description, byte jobID, [CallerLineNumber] int order = 0, string memeName = "", string memeDescription = "")
24+
internal CustomComboInfoAttribute(string name, string description, byte jobID, [CallerLineNumber] int order = 0)
2425
{
25-
FancyName = fancyName;
26+
Name = name;
2627
Description = description;
2728
JobID = jobID;
2829
Order = order;
29-
MemeName = memeName;
30-
MemeDescription = memeDescription;
3130
}
3231

3332
/// <summary> Gets the display name. </summary>
34-
public string FancyName { get; }
35-
36-
///<summary> Gets the meme name. </summary>
37-
public string MemeName { get; }
33+
public string Name { get; }
3834

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

42-
/// <summary> Gets the meme description. </summary>
43-
public string MemeDescription { get; }
44-
4538
/// <summary> Gets the job ID. </summary>
4639
public byte JobID { get; }
4740

4841
/// <summary> Gets the job role. </summary>
49-
public int Role => JobIDToRole(JobID);
42+
public int Role => CustomComboFunctions.JobIDs.JobIDToRole(JobID);
5043

51-
public uint ClassJobCategory => JobIDToClassJobCategory(JobID);
44+
public uint ClassJobCategory => CustomComboFunctions.JobIDs.JobIDToClassJobCategory(JobID);
5245

5346
private static int JobIDToRole(byte jobID)
5447
{
@@ -61,7 +54,7 @@ private static int JobIDToRole(byte jobID)
6154
private static uint JobIDToClassJobCategory(byte jobID)
6255
{
6356
if (Svc.Data.GetExcelSheet<ClassJob>().HasRow(jobID))
64-
return Svc.Data.GetExcelSheet<ClassJob>().GetRow(jobID).ClassJobCategory.Row;
57+
return Svc.Data.GetExcelSheet<ClassJob>().GetRow(jobID).ClassJobCategory.RowId;
6558

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

7265
/// <summary> Gets the job name. </summary>
73-
public string JobName => JobIDToName(JobID);
66+
public string JobName => CustomComboFunctions.JobIDs.JobIDToName(JobID);
7467

7568
public string JobShorthand => JobIDToShorthand(JobID);
7669

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

8578
if (ClassJobs.TryGetValue(key, out var job))
8679
{
87-
return job.Abbreviation.RawString;
80+
return job.Abbreviation.ToString();
8881
}
8982
else
9083
{
@@ -102,10 +95,10 @@ public static string JobIDToName(byte key)
10295
//Override DOH/DOL
10396
if (key is DOH.JobID) key = 08; //Set to Carpenter
10497
if (key is DOL.JobID) key = 16; //Set to Miner
105-
if (ClassJobs.TryGetValue(key, out ClassJob? job))
98+
if (ClassJobs.TryGetValue(key, out ClassJob job))
10699
{
107100
//Grab Category name for DOH/DOL, else the normal Name for the rest
108-
string jobname = key is 08 or 16 ? job.ClassJobCategory.Value.Name : job.Name;
101+
string jobname = key is 08 or 16 ? job.ClassJobCategory.Value.Name.ToString() : job.Name.ToString();
109102
//Job names are all lowercase by default. This capitalizes based on regional rules
110103
string cultureID = Svc.ClientState.ClientLanguage switch
111104
{

XIVSlothCombo/Attributes/ReplaceSkillAttribute.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ internal ReplaceSkillAttribute(params uint[] actionIDs)
1414
{
1515
foreach (uint id in actionIDs)
1616
{
17-
if (ActionWatching.ActionSheet.TryGetValue(id, out var action) && action != null)
17+
if (ActionWatching.ActionSheet.TryGetValue(id, out var action))
1818
{
19+
ActionIDs.Add(id);
1920
ActionNames.Add($"{action.Name}");
2021
ActionIcons.Add(action.Icon);
2122
}
2223
}
2324
}
2425

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

2729
internal List<ushort> ActionIcons { get; set; } = [];
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
namespace XIVSlothCombo.AutoRotation
2+
{
3+
public class AutoRotationConfig
4+
{
5+
public bool Enabled;
6+
public bool InCombatOnly = false;
7+
public bool BypassQuest = false;
8+
public bool BypassFATE = false;
9+
public int CombatDelay = 1;
10+
public DPSRotationMode DPSRotationMode;
11+
public HealerRotationMode HealerRotationMode;
12+
public HealerSettings HealerSettings = new();
13+
public DPSSettings DPSSettings = new();
14+
}
15+
16+
public class DPSSettings
17+
{
18+
public bool FATEPriority = false;
19+
public bool QuestPriority = false;
20+
public int? DPSAoETargets = 3;
21+
}
22+
23+
public class HealerSettings
24+
{
25+
public int SingleTargetHPP = 70;
26+
public int AoETargetHPP = 80;
27+
public int SingleTargetRegenHPP = 60;
28+
public int? AoEHealTargetCount = 2;
29+
public bool ManageKardia = false;
30+
public bool KardiaTanksOnly = false;
31+
public bool AutoRez = false;
32+
public bool AutoCleanse = false;
33+
public bool PreEmptiveHoT = false;
34+
35+
}
36+
}

0 commit comments

Comments
 (0)