Thread Tools Display Modes
10-28-18, 02:18 AM   #1
seyan777
An Aku'mai Servant
Join Date: Feb 2017
Posts: 35
I would like to remove default nameplate's buff frame

Hi,

I would like to remove default nameplate's buff frame and make myself a custom buff frame.

Lua Code:
  1. local function ModifyNamePlate()
  2.     NamePlateDriverFrame:HookScript("OnEvent", function(self, event, ...)
  3.         if (event == "NAME_PLATE_CREATED") then
  4.             local nameplate = ...
  5.             if (nameplate and nameplate.UnitFrame) then
  6.                 local buffFrame = nameplate.UnitFrame.BuffFrame
  7.                 if (buffFrame) then
  8.                     buffFrame:UnregisterAllEvents()
  9.                     buffFrame = nil
  10.                 end
  11.             end
  12.         end
  13.     end)
  14. end

I thought this would remove the frame, but it didn't...

What would have I done wrong ?

Last edited by seyan777 : 10-28-18 at 09:47 PM.
  Reply With Quote
10-29-18, 12:18 AM   #2
seyan777
An Aku'mai Servant
Join Date: Feb 2017
Posts: 35
I've been doing some further research on those nameplate addons, but could have not found any solution...

It would have been easier to understand if it gave me some errors, but it is not even throwing one
  Reply With Quote
10-29-18, 01:08 PM   #3
jeruku
A Cobalt Mageweaver
 
jeruku's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 223
Hiding the buff frame will hide the frames and make it stop responding to events.
Lua Code:
  1. nameplate.UnitFrame.BuffFrame:Hide()
__________________
"I have not failed, I simply found 10,000 ways that did not work." - Thomas Edison
  Reply With Quote
10-29-18, 04:36 PM   #4
seyan777
An Aku'mai Servant
Join Date: Feb 2017
Posts: 35
Originally Posted by jeruku View Post
Hiding the buff frame will hide the frames and make it stop responding to events.
Lua Code:
  1. nameplate.UnitFrame.BuffFrame:Hide()
So, it won't give any affects on CPU usage?!
  Reply With Quote
10-29-18, 06:29 PM   #5
jeruku
A Cobalt Mageweaver
 
jeruku's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 223
It should lower usage as it is no longer drawing or in need of processing.
__________________
"I have not failed, I simply found 10,000 ways that did not work." - Thomas Edison
  Reply With Quote
10-29-18, 08:24 PM   #6
seyan777
An Aku'mai Servant
Join Date: Feb 2017
Posts: 35
Originally Posted by jeruku View Post
It should lower usage as it is no longer drawing or in need of processing.
Sweet!

Thanks a lot jeruku
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » I would like to remove default nameplate's buff frame

Thread Tools
Display Modes

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