View Single Post
04-15-13, 02:56 AM   #33
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Because the server tells the client that someone capped the base, just like the server tells the client that the spell you just cast crit for X damage. However, that's completely irrelevant, because addons are not aware of the server at all. As far as addons are concerned, the base wasn't capped until the client learned about it and fired the relevant event.

Anyway, this is a really idiotic turn for this discussion to take, since nothing mentioned in this thread has anything whatsoever to do with server querying. IsInInstance gets info from the client, not the server, and select is a Lua language function and thus completely unrelated to either the client or the server.

99% of functions get info directly from the client. Even for functions like GetItemInfo where you can ask the client for information it doesn't have, and the client will ask the server for it, addons aren't aware of the server querying process -- as far as your addon is concerned, the item you asked about just doesn't exist at that time. Since you know about the server, you can program your addon to wait 5 seconds and ask the client again, but your addon can't automatically go "oh, the client doesn't have this info, it's getting it from the server, let me wait 5 seconds". Latency is a network issue; it has absolutely nothing to do with the speed of calling a function vs looking up a table value.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote