Showing
1 changed file
with
11 additions
and
5 deletions
... | @@ -241,17 +241,15 @@ module.exports = function(app){ | ... | @@ -241,17 +241,15 @@ module.exports = function(app){ |
241 | var spec_selectedChamp_image = new Array(); | 241 | var spec_selectedChamp_image = new Array(); |
242 | var spec_summonername = new Array(); | 242 | var spec_summonername = new Array(); |
243 | var spec_spellId = new Array(); | 243 | var spec_spellId = new Array(); |
244 | + var spec_spellimage = new Array(); | ||
244 | for(var i=0; i<10; i++){ | 245 | for(var i=0; i<10; i++){ |
245 | spec_summonername.push(spec_participants[i].summonerName); | 246 | spec_summonername.push(spec_participants[i].summonerName); |
246 | spec_spellId.push(spec_participants[i].spell1Id); | 247 | spec_spellId.push(spec_participants[i].spell1Id); |
247 | spec_spellId.push(spec_participants[i].spell2Id); | 248 | spec_spellId.push(spec_participants[i].spell2Id); |
248 | } | 249 | } |
249 | - console.log(spec_spellId); | ||
250 | - | ||
251 | 250 | ||
252 | for(var i=0; i<10; i++) { | 251 | for(var i=0; i<10; i++) { |
253 | - | 252 | + for(key in champion) { |
254 | - for(var key in champion) { | ||
255 | if(champion.hasOwnProperty(key) && champion[key].key == spec_bannedChamp[i].championId) { | 253 | if(champion.hasOwnProperty(key) && champion[key].key == spec_bannedChamp[i].championId) { |
256 | spec_bannedChamp_image.push("http://ddragon.leagueoflegends.com/cdn/10.11.1/img/champion/"+champion[key].id+".png"); | 254 | spec_bannedChamp_image.push("http://ddragon.leagueoflegends.com/cdn/10.11.1/img/champion/"+champion[key].id+".png"); |
257 | } | 255 | } |
... | @@ -259,8 +257,16 @@ module.exports = function(app){ | ... | @@ -259,8 +257,16 @@ module.exports = function(app){ |
259 | spec_selectedChamp_image.push("http://ddragon.leagueoflegends.com/cdn/10.11.1/img/champion/"+champion[key].id+".png"); | 257 | spec_selectedChamp_image.push("http://ddragon.leagueoflegends.com/cdn/10.11.1/img/champion/"+champion[key].id+".png"); |
260 | } | 258 | } |
261 | } | 259 | } |
262 | - | ||
263 | } | 260 | } |
261 | + | ||
262 | + for(var i=0; i<20; i++) { | ||
263 | + for(key in spell){ | ||
264 | + if(spell.hasOwnProperty(key) && spell[key].key == spec_spellId[i]){ | ||
265 | + spec_spellimage.push("http://ddragon.leagueoflegends.com/cdn/10.12.1/img/spell/"+spell[key].id+".png"); | ||
266 | + } | ||
267 | + } | ||
268 | + } | ||
269 | + console.log(spec_spellimage); | ||
264 | } | 270 | } |
265 | 271 | ||
266 | var matchUrl = "https://kr.api.riotgames.com/lol/match/v4/matchlists/by-account/" + accountId + "?api_key=" + apikey; | 272 | var matchUrl = "https://kr.api.riotgames.com/lol/match/v4/matchlists/by-account/" + accountId + "?api_key=" + apikey; | ... | ... |
-
Please register or login to post a comment