public double GetCoolDownPrecent(GameState_FFXIV ffxiv) { return(CoolDownPercent == 0 ? (ffxiv.Player.CastingPercentage == 0 ? 1 : ffxiv.Player.CastingPercentage) : (CoolDownPercent / 100D)); }
private void setModifKeys(EffectLayer layer, ActionStructure[] actions, DeviceKeys[] deviceKeys, GameState_FFXIV ffxiv) { if (!actions.Any()) { return; } var scalar = actions.Select(t => t.GetCoolDownPrecent(ffxiv)).Max(); layer.Set(deviceKeys, ColorUtils.MultiplyColorByScalar(Properties.PrimaryColor, scalar)); if (actions.Any(t => t.IsProcOrCombo)) { layer.Set(deviceKeys, ColorUtils.MultiplyColorByScalar(Properties.Combo, scalar)); } if (!actions.Any(t => t.InRange)) { layer.Set(deviceKeys, ColorUtils.MultiplyColorByScalar(Properties.OutOfRange, scalar)); } if (!actions.Any(t => t.IsAvailable)) { layer.Set(deviceKeys, Properties.NotAvailable); } }