Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Pokemon.get_perfect = (radio, filtros,lat,lng,iv) => {
- var queryfiltros = "";
- var queryiv = "";
- iv = 100;
- var filtroiv = 0;
- if (iv === undefined)
- {
- // No se filtra por IV
- }
- else
- {
- if(iv === 0){
- // No se filtra por IV
- }
- else
- {
- var calciv = iv * 45 / 100;
- queryiv = ' WHERE ((individual_attack + individual_defense + individual_stamina) >= ' + calciv + ' OR pokemon_id = 201)';
- }
- }
- const query = 'SELECT weather_boosted_condition,individual_attack,move_1,move_2,individual_defense,individual_stamina,longitude,latitude,pokemon_id, disappear_time,cp,cp_multiplier FROM ' + tablename + ' ' + queryiv + ' AND disappear_time > UTC_TIMESTAMP();';
- const params ="";
- // Return promise.
- return preparePokemonPromise(query, params);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement