Beispiel #1
0
        /// <summary>
        ///     Raises the <see cref="E:Update" /> event.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private void OnUpdate(EventArgs args)
        {
            try
            {
                if (Environment.TickCount - lastTick < 80)
                {
                    return;
                }
                lastTick = Environment.TickCount;

                WardDetector.OnTick();

                if (ObjectManager.Player.IsDead)
                {
                    return;
                }

                foreach (var skill in Variables.skills)
                {
                    if (skill.GetSkillMode() == SkillMode.OnUpdate)
                    {
                        skill.Execute(Orbwalker.LastTarget is Obj_AI_Base
                            ? Orbwalker.LastTarget as Obj_AI_Base
                            : null);
                    }
                }

                foreach (var module in Variables.ModuleList)
                {
                    if (module.ShouldGetExecuted() && module.GetModuleType() == ModuleType.OnUpdate)
                    {
                        module.OnExecute();
                    }
                }
            }
            catch (Exception e)
            {
            }
        }
Beispiel #2
0
        /// <summary>
        /// Raises the <see cref="E:Update" /> event.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void OnUpdate(EventArgs args)
        {
            try
            {
                if (Environment.TickCount - this.lastTick < 80)
                {
                    return;
                }
                this.lastTick = Environment.TickCount;

                WardDetector.OnTick();

                if (ObjectManager.Player.IsDead)
                {
                    return;
                }

                foreach (var skill in Variables.skills)
                {
                    if (skill.GetSkillMode() == SkillMode.OnUpdate)
                    {
                        skill.Execute(Variables.Orbwalker.GetTarget() is Obj_AI_Base ? Variables.Orbwalker.GetTarget() as Obj_AI_Base : null);
                    }
                }

                foreach (var module in Variables.ModuleList)
                {
                    if (module.ShouldGetExecuted() && module.GetModuleType() == ModuleType.OnUpdate)
                    {
                        module.OnExecute();
                    }
                }
            }
            catch (Exception e)
            {
                LogHelper.AddToLog(new LogItem("OnUpdate", e, LogSeverity.Error));
            }
        }