@@ -553,11 +553,11 @@ private bool DoSkillMacro(out bool didAssail)
553553 }
554554
555555 // Min health percentage (ex: > 90%), skip if cannot use YET
556- if ( skill . MinHealthPercent . HasValue && skill . MinHealthPercent >= client . Stats . HealthPercent )
556+ if ( skill . MinHealthPercent . HasValue && skill . MinHealthPercent . Value >= client . Stats . HealthPercent )
557557 continue ;
558558
559559 // Max health percentage (ex < 2%), skip if cannot use YET
560- if ( skill . MaxHealthPercent . HasValue && client . Stats . HealthPercent > skill . MaxHealthPercent )
560+ if ( skill . MaxHealthPercent . HasValue && client . Stats . HealthPercent > skill . MaxHealthPercent . Value )
561561 continue ;
562562
563563 if ( client . SwitchToPanelAndWait ( skill . Panel , TimeSpan . FromSeconds ( 1 ) , out var didRequireSwitch , useShiftKey ) )
@@ -924,32 +924,28 @@ private SpellQueueItem GetNextSpell()
924924 private SpellQueueItem GetNextSpell_NoRotation ( bool skipOnCooldown = true )
925925 {
926926 if ( skipOnCooldown )
927- return spellQueue . FirstOrDefault ( spell => ! spell . IsOnCooldown ) ;
927+ return spellQueue . FirstOrDefault ( spell => ! spell . IsWaitingOnHealth && ! spell . IsOnCooldown ) ;
928928 else
929- return spellQueue . FirstOrDefault ( ) ;
929+ return spellQueue . FirstOrDefault ( spell => ! spell . IsWaitingOnHealth ) ;
930930 }
931931
932932 private SpellQueueItem GetNextSpell_SingularOrder ( bool skipOnCooldown = true )
933933 {
934934 if ( skipOnCooldown )
935- return spellQueue . FirstOrDefault ( spell => ! spell . IsOnCooldown && ! spell . IsDone ) ;
935+ return spellQueue . FirstOrDefault ( spell => ! spell . IsWaitingOnHealth && ! spell . IsOnCooldown && ! spell . IsDone ) ;
936936 else
937- return spellQueue . FirstOrDefault ( spell => ! spell . IsDone ) ;
937+ return spellQueue . FirstOrDefault ( spell => ! spell . IsWaitingOnHealth && ! spell . IsDone ) ;
938938 }
939939
940940 private SpellQueueItem GetNextSpell_RoundRobin ( bool skipOnCooldown = true )
941941 {
942- // All spells are done, nothing to cast
943- if ( spellQueue . All ( spell => spell . IsDone ) )
944- return null ;
945-
946- // All spells are on cooldown, and skipping so nothing to do
947- if ( spellQueue . All ( spell => spell . IsOnCooldown ) && skipOnCooldown )
942+ // All spells are unavailable, nothing to do
943+ if ( spellQueue . All ( spell => spell . IsWaitingOnHealth || spell . IsOnCooldown || spell . IsDone ) )
948944 return null ;
949945
950946 var currentSpell = spellQueue . ElementAt ( spellQueueIndex ) ;
951947
952- while ( currentSpell . IsDone || ( skipOnCooldown && currentSpell . IsOnCooldown ) )
948+ while ( currentSpell . IsWaitingOnHealth || currentSpell . IsDone || ( skipOnCooldown && currentSpell . IsOnCooldown ) )
953949 currentSpell = AdvanceToNextSpell ( ) ;
954950
955951 // Round robin rotation for next time
0 commit comments