View Single Post
  #2  
Unread 04-19-2019, 08:19 PM
Thurallor's Avatar
Thurallor Thurallor is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2013
Posts: 202
Interesting idea. I didn't notice that function, back when I was trying to get target effects to work.

I don't think you can create the objects directly; nor is there any enumeration of all possible effects. I think the best you can do is save all of the effects into a hash as you receive them from EffectAdded events or EffectList:Get(). Of course, if you are maintaining that hash, there's no reason to call the Contains() function. Just do a direct hash table lookup.

In case it's not clear, I mean maintaining a list of the form

Code:
{
   [effectObject1] -> true,
   [effectObject2] -> true,
   [effectObject3] -> true
   ...
}
so you can use Lua's built-in hash function to see if an effectObject is present in the list.

I still have my fingers crossed that the situation will be improved in U24.

Last edited by Thurallor : 04-19-2019 at 08:23 PM.
Reply With Quote