Skip to content

Commit 1024338

Browse files
authored
Merge pull request #2 from FFXIV-CombatReborn/ExampleConfigs
Added all sections to GCD and oGCD and example configs
2 parents e41d21e + a8ca948 commit 1024338

File tree

3 files changed

+158
-49
lines changed

3 files changed

+158
-49
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/.vs/ExampleRotations
66
/ExampleRotations/obj
77
/ExampleRotations/bin/Debug
8+
/.vs
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"Author": "Churin",
3-
"Name": "ArgentiRotations",
2+
"Author": "ExampleAuthor",
3+
"Name": "ExampleRotations",
44
"Punchline": "A plugin for optimizing rotations.",
55
"Description": "This plugin helps optimize rotations for various classes in FFXIV.",
6-
"RepoUrl": "https://github.com/aventurescence/ArgentiRotations",
6+
"RepoUrl": "https://github.com/FFXIV-CombatReborn/ExampleRotations",
77
"Tags": [
88
"FFXIV",
99
"Dalamud",
1010
"Rotations"
1111
],
12-
"AssemblyVersion": "7.2.0.0",
13-
"DalamudApiLevel": 6,
12+
"AssemblyVersion": "7.2.5.0",
13+
"DalamudApiLevel": 12,
1414
"LoadPriority": 0
1515
}
Lines changed: 152 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,63 @@
11
using Dalamud.Interface.Colors;
2+
using System.ComponentModel;
23

34
namespace ExampleRotations.Healer;
45

56
[Rotation("Example", CombatType.PvE, GameVersion = "7.25")]
6-
[SourceCode(Path = "main/BasicRotations/Healer/WHM_Example.cs")]
7+
[SourceCode(Path = "main/ExampleRotations/Healer/WHM_Example.cs")]
78
[Api(5)]
89
public sealed class WHM_Example : WhiteMageRotation
910
{
1011
#region Config Options
11-
[RotationConfig(CombatType.PvE, Name = "Use GCDs to heal. (Ignored if you are the only healer in party)")]
12-
public bool GCDHeal { get; set; } = true;
12+
[RotationConfig(CombatType.PvE, Name = "Example true/false config")]
13+
public bool BoolExample { get; set; } = true;
14+
15+
[Range(0, 40, ConfigUnitType.Pixels)]
16+
[RotationConfig(CombatType.PvE, Name = "Example pixel config")]
17+
public float PixelExample { get; set; } = 10;
18+
19+
[Range(0, 40, ConfigUnitType.Seconds)]
20+
[RotationConfig(CombatType.PvE, Name = "Example time config")]
21+
public float TimeExample { get; set; } = 10;
22+
23+
[Range(3, 25, ConfigUnitType.Yalms)]
24+
[RotationConfig(CombatType.PvE, Name = "Example distance/yalm config")]
25+
public float DistanceExample { get; set; } = 5;
26+
27+
[Range(0, 1, ConfigUnitType.Percent)]
28+
[RotationConfig(CombatType.PvE, Name = "Example percentage config")]
29+
public float PercentageExample { get; set; } = 0.3f;
30+
31+
[Range(0, 10000, ConfigUnitType.None, 100)]
32+
[RotationConfig(CombatType.PvE, Name = "Example float config")]
33+
public float FloatValueExample { get; set; } = 1000;
34+
35+
[RotationConfig(CombatType.PvE, Name = "Example multi option config")]
36+
public Examplemultioptionconfig Examplemultioptionconfigset { get; set; } = Examplemultioptionconfig.Option1;
37+
public enum Examplemultioptionconfig : byte
38+
{
39+
[Description("Example option 1")]
40+
Option1,
41+
42+
[Description("Example option 2")]
43+
Option2,
44+
45+
[Description("Example option 3")]
46+
Option3,
47+
}
1348
#endregion
1449

1550
#region Tracking Properties
1651
public override void DisplayStatus()
1752
{
1853
ImGui.TextColored(ImGuiColors.DalamudViolet, "Rotation Tracking:");
19-
ImGui.Text($"GCDHeal: {GCDHeal}");
54+
ImGui.Text($"BoolExample: {BoolExample}");
55+
ImGui.Text($"PixelExample: {PixelExample}");
56+
ImGui.Text($"TimeExample: {TimeExample}");
57+
ImGui.Text($"DistanceExample: {DistanceExample}");
58+
ImGui.Text($"PercentageExample: {PercentageExample}");
59+
ImGui.Text($"FloatValueExample: {FloatValueExample}");
60+
ImGui.Text($"Examplemultioptionconfigset: {Examplemultioptionconfigset}");
2061
ImGui.TextColored(ImGuiColors.DalamudViolet, "Base Tracking:");
2162
base.DisplayStatus();
2263
}
@@ -31,39 +72,66 @@ public override void DisplayStatus()
3172
#endregion
3273

3374
#region oGCD Logic
75+
[RotationDesc()]
3476
protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
3577
{
3678

3779
return base.EmergencyAbility(nextGCD, out act);
3880
}
3981

40-
protected override bool GeneralAbility(IAction nextGCD, out IAction? act)
82+
[RotationDesc()]
83+
protected override bool InterruptAbility(IAction nextGCD, out IAction? act)
4184
{
4285

43-
return base.GeneralAbility(nextGCD, out act);
86+
return base.InterruptAbility(nextGCD, out act);
4487
}
4588

4689
[RotationDesc()]
47-
protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
90+
protected override bool DispelAbility(IAction nextGCD, out IAction? act)
4891
{
4992

50-
return base.DefenseAreaAbility(nextGCD, out act);
93+
return base.DispelAbility(nextGCD, out act);
5194
}
5295

5396
[RotationDesc()]
54-
protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)
97+
protected override bool AntiKnockbackAbility(IAction nextGCD, out IAction? act)
5598
{
5699

57-
return base.DefenseSingleAbility(nextGCD, out act);
100+
return base.AntiKnockbackAbility(nextGCD, out act);
101+
}
102+
103+
[RotationDesc()]
104+
protected override bool SpeedAbility(IAction nextGCD, out IAction? act)
105+
{
106+
107+
return base.SpeedAbility(nextGCD, out act);
108+
}
109+
110+
[RotationDesc()]
111+
protected override bool ProvokeAbility(IAction nextGCD, out IAction? act)
112+
{
113+
114+
return base.ProvokeAbility(nextGCD, out act);
115+
}
116+
117+
[RotationDesc()]
118+
protected override bool MoveForwardAbility(IAction nextGCD, out IAction? act)
119+
{
120+
121+
return base.MoveForwardAbility(nextGCD, out act);
122+
}
123+
124+
[RotationDesc()]
125+
protected override bool MoveBackAbility(IAction nextGCD, out IAction? act)
126+
{
127+
128+
return base.MoveBackAbility(nextGCD, out act);
58129
}
59130

