Thread: Addon help
View Single Post
09-20-15, 01:45 PM   #17
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by Caellian View Post
So basically, you're saying something like this would suffice ? (untested, drycoded)
Since the GUID could potentially contain any of those numbers, rather than string.find it would be better to match the ID portion of the GUID specifically.

Something like this, or instead of using "tonumber" just convert the npc IDs in your table to strings.
Lua Code:
  1. if tonumber(string.match(GUID, '%-(%d+)%-[^-]+$')) == champions[id + 1] then
  Reply With Quote