private static void OnHarass() { var harassTarget = TargetSelector.GetTarget(SkillsHandler.Spells[SpellSlot.Q].Range, TargetSelector.DamageType.Magical); if (!ManaManager.CanHarass()) { return; } if (harassTarget.IsValidTarget()) { if (GetMenuValue <bool>("kassadin.harass.useQ") && harassTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.Q].Range) && SkillsHandler.Spells[SpellSlot.Q].IsReady()) { SkillsHandler.Spells[SpellSlot.Q].CastOnUnit(harassTarget); } if (GetMenuValue <bool>("kassadin.harass.useE") && harassTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) && SkillsHandler.Spells[SpellSlot.E].IsReady() && ECanCast) { SkillsHandler.Spells[SpellSlot.E].Cast(harassTarget.ServerPosition); } } }
private static void OnHarass() { var harassTarget = TargetSelector.GetTarget(SkillsHandler.QShard.Range, TargetSelector.DamageType.Magical); if (!ManaManager.CanHarass() && !ManaManager.PlayerHasPassive()) { return; } if (harassTarget.IsValidTarget()) { if (GetMenuValue <bool>("lissandra.harass.useQ") && harassTarget.IsValidTarget(SkillsHandler.QShard.Range) && SkillsHandler.Spells[SpellSlot.Q].IsReady()) { var predictionPosition = SkillsHandler.GetQPrediction(harassTarget); if (predictionPosition != null) { //Found a valid Q prediction SkillsHandler.Spells[SpellSlot.Q].Cast((Vector3)predictionPosition); } } if (GetMenuValue <bool>("lissandra.harass.useW") && harassTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.W].Range) && SkillsHandler.Spells[SpellSlot.W].IsReady()) { SkillsHandler.Spells[SpellSlot.W].Cast(); } if (GetMenuValue <bool>("lissandra.harass.useE") && harassTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) && SkillsHandler.Spells[SpellSlot.E].IsReady()) { if (!EActive) { SkillsHandler.Spells[SpellSlot.E].CastIfHitchanceEquals(harassTarget, CustomHitChance); } } } }