60131
[RotationDesc()]
61132
protected override bool HealAreaAbility(IAction nextGCD, out IAction? act)
62133
{
63-
if (AquaveilPvE.CanUse(out act))
64-
{
65-
return true;
66-
}
134+
67135
return base.HealAreaAbility(nextGCD, out act);
68136
}
69137

@@ -74,15 +142,70 @@ protected override bool HealSingleAbility(IAction nextGCD, out IAction? act)
74142
return base.HealSingleAbility(nextGCD, out act);
75143
}
76144

145+
[RotationDesc()]
146+
protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
147+
{
148+
149+
return base.DefenseAreaAbility(nextGCD, out act);
150+
}
151+
152+
[RotationDesc()]
153+
protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)
154+
{
155+
156+
return base.DefenseSingleAbility(nextGCD, out act);
157+
}
158+
77159
protected override bool AttackAbility(IAction nextGCD, out IAction? act)
78160
{
79161

80162
return base.AttackAbility(nextGCD, out act);
81163
}
164+
165+
protected override bool GeneralAbility(IAction nextGCD, out IAction? act)
166+
{
167+
168+
return base.GeneralAbility(nextGCD, out act);
169+
}
82170
#endregion
83171

84172
#region GCD Logic
85173

174+
[RotationDesc()]
175+
protected override bool EmergencyGCD(out IAction? act)
176+
{
177+
178+
return base.EmergencyGCD(out act);
179+
}
180+
181+
[RotationDesc()]
182+
protected override bool MyInterruptGCD(out IAction? act)
183+
{
184+
185+
return base.MyInterruptGCD(out act);
186+
}
187+
188+
[RotationDesc()]
189+
protected override bool DispelGCD(out IAction? act)
190+
{
191+
192+
return base.DispelGCD(out act);
193+
}
194+
195+
[RotationDesc()]
196+
protected override bool RaiseGCD(out IAction? act)
197+
{
198+
199+
return base.RaiseGCD(out act);
200+
}
201+
202+
[RotationDesc()]
203+
protected override bool MoveForwardGCD(out IAction? act)
204+
{
205+
206+
return base.MoveForwardGCD(out act);
207+
}
208+
86209
[RotationDesc()]
87210
protected override bool HealAreaGCD(out IAction? act)
88211
{
@@ -97,6 +220,20 @@ protected override bool HealSingleGCD(out IAction? act)
97220
return base.HealSingleGCD(out act);
98221
}
99222

223+
[RotationDesc()]
224+
protected override bool DefenseAreaGCD(out IAction? act)
225+
{
226+
227+
return base.DefenseAreaGCD(out act);
228+
}
229+
230+
[RotationDesc()]
231+
protected override bool DefenseSingleGCD(out IAction? act)
232+
{
233+
234+
return base.DefenseSingleGCD(out act);
235+
}
236+
100237
protected override bool GeneralGCD(out IAction? act)
101238
{
102239

@@ -105,35 +242,6 @@ protected override bool GeneralGCD(out IAction? act)
105242
#endregion
106243

107244
#region Extra Methods
108-
public override bool CanHealSingleSpell
109-
{
110-
get
111-
{
112-
int aliveHealerCount = 0;
113-
IEnumerable<IBattleChara> healers = PartyMembers.GetJobCategory(JobRole.Healer);
114-
foreach (IBattleChara h in healers)
115-
{
116-
if (!h.IsDead)
117-
aliveHealerCount++;
118-
}
119-
120-
return base.CanHealSingleSpell && (GCDHeal || aliveHealerCount == 1);
121-
}
122-
}
123-
public override bool CanHealAreaSpell
124-
{
125-
get
126-
{
127-
int aliveHealerCount = 0;
128-
IEnumerable<IBattleChara> healers = PartyMembers.GetJobCategory(JobRole.Healer);
129-
foreach (IBattleChara h in healers)
130-
{
131-
if (!h.IsDead)
132-
aliveHealerCount++;
133-
}
134-
135-
return base.CanHealAreaSpell && (GCDHeal || aliveHealerCount == 1);
136-
}
137-
}
245+
138246
#endregion
139247
}

0 commit comments

Comments
 (0)