I am new to the development side of things and have been trying to work on a small addon and I am not 100% sure what the best way to go about doing this part is.
I would like to detect when a group / raid member has died.
I tried using the COMBAT_LOG_EVENT_UNFILTERED and watching for the type UNIT_DIED however if I am to far away I dont see the log messages and this method isnt really a solid solution for me.
So is there a better event to monitor to detect this? I guess someone who has developed Unit Frames has a good idea of what I am looking to do here. Should I just go about an OnUpdate and have a polling interval just scan every X interval? If so what affects would I expect to see doing such a poll say every 1/2 second? Would it affect performance?
Hmm that's an idea... not a bad one I think. In fact I'm just thinking how to use that as a replacement for heal and damage stuff as well to get rid of that dreaded syncing.
Anyway, the right thing likely is to wait for the UNIT_ events rather than polling on update. Not sure if sensibly spaced onupdate checks or UNIT_HEALTH events are less loads, but intuitively UNIT_HEALTH is the right solution. When you get that event check for UnitIsDead() etc