Originally Posted by nick78
I am not very good at LUA, but I have to use something like this as custom code in WeakAuras. So I have four questions:
1. How do I have to name the item location like?
2. Where can I check for the powerID's?
3. Is there a possibility to ask if a specific azerite trait was selected on ANY item instead of a specific one?
4. What are the results of "the selected azerite trait is actually selected / not selected"? "true" and "false"?
In the end, I need something like this:
|
Hope you found the answer already. If not here is what I use:
Code:
local function isPowerLearned(powerid)
local isSelected
for _, itemLocation in AzeriteUtil.EnumerateEquipedAzeriteEmpoweredItems() do
isSelected = C_AzeriteEmpoweredItem.IsPowerSelected(itemLocation, powerid)
if isSelected then return true end
end
return false
end
If you are just throwing it in a WA trigger you could change it to:
Code:
function()
local isSelected
for _, itemLocation in AzeriteUtil.EnumerateEquipedAzeriteEmpoweredItems() do
isSelected = C_AzeriteEmpoweredItem.IsPowerSelected(itemLocation, powerid)
if isSelected then return true end
end
return false
end
Both of these return true or false based on if powerid is selected.