-
Posted by ns66 on Thu, 07 Oct 2010 15:49:32
Hi, when I do Ctrl-V, I can see name plates of nearby players, how do I get those frames?
thanks!
-
Posted by jnwhiteh on Thu, 07 Oct 2010 17:17:46
I am very confused. You originally asked a question about an addon, but now you have edited your post and 100% removed all of that. I don't understand why.
As for player's nameplates, the short answer is that you can't get at that, it's incredibly difficult, cumbersome, and very inefficient. What are you trying to accomplish?
-
Posted by ns66 on Thu, 07 Oct 2010 19:38:31
sorry, I figured out the answer to my original question, so this is the current question I have
-
Posted by jnwhiteh on Thu, 07 Oct 2010 19:40:47
Then perhaps you could answer the question I asked, since without it I can't hope to answer yours. Why do you want to do this, what SPECIFICALLY are you trying to do?
-
Posted by ns66 on Thu, 07 Oct 2010 19:46:45
when user Ctrl-V to see the name plates of nearby mobs, I like to know if I can add additional information on those name plates, that's why i like to somehow get the list (which is dynamic depends on the distance of player vs mob)
thanks
-
Posted by jnwhiteh on Thu, 07 Oct 2010 19:47:56
There is no list, and there are no list of those frames. In order to even get at those you need to scan all children of the WorldFrame frequently in order to catch them, and updating them is even more difficult. There are a few mods that already do this, unless you are en experienced addon developer I highly suggest you look at one of them.
-
Posted by ns66 on Thu, 07 Oct 2010 19:59:34
Ok thank you.
one more question if I may, how to get the distance of the target to player? I searched but can't seem to find such a function
-
Posted by jnwhiteh on Thu, 07 Oct 2010 20:15:51
You can't. You can use http://wowprogramming.com/docs/api/CheckInteractDistance but it doesn't quite do what you want it to. Hard and fast distances are not available.
-
Posted by ns66 on Fri, 08 Oct 2010 03:31:06
thanks.
may I ask one more question? how do I get a list of spells player already learned? I tried to call GetNumSpellTabs() but it always return 0?
local numTabs = GetNumSpellTabs() for i=1,numTabs do local name,texture,offset,numSpells = GetSpellTabInfo(i) print("Spell tab \"" .. name .. "\" contains spells from id " .. offset + 1 .. " through " .. offset + numSpells) end
-
Posted by jnwhiteh on Fri, 08 Oct 2010 06:45:38
GetNumSpellTabs() returns the number of spell tabs that the player currently has in the spellbook. You can see this by running /dump GetNumSpellTabs() within the game. You can also use GetSpellTabInfo and the rest of the spellbook API to get the spell information. This will all change in about a week, when 4.x is released, however.