Ejemplo n.º 1
0
        public override void Start()
        {
            Debug("BotEvent OnStart");
            HbRelogApi = new HBRelogApi();
            CacheStaticLookUp.InitalizedCache = false;
            BehaviorManager.Reset();
            Common.ResetCommonBehaviors();
            ObjectCacheManager.ResetCache(true);
            TargetManager.Reset();
            GarrisonManager.Reset();
            QuestHelper.QuestLog.Clear();
            LuaEvents.ResetFrameVariables();

            if (!LuaEvents.LuaEventsAttached)
            {
                LuaEvents.AttachLuaEventHandlers();
            }
        }
Ejemplo n.º 2
0
        public override async Task <bool> BehaviorRoutine()
        {
            if (await base.BehaviorRoutine())
            {
                return(true);
            }
            if (IsDone)
            {
                return(false);
            }

            if (_shouldCheckMapId && Player.MapId == _destinationMapId)
            {
                GarrisonBase.Debug("UseFlightPath is finished due to matching map ids");
                IsDone = true;
                if (_currentMapId == 1153 || _currentMapId == 1159 || _currentMapId == 1331 || _currentMapId == 1330)
                {
                    //Reset Cache (Garrison was last location)
                    ObjectCacheManager.ResetCache();
                    TargetManager.Reset();
                }
                return(false);
            }

            if (TaxiFlightHelper.TaxiNodes.Count > 0 && _selectedTaxiNode == null && await CheckFlightNodes())
            {
                return(true);
            }

            if (await VerifyFlightNpc())
            {
                return(true);
            }

            if (await UseFlightPath())
            {
                return(true);
            }

            return(false);
        }