List of units in combat with me
Hiya!
Title says pretty much all. Can you get a list of units in combat with me? To be honest, I know you can use a nameplate to search for units, but AFAIK this can only be done if the nameplate is enabled (visible). Thus I would like to ask if there is any other technique to obtain the list. -Engavi |
Looks like you might be able to use the combat log
http://www.wowinterface.com/forums/s...ad.php?t=34248 From 2010, but the idea is to scan the combat log for attacks that have you as the destination. It wouldn't tell you about units that have aggroed on you but haven't attacked you, however. If you're in a party you can probably do as that thread says and also scan for enemies attacking party members, since that would normally put you in combat with them as well. |
Thank you Ammako
But, doesn't being aggroed also mean that I'm in a combat? That's bit sad it won't track those units :( |
Register for UNIT_THREAT_LIST_UPDATE, then use UnitThreatSituation('player', unit), where unit is supplied as the first argument by the event.
Seems redundant to be scanning the combat log for something like this. |
Quote:
The closest you can get to tracking what you're in combat with is to monitor the combat log for every hostile interaction between your group and enemies, storing their GUID in a table, and purging units when they die or haven't been seen within a certain timeframe. |
i've come up with this solution
Lua Code:
where ns.data.current is a table that is filled per COMBAT_LOG_EVENT_UNFILTERED and emptied on PLAYER_REGEN_ENABLED in this case we can now check ns.checkPartyCombat() which returns either true or false. for reference here's the whole thing core.lua |
So, the best would still be analyzing the COMBAT_LOG_EVENT_UNFILTERED. That would be super exciting, but super complex at the same time :p
Guess I'll have to take a time to study it. Thanks guys!! -Engavi |
All times are GMT -6. The time now is 11:37 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI