Skip to content

Commit 64313d5

Browse files
committed
micro-optimisations
1 parent 0fcc47d commit 64313d5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

XIVComboVX/Combos/RDM.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ private static uint noCastingSubCheck(byte level, bool engageCheck, bool holdOne
430430
return RDM.ViceOfThorns;
431431

432432
// Grand Impact is SPECIFICALLY excluded because it's a spell, not an ability, which makes it a GCD.
433-
// Therefore, since this helper can be used for moving OR for weaving, it should be handled by the AOE spell combo instead.
433+
// Therefore, since this helper can be used for moving OR for weaving, it should be handled by the caller instead.
434434

435435
if (level >= RDM.Levels.Fleche) {
436436
uint actionID = RDM.Fleche;
@@ -511,7 +511,7 @@ actionID is RDM.EnchantedZwerchhau or RDM.EnchantedRedoublement
511511
// This is basically universal.
512512
// I know it's a mess. Moving it into another method was basically the best I could do, since the whole thing is duplicated for weaving and moving but with different variables.
513513
bool
514-
engageCheck = IsEnabled(CustomComboPreset.RedMageSmartcastSingleTargetWeaveMelee) && weaving,
514+
engageCheck = IsEnabled(CustomComboPreset.RedMageSmartcastSingleTargetWeaveMelee),
515515
holdOneEngageCharge = IsEnabled(CustomComboPreset.RedMageSmartcastSingleTargetWeaveMeleeHoldOne),
516516
engageEarly = IsEnabled(CustomComboPreset.RedMageSmartcastSingleTargetWeaveMeleeFirst);
517517
uint alt = noCastingSubCheck(level, engageCheck, holdOneEngageCharge, engageEarly, targeting && isClose, accelWeave);
@@ -525,7 +525,7 @@ actionID is RDM.EnchantedZwerchhau or RDM.EnchantedRedoublement
525525
return actionID; // isFinishingAny is only true if the helper function assigned the appropriate actionID value
526526

527527
if (instacasting) {
528-
// TODO: need to account for hardcasting spells with no cast time!
528+
// This block covers instacasting as the result of a TIMED buff, and so should only replace with spells that NORMALLY have a (long) cast time.
529529

530530
if (level < RDM.Levels.Verthunder)
531531
return RDM.Jolt;
@@ -579,9 +579,11 @@ actionID is RDM.EnchantedZwerchhau or RDM.EnchantedRedoublement
579579
// Can't slowcast spells if you're moving, so we have to fall back to instants.
580580
// I know it's a mess. Moving it into another method was basically the best I could do, since the whole thing is duplicated for weaving and moving but with different variables.
581581
bool
582-
engageCheck = IsEnabled(CustomComboPreset.RedMageSmartcastSingleTargetMovementMelee) && moving,
582+
engageCheck = IsEnabled(CustomComboPreset.RedMageSmartcastSingleTargetMovementMelee),
583583
holdOneEngageCharge = IsEnabled(CustomComboPreset.RedMageSmartcastSingleTargetMovementMeleeHoldOne),
584584
engageEarly = IsEnabled(CustomComboPreset.RedMageSmartcastSingleTargetMovementMeleeFirst);
585+
// Note that this explicitly does NOT include Grand Impact, because that's GCD. This means that you'll first exhaust a bunch of things that are ALSO weavable before using GI.
586+
// Swiftcast, Acceleration, Engagement, Prefulgence, Vice of Thorns, Fleche, and Contra Sixte are ALL checked in here.
585587
uint alt = noCastingSubCheck(level, engageCheck, holdOneEngageCharge, engageEarly, targeting && isClose, accelMove);
586588
if (alt > 0)
587589
return alt;

0 commit comments

Comments
 (0)