Pokemon-Go-Rocket-API icon indicating copy to clipboard operation
Pokemon-Go-Rocket-API copied to clipboard

How to get lured pokemon on fort

Open bocahptualang opened this issue 8 years ago • 1 comments

How to get lured pokemon on lured fort?

bocahptualang avatar Jul 26 '16 22:07 bocahptualang

// first we need to get all map objects
var map = player.Map.GetMapObjects();
// after, let get ALL pokestops in map
var pokestops = map.MapCells.SelectMany(x => x.Fort).Where(i.Type == FortType.Checkpoint && i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime());
// now, lets find a pokestop lured and a lured pokemon =)
foreach (var pokestop in pokestops){
    if(pokestop.LureInfo != null) {
          //wow a lured pokestop
          var luredpokemon = pokestop.LureInfo.ActivePokemonId;
          // do what you want

    }
}

I hope this help :)

Corlobin avatar Jul 28 '16 19:07 Corlobin