Open Nico-Mayer opened 4 months ago
@KnutZuidema Yea i also think this is a bug or just bad naming in the riot api.
What kind of comment would you want to add here to make it clear? :)
@Nico-Mayer just that the ChampionID
field is also the champion key in some use cases.
This pull request adds a function to retrieve champion data by passing the champion key as a function parameter. This change addresses an issue with the current implementation of
CurrentGameParticipant.GetChampion
, which internally callsclient.GetChampionById
. Although this might initially seem correct, it is problematic due to the misleading naming of the fields in Data Dragon. ThechampionId
should be a string representing the code name of the champion, while the returned value in the documentation is the champion key as a number.This update corrects this behavior, ensuring that champions are returned correctly.