UnitOwner (GUID), identifying guardians and pets.
View Single Post
09-24-14, 08:01 PM
A Pyroguard Emberseer
Join Date: Sep 2007
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
View Public Profile
Send a private message to semlar
Find More Posts by semlar