private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender.IsAlly || !(sender is AIHeroClient) || args.Target == null || !args.Target.IsMe || Player.GetSpell(SpellSlot.W).State != SpellState.Ready) { return; } var spell = TargetSpellDatabase.GetByName(args.SData.Name); if (spell != null && _targetedMenu[spell.Name + "/eyas"] != null && _targetedMenu[spell.Name + "/eyas"].Cast <CheckBox>().CurrentValue) { if (spell.Delay == 0) { Player.CastSpell(SpellSlot.W, sender.Position); return; } Core.DelayAction(() => Player.CastSpell(SpellSlot.W, sender.Position), spell.Delay); } }
private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender.IsAlly || !(sender is AIHeroClient) || args.Target == null || !args.Target.IsMe || Player.GetSpell(SpellSlot.W).State != SpellState.Ready) { return; } var spell = TargetSpellDatabase.GetByName(args.SData.Name); if (spell != null && TargetedMenu[spell.Name + "/e"] != null && TargetedMenu[spell.Name + "/e"].Cast <CheckBox>().CurrentValue) { Core.DelayAction(delegate { Player.CastSpell(SpellSlot.W, sender.Position); }, (int) ((Player.Instance.Distance(sender) - 100 / args.SData.MissileSpeed > 0 ? args.SData.MissileSpeed : 2000) * 1000 > 1 ? (Player.Instance.Distance(sender) - 100 / args.SData.MissileSpeed > 0 ? args.SData.MissileSpeed : 2000) * 1000 : 0)); } }