1. Hi, when I do Ctrl-V, I can see name plates of nearby players, how do I get those frames?


    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?

    sorry, I figured out the answer to my original question, so this is the current question I have

    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?

    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)


    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.

    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

    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.


    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

    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.