Thread Tools Display Modes
11/23/15, 05:00 PM   #1
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
[outdated] unitId's

Any chance we could get something to help us determine when targets, unitId's, no longer exist? An event of some kind that fires when unitId's are destroyed perhaps. That way we know when to clear any data related to that target. Or at least a function to determine if a unitId still exists (both would be great), like:
Lua Code:
  1. EVENT_UNITID_DESTROYED
  2. DoesUnitIdExist(unitId)

Also a function to differentiate between different unit types (player, monsters, pets, other players, exc..) using unitId would be very helpful.
Lua Code:
  1. GetUnitIdType(unitId)
For example right now EVENT_EFFECT_CHANGED passes us:
Lua Code:
  1. function OnEffectChanged(eventCode, changeType, effectSlot, effectName, unitTag, beginTime, endTime, stackCount, iconName, buffType, effectType, abilityType, statusEffectType, unitName, unitId, abilityId)
The unitId does help us differentiate between different units, but we have no idea what those units are. For example when a unit receives an effect that is not currently targeted the unitTag field is nil so we can't use GetUnitType(unitTag) so we have no way of knowing if the effect was on a mob, pet, or another player.


While I'm at it I would also like to see some unitTags for player pets. I would love to create some pet addons for monitoring pets.
 
12/12/15, 07:23 PM   #2
coolmodi
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 47
You could try use the EVENT_COMBAT_EVENT for that. 2260 and 2262 are the "die" results, maybe that could be used to clear those unitIds then.

Edit: Looking back at my comment it's really no help, I'd like to be able to clear out changed IDs too now, and getting the unitType without guesswork would also be neat :/

Last edited by coolmodi : 01/08/16 at 08:58 PM.
 

ESOUI » Developer Discussions » Wish List » [outdated] unitId's


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