-
Notifications
You must be signed in to change notification settings - Fork 12
TFT Traits
Antoine CLOP edited this page Aug 20, 2020
·
1 revision
The following endpoints provide all details about traits in Team Fight Tactics. It also includes icons for each one of them.
- TraitInfos(byId: TFTTraitId) -> TFTTraitInfo?
- TraitInfos(byName: String) -> TFTTraitInfo?
- AllTraitInfos() -> [TFTTraitInfo]
TraitInfos (by TFTTraitId)
- TFTTraitId: The unique identifier for a TFT Trait.
The function will run synchronously and returns a TFTTraitInfo if found, nil otherwise. You can then access the icon of this trait with the property icon
let trait = league.tftAPI.getTraitInfos(byId: TFTTraitId("Set3_Blademaster"))
if let trait = trait {
print("Success!")
} else {
print("Trait no found")
}
- ByName: The name of a trait.
The function will run synchronously and returns a TFTTraitInfo if found, nil otherwise. You can then access the icon of this trait with the property icon
let trait = league.tftAPI.getTraitInfos(byName: "Blademaster")
if let trait = trait {
print("Success!")
} else {
print("Trait no found")
}
The function will run synchronously and returns all traits of TFT in a TFTTraitInfo Array.
let traits = league.tftAPI.getAllTraitInfos()