Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summon Fairy and Fairy Action consolidation #19

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9258d91
added summons and fairy actions
CostasAK Aug 12, 2020
4819feb
corrected sch summon feature flag
CostasAK Aug 12, 2020
a43c866
corrected current highest flag
CostasAK Aug 12, 2020
c05ba0e
added whispering dawn replacement
CostasAK Aug 12, 2020
b8ca6c9
separated sch summon options
CostasAK Aug 12, 2020
dc22802
typo
CostasAK Aug 12, 2020
a8da757
increased current max flag
CostasAK Aug 12, 2020
591f299
added checks for eos and selene
CostasAK Aug 12, 2020
26fb5c3
joined eos and selene. can't think of a scenario when you'd only want…
CostasAK Aug 12, 2020
b3454eb
preliminary conditionals for sch summon
CostasAK Aug 12, 2020
999bb30
typo
CostasAK Aug 12, 2020
5b35a57
correct logic in comment
CostasAK Aug 12, 2020
d9a7760
Merge pull request #1 from attickdoor/master
CostasAK Aug 12, 2020
0cc230c
wrote basic knowledge to find eos/selene. need to check owner still a…
CostasAK Aug 13, 2020
cfeb130
restored energy drain replacer
CostasAK Aug 13, 2020
0527b42
Update XIVCombo.csproj
CostasAK Aug 14, 2020
1b2e501
Update XIVCombo.csproj
CostasAK Aug 14, 2020
406580c
restored csproj
CostasAK Aug 14, 2020
d75c2e9
added check for owner and seraph
CostasAK Aug 14, 2020
1d0ec2d
change fairy actions instead of summons, to make it more similar to o…
CostasAK Aug 14, 2020
ab1f75e
change fairy actions instead of summons, to make it more similar to o…
CostasAK Aug 14, 2020
19e2bcc
whitelisted fairy actions
CostasAK Aug 14, 2020
978da27
added conditionals to prevent looping through the actor table unneces…
CostasAK Aug 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion XIVComboPlugin/Configuration/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace XIVComboPlugin
{
//CURRENT HIGHEST FLAG IS 54
//CURRENT HIGHEST FLAG IS 57
[Flags]
public enum CustomComboPreset : long
{
Expand Down Expand Up @@ -145,6 +145,9 @@ public enum CustomComboPreset : long
[CustomComboInfo("ED Aetherflow", "Change Energy Drain into Aetherflow when you have no more Aetherflow stacks", 28, new uint[] { SCH.EnergyDrain })]
ScholarEnergyDrainFeature = 1L << 37,

[CustomComboInfo("Summon Fairy", "Change Summon Eos/Serene into Whispering Dawn/Fey Illumination when either fairy is summoned", 28, new uint[] { SCH.WhisperingDawn, SCH.FeyIllumination })]
ScholarSummonFeature = 1L << 57,

// DANCER
[CustomComboInfo("AoE GCD procs", "DNC AoE procs turn into their normal abilities when not procced", 38, new uint[] { DNC.Bloodshower, DNC.RisingWindmill })]
DancerAoeGcdFeature = 1L << 32,
Expand Down
52 changes: 52 additions & 0 deletions XIVComboPlugin/IconReplacer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,56 @@ private ulong GetIconDetour(byte self, uint actionID)
return SCH.EnergyDrain;
}

// Change Fairy actions if a fairy is already summoned.
if (Configuration.ComboPresets.HasFlag(CustomComboPreset.ScholarSummonFeature))
{
var fairySummoned = false;

// No need to check for fairy if not a SCH
if (job == 28)
{
// No need to check actors if Seraph guage is up, or Dissipation (791 / 0x0317) is active. Check for the Dissipation buff or the gauge/dismissed status produces the exact same result.
if (clientState.JobGauges.Get<SCHGauge>().SeraphTimer > 0 || clientState.JobGauges.Get<SCHGauge>().DismissedFairy != 0)
fairySummoned = true;
else
{
var playerId = clientState.LocalPlayer.ActorId;

// 0th entry is self, can be skipped
for (var i = 1; i < clientState.Actors.Length; i++)
{
var actor = clientState.Actors[i];

if (actor == null)
continue;

if (actor is Dalamud.Game.ClientState.Actors.Types.NonPlayer.BattleNpc bnpc)
{
// Keep looking for Seraph, to prevent flashing the summon commands when she is leaving the battlefield
if (bnpc.OwnerId == playerId && (String.Equals(bnpc.Name, "Eos") || String.Equals(bnpc.Name, "Selene") || String.Equals(bnpc.Name, "Seraph")))
{
fairySummoned = true;
break;
}
}
}
}
}

if (actionID == SCH.WhisperingDawn)
{
if (fairySummoned && level >= 20)
return SCH.WhisperingDawn;
return SCH.SummonEos;
}
if (actionID == SCH.FeyIllumination)
{
if (fairySummoned && level >= 40)
return SCH.FeyIllumination;
return SCH.SummonSelene;
}
}

// DANCER

// AoE GCDs are split into two buttons, because priority matters
Expand Down Expand Up @@ -1097,6 +1147,8 @@ private void PopulateDict()
customIds.Add(17209);
customIds.Add(7501);
customIds.Add(21);
customIds.Add(16537); // Whispering Dawn
customIds.Add(16538); // Fey Illumination
customIds.Add(DNC.Bloodshower);
customIds.Add(DNC.RisingWindmill);
customIds.Add(RDM.Verstone);
Expand Down
6 changes: 5 additions & 1 deletion XIVComboPlugin/JobActions/SCH.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ public const uint
FeyBless = 16543,
Consolation = 16546,
EnergyDrain = 167,
Aetherflow = 166;
Aetherflow = 166,
SummonEos = 17215,
SummonSelene = 17216,
WhisperingDawn = 16537,
FeyIllumination = 16538;
}
}