Originally Posted by myrroddin
I think you have missed "tcontains", which is a table, but not defined anywhere.
|
No, "tContains" is a bad bloated function defined in Blizzard's UI code. While there may be some conceivable scenario where you really need to check if a value exists in an indexed table / array, this is not one of them; use a hash table instead:
Code:
local ignorezones = { [1152]=true, [1330]=true, [1153]=true, [1154]=true, [1158]=true, [1331]=true, [1159]=true, [1160]=true }
and a simple table lookup (instead of a function call + a loop + multiple table lookups + multiple equality checks):
Code:
if ignorezones[instanceMapID] then