Skip to content

Commit

Permalink
Array pokemonWithImages should be defined only once. (#2358)
Browse files Browse the repository at this point in the history
  • Loading branch information
sLoPPydrive authored and sebastienvercammen committed Nov 1, 2017
1 parent 3ca79f8 commit dbd377c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions static/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ const cryFileTypes = ['wav', 'mp3']

const genderType = ['♂', '♀', '⚲']
const unownForm = ['unset', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '!', '?']
const pokemonWithImages = [
3, 6, 9, 59, 65, 68, 89, 94, 103, 110, 112, 125, 126, 129, 131, 134,
135, 136, 143, 144, 145, 146, 150, 153, 156, 159, 243, 244, 245, 248, 249
]


/*
Expand Down Expand Up @@ -620,11 +624,6 @@ function isGymSatisfiesRaidMinMaxFilter(raid) {
}

function gymLabel(gym, includeMembers = true) {
const pokemonWithImages = [
3, 6, 9, 59, 65, 68, 89, 94, 103, 110, 112, 125, 126, 129, 131, 134,
135, 136, 143, 144, 145, 146, 150, 153, 156, 159, 243, 244, 245, 248, 249
]

const raid = gym.raid
var raidStr = ''
if (raid && raid.end > Date.now()) {
Expand Down Expand Up @@ -1110,10 +1109,6 @@ function setupGymMarker(item) {

function updateGymMarker(item, marker) {
let raidLevel = getRaidLevel(item.raid)
const pokemonWithImages = [
3, 6, 9, 59, 65, 68, 89, 94, 103, 110, 112, 125, 126, 129, 131, 134,
135, 136, 143, 144, 145, 146, 150, 153, 156, 159, 243, 244, 245, 248, 249
]
if (item.raid && isOngoingRaid(item.raid) && Store.get('showRaids') && raidLevel >= Store.get('showRaidMinLevel') && raidLevel <= Store.get('showRaidMaxLevel')) {
let markerImage = 'static/images/raid/' + gymTypes[item.team_id] + '_' + item.raid.level + '_unknown.png'
if (pokemonWithImages.indexOf(item.raid.pokemon_id) !== -1) {
Expand Down

0 comments on commit dbd377c

Please sign in to comment.