zeryl wrote:Wouldn't it be best to make it the name of your realm rather than saying unknown for all of them? Especially since Blizzard decided it would be better to return Nil rather than your realm name.
I don't know a good way to really determine the difference between the two, other than some sort of range check (using a max-range spell), and from there determine if they are "out-of-sight" for setting realm name.
Actually, under the current system you may be correct.
Since the target is selected using TargetByName("name", exactMatch) we run into this possibility:
If there is no close match available then an error message is displayed (Error event?) and the target is left unchanged.
which means we are likely only picking the correct target when they are in visible range which also means there is a
high probability that any NIL returns for the realm are the result of players being on the same server so the code would make more sense as:
- Code: Select all
if(v.realm == NIL) then
v.realm = realm;
end
However, this may all be mute point anyway since the system needs to be changed to pull the information without using the TargetByName("name", exactMatch) function as this will no longer work in combat post-BC
---