AdiAddons / LibPlayerSpells-1.0

WoW addon library - additional information about player spells.
GNU General Public License v3.0
14 stars 23 forks source link

Request for lookup via provider spellId #120

Closed ShmooDude closed 4 years ago

ShmooDude commented 6 years ago

There doesn't seem to be any way to look up based on the providerId?

Ashamane's Frenzy for example, has a spellId of 210722 and applies aura 210723. However, the lookup is tied to the aura ID, meaning I can't look up information on Ashamane's Frenzy without knowing it's aura ID for the GetSpellInfo(spellId) function. Alternatively, I'd have to iterate through provider IDs from IterateSpells() and then look it up based on the returned spell ID that matches the provider ID I'm looking for.

Now, granted spells can apply multiple auras so it'd probably be best to make a new function. Something like GetProviderInfo(providerId) that returns the same information as GetSpellInfo() but as an array(s) in case of multiple provided spells.

Rainrider commented 6 years ago

The providers are directly accessible through the LibPlayerSpells-1.0 object: /dump LibStub('LibPlayerSpells-1.0).__providers. The keys are auraIDs, the values are spellIDs or tables there of, if there are multiple providers for the same aura.