private static void discoverTaxi(FlightMasterDB flightMasterToDiscover)
    {
        FNVFlightMasterSettings.Load();
        List <FlightMasterDB> FMLdt = fillDB();

        if (wManager.Wow.Bot.Tasks.GoToTask.ToPosition(flightMasterToDiscover.position, 3.5f, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore))
        {
            wManager.Wow.Bot.Tasks.GoToTask.ToPosition(flightMasterToDiscover.position, 3.5f, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore);

            if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(flightMasterToDiscover.position, flightMasterToDiscover.NPCId, -1, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore, false))
            {
                wManager.wManagerSetting.ClearBlacklistOfCurrentProductSession();
                wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(flightMasterToDiscover.position, flightMasterToDiscover.NPCId, -1, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore, false);

                if (ObjectManager.Me.IsMounted)
                {
                    wManager.Wow.Bot.Tasks.MountTask.DismountMount(false, false, 100);
                }

                Usefuls.SelectGossipOption(GossipOptionsType.taxi);
                Thread.Sleep(Usefuls.Latency + 1500);

                while (_updateNodes)
                {
                    Logging.Write("[VanillaFLightMaster]: Taxi node update in progress...");
                    Thread.Sleep(10000);
                }

                Logging.Write("[VanillaFlightMaster]: Flight Master " + flightMasterToDiscover.name + " discovered");
                flightMasterToDiscover.alreadyDiscovered = true;
                FNVFlightMasterSettings.flightMasterSaveChanges(flightMasterToDiscover, true);

                Thread.Sleep(Usefuls.Latency * 5);

                timer = 0;
                //_timer = true;
                discoverTaxiNode     = (FlightMasterDB)null;
                _taxiToDiscover      = false;
                _discoverInProessing = false;
                _discoverTaxiTimer   = true;
                Reenable();
                return;
            }
        }
        _discoverInProessing = false;
        return;
    }
Exemple #2
0
 // Token: 0x06000003 RID: 3
 public void Initialize()
 {
     Logging.Write("[tbcFlightMaster]: Flight Master initialized - " + this.version);
     Main._isLaunched           = true;
     Main.inProcessing          = false;
     Main._copySettings         = true;
     Main._runScan              = true;
     Main._updateNodes          = false;
     Main.cancelCheckPathThread = false;
     Main.ingameSettings();
     this.watchForEvents();
     FNVFlightMasterSettings.Load();
     Main.applyDefaultNodes();
     MovementEvents.OnMovementPulse += Main.MovementEventsOnOnMovementPulse;
     MovementEvents.OnSeemStuck     += Main.MovementEventsOnOnSeemStuck;
     this.scanNearbyTaxi.Start();
     this.flightMasterLoop();
 }
    public void Initialize()
    {
        Logging.Write("[VanillaFlightMaster]: Flight Master initialized - " + version);
        _isLaunched           = true;
        inProcessing          = false;
        _copySettings         = true;
        _runScan              = true;
        _updateNodes          = false;
        cancelCheckPathThread = false;

        ingameSettings();
        watchForEvents();
        FNVFlightMasterSettings.Load();
        applyDefaultNodes();
        MovementEvents.OnMovementPulse += MovementEventsOnOnMovementPulse;
        MovementEvents.OnSeemStuck     += MovementEventsOnOnSeemStuck;

        scanNearbyTaxi.Start();
        flightMasterLoop();
    }
 public void Settings()
 {
     FNVFlightMasterSettings.Load();
     FNVFlightMasterSettings.CurrentSettings.ToForm();
     FNVFlightMasterSettings.CurrentSettings.Save();
 }