Thread Tools Display Modes
04-25-22, 01:45 PM   #1
Ledii
A Deviate Faerie Dragon
 
Ledii's Avatar
Join Date: Apr 2013
Posts: 10
Unhappy 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.

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?
__________________
Take it as it comes...

Last edited by Ledii : 04-25-22 at 01:53 PM.
  Reply With Quote
04-25-22, 01:57 PM   #2
Ledii
A Deviate Faerie Dragon
 
Ledii's Avatar
Join Date: Apr 2013
Posts: 10
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.
__________________
Take it as it comes...
  Reply With Quote
04-27-22, 08:46 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
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.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 04-27-22 at 08:52 PM.
  Reply With Quote
04-28-22, 10:27 AM   #4
Ledii
A Deviate Faerie Dragon
 
Ledii's Avatar
Join Date: Apr 2013
Posts: 10
Thanks for the suggestion. I will play around and see what I can come up with.
__________________
Take it as it comes...
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Help retreiving COMBAT_LOG info

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off