• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • FateBot Auto-Blacklisted Fates

    Discussion in 'Community Developer Forum' started by Wheredidigo, Jul 1, 2015.

    1. Wheredidigo

      Wheredidigo Community Developer

      Joined:
      Dec 15, 2013
      Messages:
      417
      Likes Received:
      8
      Trophy Points:
      18
      Mastahg,

      Sometimes, FateBot will automatically add a Fate to the BlackList because RB can't find a viable path to the Fate (for example, if you're doing Fates by Costa Del Sol, it will BlackList the Fates by WinePort's side of the map since it can't navigate to them).

      The problem I'm having is that it doesn't actually add them to the FatebotSettings.Instance.BlackListedFates collection.

      I currently have the following code to check if Fates are available so that I can start the Patrol portion of my Destiny Plugin.

      Code:
      private static bool FatesAreAvailable()
              {
                  var activeFates =
                      FateManager.ActiveFates.Where(
                          x =>
                              x.Level >= (Core.Me.ClassLevel - Settings.Instance.MinLevel) &&
                              x.Level <= (Core.Me.ClassLevel + Settings.Instance.MaxLevel) &&
                              !FatebotSettings.Instance.BlackListedFates.Contains(x.Name)
                              ).ToList();
                  var monsterSlayingFates = new List<FateData>();
                  var bossFates = new List<FateData>();
                  var escortFates = new List<FateData>();
      
                  if (Settings.Instance.MonsterSlayingEnabled)
                  {
                      monsterSlayingFates = activeFates.Where(x => x.IsValid && x.Icon == FateIconType.Battle).ToList();
                  }
                  if (Settings.Instance.BossEnabled)
                  {
                      bossFates =
                          activeFates.Where(
                              x =>
                                  x.IsValid && x.Icon == FateIconType.Boss &&
                                  x.Progress >= Settings.Instance.BossPercentRequired).ToList();
                  }
                  if (Settings.Instance.EscortEnabled)
                  {
                      escortFates =
                          activeFates.Where(
                              x => x.IsValid && (x.Icon == FateIconType.ProtectNPC || x.Icon == FateIconType.ProtectNPC2))
                              .ToList();
                  }
      
                  var availableFates = monsterSlayingFates.Union(bossFates.Union(escortFates));
      
                  return availableFates.Any();
              }
      
      Can you tell me where I can look for the Fates that FateBot auto-blacklists so that I can get the above code to consider them as well when checking if Fates are available.
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      We don't add temporary blacklists to the permanent settings file. Stored in the global blacklist class.

      Blacklist.Contains(fate.Id, BlacklistFlags.Node)
       
    3. Wheredidigo

      Wheredidigo Community Developer

      Joined:
      Dec 15, 2013
      Messages:
      417
      Likes Received:
      8
      Trophy Points:
      18
      Thanks, that's what I needed.
       

    Share This Page