View Single Post
04-15-13, 03:36 AM   #34
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Phanx View Post
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.
My point is about which function can read thoose information faster, lets see if i want to check an event like capped a base with: "CHAT_MSG_BG_SYSTEM_ALLIANCE" or "CHAT_MSG_BG_SYSTEM_HORDE" or "CHAT_MSG_RAID_BOSS_EMOTE", which events gets triggered by another "events". And if i use:

Code:
local textureIndex = select(3, GetMapLandmarkInfo(i))
if textureIndex == 128 then

end
Then i used "slow function", and i still get the information faster then before the actual event triggers.
  Reply With Quote