Example #1
0
        /// <summary>
        /// Change the state of out FSM
        /// </summary>
        private void WatchForStateChanges()
        {
            while (Active)
            {
                // Is me supposed to follow
                FollowCheck();

                // Bot stuff check
                BotStuffCheck();

                // Am I in combat
                InCombatCheck();

                // Do I need to release my spirit
                ReleaseSpiritCheck();

                // Am I dead?
                DeadCheck();

                // Do i need to buff
                if (AmeisenDataHolder.IsAllowedToBuff)
                {
                    try
                    {
                        CombatClass.HandleBuffs();
                    }
                    catch { }
                }

                AmeisenLogger.Instance.Log(LogLevel.VERBOSE, $"FSM: {StateMachine.GetCurrentState()}", this);
                Thread.Sleep(AmeisenDataHolder.Settings.stateMachineStateUpdateMillis);
            }
        }