Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Checks if the element for a skill is close enough to the desired element to wait for it.
- /// </summary>
- /// <param name="skill">skill to check the damage type element of</param>
- /// <param name="element">element you want to be the current element</param>
- /// <param name="start"> we can cast for this long before the specified element starts</param>
- /// <param name="finish"> we can cast for this long after the specified element starts</param>
- /// <returns></returns>
- public static bool ShouldWaitForConventionofElements(Skill skill, Element element = Element.Unknown, int start = 0, int finish = 4000)
- {
- if (!Settings.Combat.Misc.UseConventionElementOnly)
- return false;
- if (!TargetUtil.AnyBossesInRange(200f))
- return false;
- if (!Legendary.ConventionOfElements.IsEquipped)
- return false;
- if (GetHasBuff(SNOPower.Pages_Buff_Infinite_Casting))
- return false;
- if (Settings.Combat.Misc.IgnoreCoEunlessGRift && ZetaDia.CurrentRift.Type != RiftType.Greater)
- return false;
- var theElement = element == Element.Unknown ? skill.Element : element;
- var timeTo = TimeToElementStart(theElement);
- var timeSince = TimeFromElementStart(theElement);
- var totalDuration = GetConventionRotation().Count*4000;
- if (timeTo < start)
- return false;
- if (timeSince < finish)
- return false;
- //if (timeTo - start > skill.Cooldown.TotalMilliseconds &&
- // skill.Cooldown.TotalMilliseconds < totalDuration)
- // return false;
- if ((timeTo - start) > GetRealCooldown(skill) &&
- GetRealCooldown(skill) < totalDuration)
- {
- return false;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement