Troubles checking debuff on raid members
Hello,
I have made a custom tiny addon just for my personal use. (It helps me getting better with addon making) My goal is to put a symbol on the 4 players who got the debuff "Controlled Burn" (used by the first boss of the new raid) But despite what I tried, I can't get it working... Here is my actual code so far: Lua Code:
|
You assume people are in a raid, yet you aren't checking for that. Before line 4, you need a check for IsInRaid(). If that returns true, then you can iterate your group members.
|
You need to call CombatLogGetCurrentEventInfo() inside CLEU event to get the combat log payload nowadays. (You can also get the destName from here instead of using unit GUID, which doesnt work for unit ID functions, but destName/srcName does aslong as they're in your raid.)
Idk if its a typo with the elseif event, but "SPELL_AURA_REMOVED" is the sub event from CombatLogGetCurrentEventInfo(), not main event just incase. Also unless im too tired, spellID is the 10th argument not 11th for UnitDebuff. Where do you call UpdateRaidDebuffList? See https://warcraft.wiki.gg/ for latest up to date API documentation. Other sites are outdated. |
Oh, maybe it's not the right spot for spellId, where can I get the info? because on the combatlog events page on wiki I can't find it or it shown as first.. idk why
Yes, It was a bad pasta, my bad: Lua Code:
|
Combat log event handling looks like this now:
lua Code:
The spellId I were refering to earlier is the one inside your UpdateRaidDebuffList function, but not in the combat log event, that one is correct. Is 'castSuccess' a special variable return thats required for Controlled Burn? If you don't need it, the script can be simplified a lot. (Arguments for table.remove also seems incorrect, its missing the index you want to remove) Let me know and I can post a full example later. For future cases, you might also want to look into the UNIT_AURA event. This is generally the event you want for these kind of things unless you need to track units that are not in your group or not currently targetted. |
All times are GMT -6. The time now is 12:09 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI