Skip to content

Commit

Permalink
GameClient: added #findPerkStyleByImage
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryzzzen committed Oct 29, 2018
1 parent 85f2fc7 commit 7aec135
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions objects/riot/leagueoflegends/GameClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))));
}
Expand Down

0 comments on commit 7aec135

Please sign in to comment.