From 6a3dbb66a34414f1205177d9dc5abb3af0a293fd Mon Sep 17 00:00:00 2001 From: Ryzzzen Date: Mon, 29 Oct 2018 16:51:25 +0100 Subject: [PATCH] ChampionGG: perk styles fixed --- objects/providers/ChampionGG.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/providers/ChampionGG.js b/objects/providers/ChampionGG.js index 10bbc80..7e12ffe 100644 --- a/objects/providers/ChampionGG.js +++ b/objects/providers/ChampionGG.js @@ -83,8 +83,8 @@ class ChampionGGProvider extends Provider { $("img[src*='perk-images']", $("div[class^=Slot__LeftSide]")).each(function(index) { let page = Math.trunc(index / 8), perk = $(this).attr("src").slice(38); - if (index % 8 === 0) pages[page].primaryStyleId = Mana.gameClient.perks.find(x => x.icon === perk).id; - else if (index % 8 === 5) pages[page].subStyleId = Mana.gameClient.perks.find(x => x.icon === perk).id; + if (index % 8 === 0) pages[page].primaryStyleId = Mana.gameClient.findPerkStyleByImage(perk).id; + else if (index % 8 === 5) pages[page].subStyleId = Mana.gameClient.findPerkStyleByImage(perk).id; else pages[page].selectedPerkIds.push(Mana.gameClient.findPerkByImage(perk).id); });