Blizzard Nameplates - Threat

Blizzard Nameplates - Threat

133k Downloads

Never seen red nameplates

gabbsmo opened this issue ยท 14 comments

commented

First, thanks for excellent addon. Adds valuable information without adding clutter to the UI. I just wonder if I am using it wrong or it is actually a bug.

According to the description nameplates should turn red when healer have high threat. I have been tanking with the addon since Scarlet Monastery through LBRS and have not seen that once, not even if healer has aggro. I play on Classic Era.

commented

Ok I understand that there's a limitation in Classic Era.

Personally I like the idea of using the combat log. People don't always play according to class and specc, especially in era where there's no dual specc.

If it computationally expensive, maybe it's good enough to calculate this once per instance or party members change.

commented

Thanks! Yeah the Classic Era is a bit of a pickle, see PS at the bottom of comment #80 basically there is NO group role indicator in Classic Era, the only thing I have is the party/raid roster where group leader or main tank/assist is treated as a tank. I don't have anything indicating a healer role. That was only implemented for Wrath Classic + Retail sadly.

I'm still trying to come up with something to resemble a healer role, so if anyone has ideas feel free to reply here :) maybe I can assume certain classes are always healers but that is probably not accurate enough, and inspecting their talent build will quickly bloat the code I'm afraid. Maybe if I measure their healing done via combat log somehow, if it is greater than damage dealt they must be a healer role. Hmm.

commented

Alright, I have a first attempt of doing this now. Maybe you can help test it, since it only works when in a party/raid :)

You can download the latest NamePlatesThreat.lua from link below, then overwrite your current one in your addon folder:
https://github.com/int3ro/Nameplates_Threat/raw/mikfhan/NamePlatesThreat.lua

It scans the combat log and whenever a group member cast a healing spell (or heal over time ticks some healing) it adds that group member to a list of healer candidates, with the timestamp of their latest healing. Directly after this, anyone on the list newer than 60 seconds goes into the "HEALER" role, and anyone older goes back in the "DAMAGER" role. Group leaders and raid maintanks/assist are kept in the "TANK" role always, so you have to test this when the potential healer is not the group leader or raid maintank/assist. Do tell if it works or not :) and remember you MUST be in a group for it to work.

commented

I can test this next time I tank dungeon. Will let you know if there are any issues.

commented

Super, I just now 20:40 CET pushed a small CPU improvement to the same raw-file so you may want to redownload it from the link above before testing then /reload in chat after overwriting the lua file. And remember, you have to be group leader in the party to be detected as tank, or be assigned one of the maintank/assist roles in a raid.

commented

I have not forgotten about this, just have not been the tank in a dungeon group for a while. The green nameplates seem to work as they should, as well as yellow and gray but that was also the case before.

I have seen red bars. In one group it was red even if a hunter was the target. Could that be a bug? Maybe pet healing could have something to do with it.

commented

No rush, and good find! Indeed a bug - I've updated latest file above so now it should only count healers if they cast on another player (not themselves, and not pets) - you should be able to retest this even as a damager role if that's easier to find groups.

commented

Thanks! Just tested and now it seems to behave like I expect it to. Great work!

commented

I do get a prompt sometimes about addons causing errors. I suspect it might be your addon since it only happens in dungeons. I have installed BugGrabber and BugSack. Will report back when I have more information.

commented

Here is what BugGrabber collected:

2x ...terface\AddOns\NamePlatesThreat\NamePlatesThreat-3.2.lua:739: bad argument #2 to 'remove' (number expected, got string)
[string "=[C]"]: in function `remove'
[string "@Interface\AddOns\NamePlatesThreat\NamePlatesThreat-3.2.lua"]:739: in function <...terface\AddOns\NamePlatesThreat\NamePlatesThreat.lua:661>

Locals:
(*temporary) = <table> {
 1 = "party1"
 2 = "party1"
 3 = "party1"
 4 = "party1"
 5 = "party1"
 6 = "party1"
 7 = "party1"
 8 = "party1"
 9 = "party1"
 10 = "party1"
 11 = "party1"
 12 = "party1"
 13 = "party1"
 14 = "party1"
 15 = "party1"
 16 = "party1"
 17 = "party1"
 18 = "party1"
 19 = "party1"
 20 = "party1"
 21 = "party1"
 22 = "party1"
 23 = "party1"
 24 = "party1"
 25 = "party1"
 26 = "party1"
 27 = "party1"
 28 = "party1"
 29 = "party1"
 30 = "party2"
 31 = "party2"
 32 = "party2"
 33 = "party2"
 34 = "party2"
 35 = "party2"
 36 = "party2"
 37 = "party2"
 38 = "party2"
 39 = "party1"
 40 = "party2"
 41 = "party2"
 42 = "party1"
 43 = "party1"
 44 = "party1"
 45 = "party1"
 46 = "party1"
 47 = "party1"
 48 = "party1"
 49 = "party1"
 50 = "party1"
 51 = "party1"
 52 = "party1"
 53 = "party1"
 54 = "party1"
 55 = "party1"
 56 = "party1"
 57 = "party1"
 58 = "party1"
 59 = "party1"
}
(*temporary) = "party2"
(*temporary) = "number expected, got string"
491x ...terface\AddOns\NamePlatesThreat\NamePlatesThreat-3.2.lua:720: bad argument #2 to 'remove' (number expected, got string)
[string "=[C]"]: in function `remove'
[string "@Interface\AddOns\NamePlatesThreat\NamePlatesThreat-3.2.lua"]:720: in function <...terface\AddOns\NamePlatesThreat\NamePlatesThreat.lua:661>

Locals:
(*temporary) = <table> {
 1 = "party1"
 2 = "party2"
 3 = "party3"
 4 = "party4"
}
(*temporary) = "party1"
(*temporary) = "number expected, got string"
commented

Also saw red plates on a rouge today. Not sure what the reason could have been. Healing potions?

commented

Nasty, I think it's because I did a table.remove but misunderstood how to access. I've pushed an update to the file if you want to retry, the red rogue might just be a symptom of same problem. PTR servers for Classic Era are down now, so it was a blind commit without any code checks on my end - hoping it did not make it even worse :D

Long story short I now table.remove from old list of damagers/healers by the key/index instead of the unit/value whenever someone changes from one role to the other. Previously I did the table.remove wrong so that unit just kept piling up in the old or new list over time because the table.remove found nothing to remove.

commented

Tested tanking today and there was no error prompt this time :)

commented

Nice! Fingers crossed if nothing else pops up 3.5-release goes public after weekly reset 25th jan.