Ideas for an identifier-system for EVENT_COMBAT_EVENT
Hey guys, I'm in dire need of your think-tank-abilities. This is the code, that I have:
Code:
function AuraMastery.OnCombatEvent(eventCode,result,isError,abilityName,abilityGraphic,abilityActionSlotType,sourceName,sourceType,targetName,targetType,hitValue,powerType,damageType,combatEventLog,sourceUnitId,targetUnitId,abilityId) Let's take this as an example: 3 DKs debuffed a target with their dots. The appropriate table would look like this: Code:
AuraMastery.activeCombatEffects = {} As EVENT_COMBAT_EVENT does not give any effectSlot information, there is no way to identify the appropriate effect that has faded :/ using the timestamp does not really work, as a debuff will not only fade if it runs out, but also if it is prematurely refreshed by it's caster. For data processing reasons AuraMastery.activeCombatEffects must remain an array, it will be walked through by a for-loop later. Some ideas would be really nice! |
Can't you use unitids ?
|
Well, I had an aproach using unitIds as keys when I started writing the addon and I found them to be extremely unreliable. Although I cannot tell anymore, why I came to that conclusion :/
I'll check it out again, I think. |
Never used the event so far so sorry if I understand something wrong.
Are you able to detemrine the name of the caster from the event? What is "sourceName" giving you as the information? Maybe a table key like this would help: Lua Code:
Or you'll just iterate over the entries with Lua Code:
|
Quote:
@Baertram: Same problem with your idea :( Fade-events don't give any source info, it only contains info on the unit the effect faded from. If a target is debuffed by 3 DKs and only one debuff fades, using the target's unitId or unitName would match all 3 entries and not only the relevant one. To clarify more: |
Seems as if there is no way then and the refresh part needs to be fixed so it shows the unitTag of the "refresher" too.
|
Well, I am just thinking of ways to write a function that does sth. with timestamps or endtime or a combination of some fields, but I don't have a specific idea :/
|
Endtime is your only chance here, I'd say.
Or listen to combat events that often fire for effects as well. that way you might get the unitId too. But crossreferencing those two events is going to be pretty messy. |
Quote:
|
All times are GMT -6. The time now is 12:37 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI