Quantcast WoWInterface - View Single Post - Would using oUF to just replace a player's nameplate be overkill?
View Single Post
05-15-18, 01:16 AM   #8
runamonk
A Wyrmkin Dreamwalker
 
runamonk's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 56
In looking at the spawn function in oUF it does not appear there is a way to override the functionality.


You could modify the spawn function yourself and add an override to it? Maybe this is something they can add to the new version for BfA as well.


Lua Code:
  1. function oUF:Spawn(unit, overrideName)
  2.     argcheck(unit, 2, 'string')
  3.     if(not style) then return error('Unable to create frame. No styles have been registered.') end
  4.  
  5.     unit = unit:lower()
  6.  
  7.     local name = overrideName or generateName(unit)
  8.     local object = CreateFrame('Button', name, oUF_PetBattleFrameHider, 'SecureUnitButtonTemplate')
  9.     Private.UpdateUnits(object, unit)
  10.  
  11.     self:DisableBlizzard(unit)
  12.     walkObject(object, unit)
  13.  
  14.     object:SetAttribute('unit', unit)
  15.     RegisterUnitWatch(object)
  16.  
  17.     return object
  18. end

Last edited by runamonk : 05-15-18 at 01:42 AM.
  Reply With Quote