Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-05-17, 12:04 AM   #1
Mortimerlol
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Jul 2017
Posts: 71
Question How put icon on nameplate with X name [SOLVED]

Good morning to all,

Somebody have idea how put an icon over nameplate with X name? For example, i want put an icon to all mobs with name "Eredar Summoner".

My testing code atm:
Lua Code:
  1. local moblist = { "Eredar Summoner", "Wrathguard Dreadblade", }
  2.  
  3. for k in pairs(moblist) do
  4.     moblist[#moblist + 1] = k
  5. end
  6. table.sort(moblist)
  7. for i = 1, #moblist do
  8.  name = moblist[i]
  9.  moblist[name] = name
  10.  print(moblist[name])
  11. end
  12.  
  13. local nkids = WorldFrame:GetNumChildren()
  14.     for i = 1, nkids do
  15.         local frame = select(i, WorldFrame:GetChildren())
  16.             if frame.moblist[name] then
  17.                 frame.moblist[name]:SetTexCoord(.22, .22, .22, .22)
  18.                 frame.moblist[name]:SetHeight(35)
  19.                 frame.moblist[name]:SetWidth(35)
  20.                 frame.moblist[name]:SetTexture("Interface\Icons\Ability_hunter_beastcall02")
  21.             end
  22.     end

Last edited by Mortimerlol : 08-05-17 at 11:18 PM. Reason: [SOLVED]
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » How put icon on nameplate with X name [SOLVED]


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off