private void FixedMode_Update(SkillCooldown sk) { if (Settings.ClassWindowSettings.Enabled && ClassManager.StartSpecialSkill(sk)) { return; } if (!Settings.CooldownWindowSettings.Enabled) { return; } var hSkill = HiddenSkills.ToSyncArray().FirstOrDefault(x => x.IconName == sk.Skill.IconName); if (hSkill != null) { return; } var skill = MainSkills.FirstOrDefault(x => x.Skill.IconName == sk.Skill.IconName); if (skill != null) { if (sk.Pre) { skill.Start(sk.Cooldown, CooldownMode.Pre); } else { skill.Start(sk.Cooldown); } return; } skill = SecondarySkills.ToSyncArray().FirstOrDefault(x => x.Skill.IconName == sk.Skill.IconName); if (skill != null) { if (sk.Pre) { skill.Start(sk.Cooldown, CooldownMode.Pre); } else { skill.Start(sk.Cooldown); } return; } UpdateOther(sk); }
public void ResetSkill(Skill skill) { if (!Settings.CooldownWindowSettings.Enabled) { return; } if (Settings.CooldownBarMode == CooldownBarMode.Normal) { return; } var sk = MainSkills.FirstOrDefault(x => x.Skill.IconName == skill.IconName) ?? SecondarySkills.FirstOrDefault(x => x.Skill.IconName == skill.IconName); sk?.ProcReset(); }
private bool FixedMode_Update(Cooldown sk) { if (SettingsHolder.ClassWindowSettings.Enabled && ClassManager.StartSpecialSkill(sk)) { return(false); } if (!SettingsHolder.CooldownWindowSettings.Enabled) { return(false); } var hSkill = HiddenSkills.ToSyncList().FirstOrDefault(x => x.Skill.IconName == sk.Skill.IconName); if (hSkill != null) { return(false); } var skill = MainSkills.FirstOrDefault(x => x.Skill.IconName == sk.Skill.IconName); if (skill != null) { if (skill.Duration == sk.Duration && !skill.IsAvailable && sk.Mode == skill.Mode) { return(false); } skill.Start(sk); return(true); } skill = SecondarySkills.ToSyncList().FirstOrDefault(x => x.Skill.IconName == sk.Skill.IconName); if (skill != null) { if (skill.Duration == sk.Duration && !skill.IsAvailable && sk.Mode == skill.Mode) { return(false); } skill.Start(sk); return(true); } return(UpdateOther(sk)); }
public void ResetSkill(Skill skill) { if (!SettingsHolder.CooldownWindowSettings.Enabled) { return; } if (SettingsHolder.CooldownBarMode == CooldownBarMode.Normal) { return; } Dispatcher.BeginInvoke(new Action(() => { if (ClassManager.ResetSpecialSkill(skill)) { return; } var sk = MainSkills.FirstOrDefault(x => x.Skill.IconName == skill.IconName) ?? SecondarySkills.FirstOrDefault(x => x.Skill.IconName == skill.IconName); sk?.ProcReset(); })); }