/// <summary> /// check whether a healer DPS be cancelled /// </summary> /// <returns></returns> public static bool CancelHealerDPS() { // allow combat setting is false, so cast originated by some other logic, so allow it to finish if (!SingularSettings.Instance.HealerCombatAllow) { return(false); } // always let DPS casts while solo complete WoWContext ctx = SingularRoutine.CurrentWoWContext; if (ctx == WoWContext.Normal) { return(false); } // allow casts that are close to finishing to finish regardless bool castInProgress = Spell.IsCasting(); if (castInProgress && Me.CurrentCastTimeLeft.TotalMilliseconds < 333) { Logger.WriteDebug("CancelHealerDPS: suppressing /cancel since less than 333 ms cast remaining"); return(false); } // allow casts that are close to finishing to finish regardless castInProgress = Spell.IsChannelling(); if (castInProgress && Me.CurrentChannelTimeLeft.TotalMilliseconds < 333) { Logger.WriteDebug("CancelHealerDPS: suppressing /cancel since less than 333 ms channel remaining"); return(false); } // use a window less than actual to avoid cast/cancel/cast/cancel due to mana hovering at setting level string action = castInProgress ? "^Cancelling DPS" : "!do-not-dps"; if (Me.ManaPercent < (SingularSettings.Instance.HealerCombatMinMana - 3)) { Logger.Write(LogColor.Hilite, "{0} because my Mana={1:F1}% fell below Min={2}%", action, Me.ManaPercent, SingularSettings.Instance.HealerCombatMinMana); return(true); } // check if group health has dropped below setting WoWUnit low = HealerManager.FindLowestHealthTarget(); if (low != null && low.HealthPercent < SingularSettings.Instance.HealerCombatMinHealth) { Logger.Write(LogColor.Hilite, "{0} because {1} @ {2:F1}% health fell below minimum {3}%", action, low.SafeName(), low.HealthPercent, SingularSettings.Instance.HealerCombatMinHealth); return(true); } return(false); }
static HealerManager() { // Make sure we have a singleton instance! Instance = new HealerManager(); }
// private static ulong _tankGuid; static HealerManager() { // Make sure we have a singleton instance! HealTargeting.Instance = Instance = new HealerManager(); }
private static WoWUnit FindUnitForAllowDpsCheck() { // return HealerManager.Instance.FirstUnit; return(HealerManager.FindLowestHealthTarget()); }