Exemplo n.º 1
0
        internal static bool Pulse()
        {
            try
            {
                // Load CC:
                CombatClass.LoadCombatClass();

                // FSM
                Fsm.States.Clear();

                Fsm.AddState(new Pause {
                    Priority = 200
                });
                Fsm.AddState(new FightHostileTargetDamageDealerOnly {
                    Priority = 30
                });
                Fsm.AddState(new SpecializationCheck {
                    Priority = 20
                });
                Fsm.AddState(new LevelupCheck {
                    Priority = 10
                });
                Fsm.AddState(new Idle {
                    Priority = 0
                });

                foreach (var statePlugin in Plugins.ListLoadedStatePlugins)
                {
                    Fsm.AddState(statePlugin);
                }

                Fsm.States.Sort();
                Fsm.StartEngine(12, "FSM Damage Dealer");

                return(true);
            }
            catch (Exception e)
            {
                try
                {
                    Dispose();
                }
                catch
                {
                }
                Logging.WriteError("Damage Dealer > Bot > Bot  > Pulse(): " + e);
                return(false);
            }
        }