private void SniperInfoReceived(object sender, SniperInfo sniperInfo) { WriteOutListeners(new List <SniperInfo>() { sniperInfo }); }
public PogoBotSniperInfo(SniperInfo info) { Latitude = info.Latitude; Longitude = info.Longitude; PokemonRarity = "Unknown"; PokemonName = info.Id.ToString(); PokemonId = info.Id.GetHashCode(); EncounterId = Convert.ToBase64String(Encoding.UTF8.GetBytes(info.GetHashCode().ToString())); // MjQxNTQwOTM0MzgzMTE4NDI1Mw SpawnPointId = Convert.ToBase64String(Encoding.UTF8.GetBytes(info.GetHashCode().ToString())); // 47c5e26b849 ExpirationJavaScript = JavaScriptTime(info.ExpirationTimestamp); // 1472874472000 Expiration = info.ExpirationTimestamp; PokemonTypes = new List <object>(); }
private SniperInfo map(Result result) { SniperInfo sniperInfo = new SniperInfo(); sniperInfo.id = (PokemonId)Enum.Parse(typeof(PokemonId), result.name, true); Match match = Regex.Match(result.coords, @"(?<lat>-?\d+\.?\d*)(?:\,|\s)+(?<long>-?\d+\.?\d*)"); if (match.Success) { sniperInfo.latitude = Convert.ToDouble(match.Groups["lat"].Value.Replace(',', '.'), CultureInfo.InvariantCulture); sniperInfo.longitude = Convert.ToDouble(match.Groups["long"].Value.Replace(',', '.'), CultureInfo.InvariantCulture); } sniperInfo.timeStamp = Convert.ToDateTime(result.until); return sniperInfo; }
private SniperInfo map(Result result) { SniperInfo sniperInfo = new SniperInfo(); PokemonId pokemonId = PokemonParser.parsePokemon(result.name); sniperInfo.id = pokemonId; GeoCoordinates geoCoordinates = GeoCoordinatesParser.parseGeoCoordinates(result.coords); if (geoCoordinates == null) { return null; } else { sniperInfo.latitude = geoCoordinates.latitude; sniperInfo.longitude = geoCoordinates.longitude; } sniperInfo.timeStamp = Convert.ToDateTime(result.until); return sniperInfo; }
public PogoBotSniperInfo(SniperInfo info) { if (info.ExpirationTimestamp.Equals(DateTime.MinValue)) { //info.ExpirationTimestamp = info.ExpirationTimestamp = DateTime.Now.AddMinutes(1); } IV = Convert.ToInt32(info.IV); Latitude = info.Latitude; Longitude = info.Longitude; PokemonRarity = ""; PokemonName = info.Id.ToString(); PokemonId = info.Id.GetHashCode(); EncounterId = Convert.ToBase64String(Encoding.UTF8.GetBytes("")); // TODO SpawnPointId = Convert.ToBase64String(Encoding.UTF8.GetBytes("")); // TODO ExpirationJavaScript = JavaScriptTime(info.ExpirationTimestamp); Expiration = info.ExpirationTimestamp; PokemonTypes = new List <object>(); }