Hello everyone. I'm hoping I've found the right place to ask this question.
I am writing a mod and I want it to know if a particular Unit in question has been "tapped" by me or anyone in my group.
I want to use COMBAT_LOG_EVENT_UNFILTERED even to return all the Enemy Units being damaged by players. COMBAT_LOG_EVENT_UNFILTERED returns ALL damage being done by all players in the zone. So, I need to parse through that information and only pull out the Units that apply to my group.
I've tried IsTappedByGroup() API but this requires me to have some sort of target. I know the proper usage is IsTappedByGroup("target") or ("mouseover") etc...But my problem is I may not be targeting the unit. I just need to know without targeting the unit or having another player target the unit WHO my group is in combat with. I've tried passing the name of the mob to the API like so:
EnemyUnit = select(7,...)
if IsTappedByGroup(EnemyUnit) then
This won't work because arg7 returns the name of the unit. It needs the UnitID which is the 64 bit Hex value. So, I found out that arg6 of COMBAT_LOG_EVENT_UNFILTERED actually returns this information. I passed it to the IsTappedBygroup() API and still...nothing.
So IsTapped() is useless to me because I do not want to check if a target is tapped. I want to check if any Enemy Unit from COMBAT_LOG_EVENT_UNFILTERED is tapped by my party.
Something like this.
If event == "COMBAT_LOG_EVENT_UNFILTERED" then
local eventType = select(forgot the arg#) --combat event type
local sourceName = select(forgot the arg#) --player doing the damage
local destName = select(forgot the arg#) --Unit taking damage
if ((eventType == "SPELL_DAMGE") or (eventType == "SWING_DAMGE") or
(eventType == "RANGE_DAMGE")) and IsTappedByPlayer(destName) then
-- CODE HERE
I cannot pass the destName of the Unit taking damage like that nor can I pass the GUID as you stated. I can't pass "target" either because I am a priest and wont be really targeting Units, only players. So then I figured, I can get the target of my target. But realistically that wont work either what if my target has no target. I need a concrete way to check if a Unit is tapped.
You have to create a way of checking other people's targets. Like "raid12target" or similar. Target chaining (or focus or mouseover) would most likely be the only way to get a UnitID from the combat log. But it wouldn't really work for enemy players because it would probably be impossible to create a chain to get to that unit.
Yeah. Hmm. Id have to create a function to pass through all the members in the Players group/party and check against their "target". The point of the addon is to gather information about mobs/bosses such as amount of money dropped, loot items dropped, times you've taken them down etc...Now in an instance combat_log_even_unfiltered is safe because the only people doing damage is your group. But say you're doing dailies and you want to track the # of times you've killed a "wretched fiend" and how much silver it dropped total and how much on average along with what greens its dropped. You need to parse through other players crap to do this. So, for simplcity sake I may just make this an instance only mod for now - test it make sure it works then add outside instance capabilities. Does this sort of mod seem useful or has anyone written such a thing?
I'm kind of out of touch when it comes to what AddOns are out there. I like to create my own addons regardless if ones exist with the same functionality becaues I get satisfaction out of doing it myself hehe. Also, they suit your needs exactly!