View Single Post
04-06-21, 07:36 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,935
Off the top of my head I can only think of tracking down which function is the last point of updating the name fields of any Unit Frame and hook into it so that you can replace the name with your alternative... but some that I found returned straight out so not sure if they would follow on with your custom code.

For example:
https://www.townlong-yak.com/framexm.../UnitFrame.lua

Includes this function:
Lua Code:
  1. function UnitFrame_Update (self, isParty)
  2.     if (self.name) then
  3.         local name;
  4.         if ( self.overrideName ) then
  5.             name = self.overrideName;
  6.         else
  7.             name = self.unit;
  8.         end
  9.         if (isParty) then
  10.             self.name:SetText(GetUnitName(name, true));
  11.         else
  12.             self.name:SetText(GetUnitName(name));
  13.         end
  14.     end
  15.     UnitFramePortrait_Update(self);
  16.     UnitFrameHealthBar_Update(self.healthbar, self.unit);
  17.     UnitFrameManaBar_Update(self.manabar, self.unit);
  18.     UnitFrame_UpdateThreatIndicator(self.threatIndicator, self.threatNumericIndicator);
  19.     UnitFrameHealPredictionBars_UpdateMax(self);
  20.     UnitFrameHealPredictionBars_Update(self);
  21.     UnitFrameManaCostPredictionBars_Update(self);
  22. end

It might be as simple as hooking into this function and just adding your random name and setting the text again. If not, it gives you a starting point to investigate.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote