View Single Post
04-25-17, 02:35 PM   #6
OR14-NS
A Murloc Raider
 
OR14-NS's Avatar
Join Date: Apr 2017
Posts: 5
Originally Posted by Ketho View Post
Lua Code:
  1. -- does not account for nameplates being recycled
  2. function ShowNamePlateTexture(unit)
  3.     local np = C_NamePlate.GetNamePlateForUnit(unit)
  4.     if np and not np.tex then
  5.         np.tex = CreateFrame("PlayerModel", nil, np)
  6.         np.tex:SetPoint("BOTTOM", np, "TOP")
  7.         np.tex:SetSize(200, 200)
  8.         np.tex:SetDisplayInfo(21723) -- Murloc Costume
  9.     end
  10. end
Function C_NamePlate.GetNamePlateForUnit() after realise patch 7.2 is not working in dungeons and raids, it return nil, function C_NamePlate.GetNamePlates works in dungeons and raids, but when I try to take from it the necessary data it throws an error ": SetPoint (): Attempt to access forbidden object from code tainted by An AddOn ", which confirms what I wrote above.

Last edited by OR14-NS : 04-25-17 at 02:54 PM.
  Reply With Quote