From 7aec135edfae2e1c3ea7fa8b8bfba85e53527292 Mon Sep 17 00:00:00 2001 From: Ryzzzen Date: Mon, 29 Oct 2018 16:51:13 +0100 Subject: [PATCH] GameClient: added #findPerkStyleByImage --- objects/riot/leagueoflegends/GameClient.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/objects/riot/leagueoflegends/GameClient.js b/objects/riot/leagueoflegends/GameClient.js index 3071d8f..0750e28 100644 --- a/objects/riot/leagueoflegends/GameClient.js +++ b/objects/riot/leagueoflegends/GameClient.js @@ -58,6 +58,11 @@ class GameClient { return Object.values(this.perks).find(x => x.iconPath.toLowerCase().includes(img.toLowerCase())); } + findPerkStyleByImage(img) { + return this.styles.find(x => x.iconPath.toLowerCase().includes(img.toLowerCase())); + } + + findPerkStyleByPerkId(id) { return this.styles.find(x => x.slots.some(y => y.perks.some(z => z === parseInt(id)))); }