WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Help retreiving COMBAT_LOG info (https://www.wowinterface.com/forums/showthread.php?t=59108)

Ledii 04-25-22 01:45 PM

Help retreiving COMBAT_LOG info
 
Hi. Whenever I receive an event from COMBAT_LOG_EVENT I would like to obtain the level of the sourceGUID / sourceName.
I know I can obtain this information from my current target. But I need it to work without manual targeting involved.
I'm collecting statistics on how much damage each individual enemy dealt to you during the fight.
Is this possible in any way what so ever?

The most intuitive way I could think of doing this would ofc. be UnitLevel(sourceGUID / sourceName).
But from what I found through my research that is not allowed for what ever messed up reason. :mad:

If I cast spells myself, I could always cache my target and assume my next hit on the same GUID is the target info I just had. But if a random extra enemy enters mid-fight, I want to be able to get at least the name and level from that enemy. But preferably things like UnitCreatureType as well for aesthetic reasons.

Any suggestions here?

Ledii 04-25-22 01:57 PM

My current fallback plan
 
If I'm not able to find a way to retrieve this information immediately I will most likely end up storing the unique guids and statistics tied to that in some tables. And eventually, IF and only IF I target this enemy GUID will I be able to fetch the required data and validate the data entry.

SDPhantom 04-27-22 08:46 PM

There isn't a way to get a unit's level directly from a GUID, you need a UnitID. You can try to cache data using target, nameplates, and mouseover along with watching UNIT_TARGET events for party/raid targets. The only problem is memory management and deciding how long to hold on to such data.

Note: Focus was left out of the list because the unit has to be accessible from any of the others in order for it to be set.

Ledii 04-28-22 10:27 AM

Thanks for the suggestion. I will play around and see what I can come up with.


All times are GMT -6. The time now is 03:48 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI