View Single Post
12/02/16, 02:37 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
@cloudor
Maybe built an internal table with unique "groundtarget eventid = ability's id" when the event gets first fired. Insert a boolean value into the table like

local myAddon.activeGroundTargetAbilities = {
[abilityid of ground target here] = boolean value,
}

Set it to true if the ability is not in the table yet and the events fires the 1st time.
Check if it's in the table by "if myAddon.activeGroundTargetAbilities[ability id] then" and remove it if the event fires the 2nd time.
You're able to react on the ground target ability ids this way at the 2nd time if the event callback function parameters are always the same

Be sure to clear the table at realoadui (maybe inside callback function of player activated event) and where needed in between.
  Reply With Quote