Skip to content

Commit

Permalink
Add Level to Notifications when IV info is present (#2371)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomballgithub authored and sebastienvercammen committed Jan 27, 2018
1 parent 57d4902 commit 3a116fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions static/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ const excludedRaritiesList = [
<prc> - iv in percent without percent symbol
<atk> - attack as number
<def> - defense as number
<sta> - stamnia as number
<sta> - stamina as number
<lvl> - level as number
*/
var notifyIvTitle = '<pkm> <prc>% (<atk>/<def>/<sta>)'
var notifyIvTitle = '<pkm> <prc>% (<atk>/<def>/<sta>) (L<lvl>)'
var notifyNoIvTitle = '<pkm>'

/*
Expand Down Expand Up @@ -1012,9 +1013,10 @@ function getTimeUntil(time) {

function getNotifyText(item) {
var iv = getIv(item['individual_attack'], item['individual_defense'], item['individual_stamina'])
var find = ['<prc>', '<pkm>', '<atk>', '<def>', '<sta>']
var find = ['<prc>', '<pkm>', '<atk>', '<def>', '<sta>', '<lvl>']
var pokemonlevel = (item['cp_multiplier'] !== null) ? getPokemonLevel(item['cp_multiplier']) : 0
var replace = [((iv) ? iv.toFixed(1) : ''), item['pokemon_name'], item['individual_attack'],
item['individual_defense'], item['individual_stamina']]
item['individual_defense'], item['individual_stamina'], pokemonlevel]
const showStats = Store.get('showPokemonStats')
var ntitle = repArray(((showStats && iv) ? notifyIvTitle : notifyNoIvTitle), find, replace)
var dist = moment(item['disappear_time']).format('HH:mm:ss')
Expand Down

0 comments on commit 3a116fb

Please sign in to comment.