ascott18 / TellMeWhen

TellMeWhen is a combat tracking AddOn for World of Warcraft Retail and Classic
https://wow.curseforge.com/projects/tellmewhen
GNU General Public License v3.0
83 stars 11 forks source link

[Bug] Torghast Multi-Talent Powers Not Registering as Talented. #1840

Closed Basilmoyh closed 3 years ago

Basilmoyh commented 3 years ago

What version of TellMeWhen are you using? v9.0.3

What steps will reproduce the problem? In Torghast, as a Survival Hunter, I got the power "Huntmaster's Gift" which gives free access to the the Talent "Guerrilla Tactics". I already had "Guerrilla Tactics" selected and chose "Hydra's Bite" in addition. In this case, despite having both talents selected, TMW no long registers "Guerrilla Tactics" as being talented, "Hydra's Bite" was registered.

From what I could tell, this is working as intended, and instead I would need to track active Torghast powers instead which I don't think is possible in TMW without writing custom Lua. I wrote my own (inelegant) Lua to get the job done.

for i = 1,255 do
    local name = UnitBuff("PLAYER", i, "MAW")    
    if name == "Huntmaster's Gift" then
        return true
    elseif name == "" then
        return false
    end            
end
return false
ascott18 commented 3 years ago

This is indeed not working as it should and I'll fix it when I get a chance, but regarding your code - checking name == "" as your loop break condition won't work - you'd need to check name == nil. As your code is written, it will always loop 255 times.