AutoSharp.Plugins.Heimerdinger.OnUpdate C# (CSharp) Method

OnUpdate() public method

public OnUpdate ( EventArgs args ) : void
args System.EventArgs
return void
        public override void OnUpdate(EventArgs args)
        {
            if (ComboMode)
            {
                if (R.IsReady() && !Rcast)
                {
                    R.Cast();
                    Rcast = true;
                }
                if (W.IsReady() && Target.IsValidTarget(W.Range))
                {
                    var pred = W.GetPrediction(Target);
                    W.Cast(pred.CastPosition);
                    Rcast = false;
                }
                if (E.IsReady() && Target.IsValidTarget(E.Range))
                {
                    var pred = E.GetPrediction(Target);
                    E.Cast(pred.CastPosition);
                    Rcast = false;
                }
                if (Q.IsReady() && Player.CountEnemiesInRange(1300) >= 2)
                {
                    var rnd = new Random(Environment.TickCount);
                    Pos.X = Player.Position.X + rnd.Next(-50, 50);
                    Pos.Y = Player.Position.Y + rnd.Next(-50, 50);
                    Q.Cast(Pos.To3D());
                    Rcast = false;
                }
            }
        }