황성연

대전기록 이미지 불러오기

......@@ -241,7 +241,7 @@ module.exports = function(app){
var spec_selectedChamp_image = new Array();
var spec_summonerName = new Array();
var spec_spellId = new Array();
var spec_spellimage = new Array();
var spec_spell_image = new Array();
for(var i=0; i<10; i++){
spec_summonerName.push(spec_participants[i].summonerName);
spec_spellId.push(spec_participants[i].spell1Id);
......@@ -262,7 +262,7 @@ module.exports = function(app){
for(var i=0; i<20; i++) {
for(key in spell){
if(spell.hasOwnProperty(key) && spell[key].key == spec_spellId[i]){
spec_spellimage.push("http://ddragon.leagueoflegends.com/cdn/10.12.1/img/spell/"+spell[key].id+".png");
spec_spell_image.push("http://ddragon.leagueoflegends.com/cdn/10.12.1/img/spell/"+spell[key].id+".png");
}
}
}
......@@ -295,11 +295,12 @@ module.exports = function(app){
var match1_selectedChamp = new Array();
var match1_spellId = new Array();
var match1_summonerName = new Array();
var match1_kills = new Array();
var match1_deaths = new Array();
var match1_assists = new Array();
var match1_kda = new Array();
var match1_bannedChamp_image = new Array();
var match1_selectedChamp_image = new Array();
var match1_spell_image = new Array();
for(var i=0; i<2; i++){
var temp = match1_teams[i].bans;
for(var j=0; j<5; j++){
......@@ -312,9 +313,6 @@ module.exports = function(app){
match1_spellId.push(match1_participants[i].spell1Id);
match1_spellId.push(match1_participants[i].spell2Id);
match1_summonerName.push((match1_participantIdentities[i].player).summonerName);
match1_kills.push((match1_participants[i].stats).kills);
match1_deaths.push((match1_participants[i].stats).deaths);
match1_assists.push((match1_participants[i].stats).assists);
var obj = {
'k' : (match1_participants[i].stats).kills,
'd' : (match1_participants[i].stats).deaths,
......@@ -324,7 +322,27 @@ module.exports = function(app){
}
console.log(match1_kda);
for(var i=0; i<10; i++) {
for(key in champion) {
if(champion.hasOwnProperty(key) && champion[key].key == match1_bannedChamp[i]) {
match1_bannedChamp_image.push("http://ddragon.leagueoflegends.com/cdn/10.11.1/img/champion/"+champion[key].id+".png");
}
if(champion.hasOwnProperty(key) && champion[key].key == match1_selectedChamp[i]) {
match1_selectedChamp_image.push("http://ddragon.leagueoflegends.com/cdn/10.11.1/img/champion/"+champion[key].id+".png");
}
}
}
for(var i=0; i<20; i++) {
for(key in spell){
if(spell.hasOwnProperty(key) && spell[key].key == match1_spellId[i]){
match1_spell_image.push("http://ddragon.leagueoflegends.com/cdn/10.12.1/img/spell/"+spell[key].id+".png");
}
}
}
console.log(match1_bannedChamp_image);
console.log(match1_selectedChamp_image);
console.log(match1_spell_image);
var match2Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[1] + "?api_key=" + apikey;
......