View Single Post
09-24-14, 08:01 PM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
You only need to call it if you didn't actually witness the summoning event so it shouldn't be that bad, but it is relatively costly to do that kind of pattern matching.

Looping over the raid names could produce false positives if a member's name is part of another member's name (or their name was "Minion" or something).

You might want to only fall back on that if the first attempt fails.

If matching the apostrophe fails, then it would be faster to split the tooltip line on spaces and attempt to call UnitGUID on each result than looping over the entire raid looking for names.

Assuming the name is separated from the rest of the string by whitespace then it would be as effective as running find(UnitName('raid'..i)) but quite a bit faster.

Last edited by semlar : 09-24-14 at 08:13 PM.
  Reply With Quote