Language:
Lua     Change language:
Pastebin: 125488
Author: zork
Subject: oUF_D3Orbs player frame only
Created: 2009-09-21 02:47:31
Download and save
Toggle line numbers
1 
2  -- oUF_D3Orbs2 layout by roth - 2009 
3 
4  ----------------------------- 
5  -- VARIABLES + CONFIG 
6  ----------------------------- 
7 
8  local myname, _ = UnitName("player"
9  local _, myclass = UnitClass("player"
10  local dudustance, vehiclepower, playerinvehicle 
11 
12  -- 0 = off 
13  -- 1 = on 
14 
15  --size of the orbs 
16  local orbsize = 150 
17 
18  -- shall frames be moved 
19  -- set this to 0 to reset all frame positions 
20  local allow_frame_movement = 0 
21 
22  -- set this to 1 after you have moved everything in place 
23  -- THIS IS IMPORTANT because it will deactivate the mouse clickablity on that frame. 
24  local lock_all_frames = 1 
25 
26  --font used 
27  local d3font = "FONTS\\FRIZQT__.ttf" 
28 
29  --player scale 
30  local playerscale = 0.82 
31  --target and castbar scale 
32  local targetscale = 0.82 
33  --focus, focustarget, pet and partyscale 
34  local focusscale = 0.5 
35 
36  --activate this if you want to use rbottombarstyler 
37  --rember that you need to use jExp2 instead of jExp too.  
38  local use_rbottombarstyler = 0 
39 
40  --animated portraits yes/no 
41  local use_3dportraits = 1 
42 
43  --automatic mana detection on stance/class (only works with glows active) 
44  local automana = 1 
45 
46  --activate the galaxy glow 
47  local usegalaxy = 1 
48 
49  --activate the orb m2-file glow 
50  local useglow = 0 
51 
52  --variable to lighten the orb glow. the higher the value, the lighter the glow gets. 
53  local fog_smoother = 1 
54 
55  --variable to switch the bar colors 
56  --0 = grey to red, 1 = red to grey 
57  local color_switcher = 0 
58 
59  --hide party in raids yes/no 
60  local hidepartyinraid = 1 
61 
62  -- healthcolor defines what healthcolor will be used 
63  -- 0 = class color, 1 = red, 2 = green, 3 = blue, 4 = yellow, 5 = runic 
64  local healthcolor = 0 
65 
66  -- manacolor defines what manacolor will be used 
67  -- 1 = red, 2 = green, 3 = blue, 4 = yellow, 5 = runic 
68  local manacolor = 3 
69 
70  -- usebar defines what actionbar texture will be used.  
71  -- not really needed anymore, 36 texture will only be used if MultiBarRight is shown 
72  -- usebar = 1 -> choose automatically 
73  -- usebar = 2 -> 12 button texture always 
74  -- usebar = 3 -> 24 button texture always 
75  -- usebar = 4 -> 36 button texture always 
76  local usebar = 1 
77 
78  local player_class_color = rRAID_CLASS_COLORS[select(2, UnitClass("player"))] 
79 
80  local orbtab = { 
81    [0] = {r = player_class_color.r*0.8, g = player_class_color.g*0.8,   b = player_class_color.b*0.8, scale = 0.9, z = -12, x = -0.5, y = -0.8, anim = "SPELLS\WhiteRadiationFog.m2"}, -- class color 
82    [1] = {r = 0.8, g = 0, b = 0, scale = 0.8, z = -12, x = 0.8, y = -1.7, anim = "SPELLS\\RedRadiationFog.m2"}, -- red 
83    [2] = {r = 0.2, g = 0.8, b = 0, scale = 0.75, z = -12, x = 0, y = -1.1, anim = "SPELLS\\GreenRadiationFog.m2"}, -- green 
84    [3] = {r = 0, g = 0.35,   b = 0.9, scale = 0.75, z = -12, x = 1.2, y = -1, anim = "SPELLS\\BlueRadiationFog.m2"}, -- blue 
85    [4] = {r = 0.9, g = 0.7, b = 0.1, scale = 0.75, z = -12, x = -0.3, y = -1.2, anim = "SPELLS\\OrangeRadiationFog.m2"}, -- yellow 
86    [5] = {r = 0.1, g = 0.8,   b = 0.7, scale = 0.9, z = -12, x = -0.5, y = -0.8, anim = "SPELLS\\WhiteRadiationFog.m2"}, -- runic 
87  } 
88 
89  local galaxytab = { 
90    [0] = {r = player_class_color.r, g = player_class_color.g, b = player_class_color.b, }, -- class color 
91    [1] = {r = 0.90, g = 0.1, b = 0.1, }, -- red 
92    [2] = {r = 0.25, g = 0.9, b = 0.25, }, -- green 
93    [3] = {r = 0, g = 0.35,   b = 0.9, }, -- blue 
94    [4] = {r = 0.9, g = 0.8, b = 0.35, }, -- yellow 
95    [5] = {r = 0.35, g = 0.9,   b = 0.9, }, -- runic 
96  } 
97 
98  local orbfilling_texture = "orb_filling8" 
99  local statusbar128 = "Interface\\AddOns\\rTextures\\statusbar128" 
100  local statusbar256 = "Interface\\AddOns\\rTextures\\statusbar256" 
101 
102  local tabvalues = { 
103    power = { 
104      [-2] = rPowerBarColor["AMMO"], -- fuel 
105      [-1] = rPowerBarColor["FUEL"], -- fuel 
106      [0] = rPowerBarColor["MANA"], -- Mana 
107      [1] = rPowerBarColor["RAGE"], -- Rage 
108      [2] = rPowerBarColor["FOCUS"], -- Focus 
109      [3] = rPowerBarColor["ENERGY"], -- Energy 
110      [4] = rPowerBarColor["HAPPINESS"], -- Happiness 
111      [5] = rPowerBarColor["RUNES"], -- dont know 
112      [6] = rPowerBarColor["RUNIC_POWER"], -- deathknight 
113    }
114    happiness = { 
115      [0] = {r = 1, g = 1, b = 1}, -- bla test 
116      [1] = {r = 1, g = 0, b = 0}, -- need.... | unhappy 
117      [2] = {r = 1, g = 1, b = 0}, -- new..... | content 
118      [3] = {r = 0, g = 1, b = 0}, -- colors.. | happy 
119    }
120    frame_positions = { 
121      [1] =   { a1 = "BOTTOM",  a2 = "BOTTOM",  af = "UIParent",                  x = 260,    y = -9      }, --player mana orb 
122      [2] =   { a1 = "BOTTOM",  a2 = "BOTTOM",  af = "UIParent",                  x = -260,   y = -9      }, --player health orb 
123      [3] =   { a1 = "CENTER",  a2 = "CENTER",  af = "UIParent",                  x = 0,      y = -200    }, --target frame 
124      [4] =   { a1 = "RIGHT",   a2 = "LEFT",    af = "oUF_D3Orbs2_TargetFrame",   x = -80,    y = 0       }, --tot 
125      [5] =   { a1 = "LEFT",    a2 = "RIGHT",   af = "UIParent",                  x = 50,     y = 100     }, --pet 
126      [6] =   { a1 = "LEFT",    a2 = "LEFT",    af = "UIParent",                  x = 60,     y = -100    }, --focus 
127      [7] =   { a1 = "TOPLEFT", a2 = "TOPLEFT", af = "UIParent",                  x = 15,     y = -10     }, --party 
128      [8] =   { a1 = "BOTTOM",  a2 = "BOTTOM",  af = "UIParent",                  x = 270,    y = 0       }, --angel 
129      [9] =   { a1 = "BOTTOM",  a2 = "BOTTOM",  af = "UIParent",                  x = -265,   y = 0       }, --demon 
130      [10] =  { a1 = "BOTTOM",  a2 = "BOTTOM",  af = "UIParent",                  x = 0,      y = -5      }, --botomline texture 
131      [11] =  { a1 = "BOTTOM",  a2 = "BOTTOM",  af = "UIParent",                  x = 1,      y = 0       }, --bottom bar background texture 
132      [12] =  { a1 = "CENTER",  a2 = "CENTER",  af = "oUF_D3Orbs2_TargetFrame",   x = 0,      y = 100     }, --castbar target 
133      [13] =  { a1 = "CENTER",  a2 = "CENTER",  af = "oUF_D3Orbs2_TargetFrame",   x = 0,      y = -80    },  --castbar player 
134      [14] =  { a1 = "CENTER",  a2 = "CENTER",  af = "oUF_D3Orbs2_TargetFrame",   x = 0,      y = 180     }, --castbar focus 
135    }
136  } 
137 
138  playerinvehicle = 0 
139 
140  ----------------------------- 
141  -- VARIABLES + CONFIG END 
142  ----------------------------- 
143 
144  --rewrite unit popup menus 
145  -- First level menus 
146  UnitPopupMenus["SELF"] = { "PVP_FLAG", "LOOT_METHOD", "LOOT_THRESHOLD", "OPT_OUT_LOOT_TITLE", "LOOT_PROMOTE", "DUNGEON_DIFFICULTY", "RAID_DIFFICULTY", "RESET_INSTANCES", "RAID_TARGET_ICON", "LEAVE", "CANCEL" }
147  UnitPopupMenus["PET"] = { "PET_PAPERDOLL", "PET_RENAME", "PET_ABANDON", "PET_DISMISS", "CANCEL" }
148  UnitPopupMenus["PARTY"] = { "MUTE", "UNMUTE", "PARTY_SILENCE", "PARTY_UNSILENCE", "RAID_SILENCE", "RAID_UNSILENCE", "BATTLEGROUND_SILENCE", "BATTLEGROUND_UNSILENCE", "WHISPER", "PROMOTE", "LOOT_PROMOTE", "UNINVITE", "INSPECT", "ACHIEVEMENTS", "TRADE", "FOLLOW", "DUEL", "RAID_TARGET_ICON", "PVP_REPORT_AFK", "RAF_SUMMON", "RAF_GRANT_LEVEL", "CANCEL" }
149  UnitPopupMenus["PLAYER"] = { "WHISPER", "INSPECT", "INVITE", "ACHIEVEMENTS", "TRADE", "FOLLOW", "DUEL", "RAID_TARGET_ICON", "RAF_SUMMON", "RAF_GRANT_LEVEL", "CANCEL" }
150  UnitPopupMenus["RAID_PLAYER"] = { "MUTE", "UNMUTE", "RAID_SILENCE", "RAID_UNSILENCE", "BATTLEGROUND_SILENCE", "BATTLEGROUND_UNSILENCE", "WHISPER", "INSPECT", "ACHIEVEMENTS", "TRADE", "FOLLOW", "DUEL", "RAID_TARGET_ICON", "RAID_LEADER", "RAID_PROMOTE", "RAID_DEMOTE", "LOOT_PROMOTE", "RAID_REMOVE", "PVP_REPORT_AFK", "RAF_SUMMON", "RAF_GRANT_LEVEL", "CANCEL" }
151  UnitPopupMenus["RAID"] = { "MUTE", "UNMUTE", "RAID_SILENCE", "RAID_UNSILENCE", "BATTLEGROUND_SILENCE", "BATTLEGROUND_UNSILENCE", "RAID_LEADER", "RAID_PROMOTE", "RAID_MAINTANK", "RAID_MAINASSIST", "LOOT_PROMOTE", "RAID_DEMOTE", "RAID_REMOVE", "PVP_REPORT_AFK", "CANCEL" }
152  UnitPopupMenus["FRIEND"] = { "WHISPER", "INVITE", "TARGET", "IGNORE", "REPORT_SPAM", "GUILD_PROMOTE", "GUILD_LEAVE", "PVP_REPORT_AFK", "CANCEL" }
153  UnitPopupMenus["TEAM"] = { "WHISPER", "INVITE", "TARGET", "TEAM_PROMOTE", "TEAM_KICK", "TEAM_LEAVE", "CANCEL" }
154  UnitPopupMenus["RAID_TARGET_ICON"] = { "RAID_TARGET_1", "RAID_TARGET_2", "RAID_TARGET_3", "RAID_TARGET_4", "RAID_TARGET_5", "RAID_TARGET_6", "RAID_TARGET_7", "RAID_TARGET_8", "RAID_TARGET_NONE" }
155  UnitPopupMenus["CHAT_ROSTER"] = { "WHISPER", "TARGET", "MUTE", "UNMUTE", "CHAT_SILENCE", "CHAT_UNSILENCE", "CHAT_PROMOTE", "CHAT_DEMOTE", "CHAT_OWNER", "CANCEL" }
156  UnitPopupMenus["VEHICLE"] = { "RAID_TARGET_ICON", "VEHICLE_LEAVE", "CANCEL" }
157  UnitPopupMenus["TARGET"] = { "RAID_TARGET_ICON", "CANCEL" }
158  UnitPopupMenus["ARENAENEMY"] = { "CANCEL" }
159  UnitPopupMenus["FOCUS"] = { "LOCK_FOCUS_FRAME", "UNLOCK_FOCUS_FRAME", "RAID_TARGET_ICON", "CANCEL" }
160 
161  -- Second level menus 
162  UnitPopupMenus["PVP_FLAG"] = { "PVP_ENABLE", "PVP_DISABLE"}
163  UnitPopupMenus["LOOT_METHOD"] = { "FREE_FOR_ALL", "ROUND_ROBIN", "MASTER_LOOTER", "GROUP_LOOT", "NEED_BEFORE_GREED", "CANCEL" }
164  UnitPopupMenus["LOOT_THRESHOLD"] = { "ITEM_QUALITY2_DESC", "ITEM_QUALITY3_DESC", "ITEM_QUALITY4_DESC", "CANCEL" }
165  UnitPopupMenus["OPT_OUT_LOOT_TITLE"] = { "OPT_OUT_LOOT_ENABLE", "OPT_OUT_LOOT_DISABLE"}
166  UnitPopupMenus["DUNGEON_DIFFICULTY"] = { "DUNGEON_DIFFICULTY1", "DUNGEON_DIFFICULTY2" }
167  UnitPopupMenus["RAID_DIFFICULTY"] = { "RAID_DIFFICULTY1", "RAID_DIFFICULTY2", "RAID_DIFFICULTY3", "RAID_DIFFICULTY4" }
168 
169  --position deathknight runes 
170  RuneButtonIndividual1:ClearAllPoints() 
171  RuneButtonIndividual1:SetPoint("BOTTOM", UIParent, "BOTTOM", -55, 140
172 
173  --disable the pet castbar (for vehicles!) 
174  PetCastingBarFrame:UnregisterAllEvents() 
175  PetCastingBarFrame.Show = function() end 
176  PetCastingBarFrame:Hide() 
177 
178  ----------------------------- 
179  -- FUNCTIONS 
180  ----------------------------- 
181 
182  --chat output func 
183  local function am(text) 
184    DEFAULT_CHAT_FRAME:AddMessage(text) 
185  end 
186 
187  --automana 
188  local function set_automana() 
189    if automana == 1 then 
190      local st = GetShapeshiftForm() 
191      if myclass == "WARRIOR" then 
192        manacolor = 1 
193      elseif myclass == "DEATHKNIGHT" then 
194        manacolor = 5 
195      elseif myclass == "ROGUE" then 
196        manacolor = 4 
197      elseif myclass == "DRUID" and st == 3 then 
198        manacolor = 4 
199      elseif myclass == "DRUID" and st == 1 then 
200        manacolor = 1 
201      else 
202        manacolor = 3 
203      end 
204    end 
205  end 
206  --call it once 
207  set_automana() 
208 
209  --check function for vehicle manatype 
210  local function set_vehicle_mana(self) 
211    self.Power.Filling:SetVertexColor(orbtab[manacolor].r,orbtab[manacolor].g,orbtab[manacolor].b) 
212    if usegalaxy == 1 then 
213      self.gal4.t:SetVertexColor(galaxytab[manacolor].r,galaxytab[manacolor].g,galaxytab[manacolor].b) 
214      self.gal5.t:SetVertexColor(galaxytab[manacolor].r,galaxytab[manacolor].g,galaxytab[manacolor].b) 
215      self.gal6.t:SetVertexColor(galaxytab[manacolor].r,galaxytab[manacolor].g,galaxytab[manacolor].b) 
216    elseif useglow == 1 then 
217      self.pm3:SetModel(orbtab[manacolor].anim) 
218      self.pm3:SetModelScale(orbtab[manacolor].scale) 
219      self.pm3:SetPosition(orbtab[manacolor].z, orbtab[manacolor].x, orbtab[manacolor].y) 
220      self.pm4:SetModel(orbtab[manacolor].anim) 
221      self.pm4:SetModelScale(orbtab[manacolor].scale) 
222      self.pm4:SetPosition(orbtab[manacolor].z, orbtab[manacolor].x, orbtab[manacolor].y+1
223    end 
224  end 
225 
226  --check function for druid manatype 
227  local function check_druid_mana(self) 
228    local st = GetShapeshiftForm() 
229    if st ~= dudustance then 
230      set_automana() 
231      set_vehicle_mana(self) 
232      dudustance = st 
233    end 
234  end 
235 
236  --do format func 
237  local function do_format(v) 
238    local string = "" 
239    if v > 1000000 then 
240      string = (floor((v/1000000)*10)/10).."m" 
241    elseif v > 1000 then 
242      string = (floor((v/1000)*10)/10).."k" 
243    else 
244      string = v 
245    end 
246    return string 
247  end 
248 
249  --update player health func 
250  local function d3o2_updatePlayerHealth(self, event, unit, bar, min, max) 
251    local d = floor(min/max*100
252    self.Health.Filling:SetHeight((min / max) * self.Health:GetWidth()) 
253    self.Health.Filling:SetTexCoord(0,1,  math.abs(min / max - 1),1
254    if useglow == 1 then 
255      self.pm1:SetAlpha((min/max)/fog_smoother) 
256      self.pm2:SetAlpha((min/max)/fog_smoother) 
257    end 
258    if usegalaxy == 1 then 
259      self.gal1:SetAlpha(min/max) 
260      self.gal2:SetAlpha(min/max) 
261      self.gal3:SetAlpha(min/max) 
262    end 
263    if d <= 25 and min > 1 then 
264      self.LowHP:Show() 
265    else 
266      self.LowHP:Hide() 
267    end 
268  end 
269 
270  --update player power func 
271  local function d3o2_updatePlayerPower(self, event, unit, bar, min, max) 
272    local d, d2 
273    if max == 0 then 
274      d = 0 
275      d2 = 0 
276    else 
277     d = min/max 
278     d2 = floor(min/max*100
279    end 
280    self.Power.Filling:SetHeight((d) * self.Power:GetWidth()) 
281    self.Power.Filling:SetTexCoord(0,1,  math.abs(d - 1),1
282    if useglow == 1 then 
283      self.pm3:SetAlpha((d)/fog_smoother) 
284      self.pm4:SetAlpha((d)/fog_smoother) 
285    end 
286    if usegalaxy == 1 then 
287      self.gal4:SetAlpha(d) 
288      self.gal5:SetAlpha(d) 
289      self.gal6:SetAlpha(d) 
290    end 
291 
292    local shape 
293    if myclass == "DRUID" then 
294      shape = GetShapeshiftForm() 
295    end 
296 
297    if myclass == "WARRIOR" or (myclass == "DRUID" and shape == 3) or (myclass == "DRUID" and shape == 1) or myclass == "DEATHKNIGHT" or myclass == "ROGUE" then 
298      self.mpval1:SetText(do_format(min)) 
299      self.mpval2:SetText(d2) 
300    else 
301      self.mpval1:SetText(d2) 
302      self.mpval2:SetText(do_format(min)) 
303    end 
304 
305    if playerinvehicle == 1 then 
306      local pt = UnitPowerType("pet"); 
307      if pt then 
308        if pt ~= vehiclepower then 
309          --am("ping"..pt) 
310          vehiclepower = pt 
311          if pt == 1 then 
312            manacolor = 1 
313          elseif pt == 3 then 
314            manacolor = 4 
315          else 
316            manacolor = 3 
317          end 
318          set_vehicle_mana(self) 
319        end 
320      end 
321    end 
322 
323  end 
324 
325  --update health func 
326  local function d3o2_updateHealth(self, event, unit, bar, min, max) 
327    local d = floor(min/max*100
328    local color 
329    local dead 
330    if UnitIsDeadOrGhost(unit) == 1 or UnitIsConnected(unit) == nil then 
331      color = {r = 0.4, g = 0.4, b = 0.4} 
332      dead = 1 
333    elseif UnitIsPlayer(unit) then 
334      if rRAID_CLASS_COLORS[select(2, UnitClass(unit))] then 
335        color = rRAID_CLASS_COLORS[select(2, UnitClass(unit))] 
336      end 
337    elseif unit == "pet" and UnitExists("pet") and GetPetHappiness() then 
338      local happiness = GetPetHappiness() 
339      color = tabvalues.happiness[happiness] 
340      self.Name:SetText(UnitName(unit)) 
341    else 
342      color = rFACTION_BAR_COLORS[UnitReaction(unit, "player")] 
343    end 
344 
345    if color_switcher == 1 then 
346      bar:SetStatusBarColor(0.7,0,0,1
347      bar.bg:SetVertexColor(0.15,0.15,0.15,1
348    else 
349      bar:SetStatusBarColor(0.15,0.15,0.15,1
350      bar.bg:SetVertexColor(0.7,0,0,1
351    end 
352 
353    --if you like color colored background, use this 
354    --bar.bg:SetVertexColor(color.r, color.g, color.b,1) 
355    if dead == 1 then 
356      bar.bg:SetVertexColor(0,0,0,0
357    end 
358    if color then 
359      self.Name:SetTextColor(color.r, color.g, color.b,1
360    end 
361    if d <= 25 and min > 1 then 
362      self.LowHP:Show() 
363    else 
364      self.LowHP:Hide() 
365    end 
366  end 
367 
368  --update power func 
369  local function d3o2_updatePower(self, event, unit, bar, min, max) 
370    --if max == 0 then 
371    --  bar:SetAlpha(0) 
372    --else 
373    --  bar:SetAlpha(1) 
374      local color = tabvalues.power[UnitPowerType(unit)] 
375      bar:SetStatusBarColor(color.r, color.g, color.b,1
376      bar.bg:SetVertexColor(color.r*0.3, color.g*0.3, color.b*0.3,1
377    --end 
378  end 
379 
380  --menu   
381  local function menu(self) 
382    local unit = self.unit:sub(1, -2
383    local cunit = self.unit:gsub("(.)", string.upper, 1
384    if(unit == "party" or unit == "partypet") then 
385      ToggleDropDownMenu(1, nil, _G["PartyMemberFrame"..self.id.."DropDown"], "cursor", 0, 0
386    elseif(_G[cunit.."FrameDropDown"]) then 
387      ToggleDropDownMenu(1, nil, _G[cunit.."FrameDropDown"], "cursor", 0, 0
388    end 
389  end 
390 
391  --setup frame width, height, strata 
392  local function d3o2_setupFrame(self,w,h,strata) 
393    self.menu = menu 
394    self:RegisterForClicks("AnyUp"
395    self:SetAttribute("*type2", "menu"
396    self:SetScript("OnEnter", UnitFrame_OnEnter) 
397    self:SetScript("OnLeave", UnitFrame_OnLeave) 
398    self:SetFrameStrata(strata) 
399    self:SetWidth(w) 
400    self:SetHeight(h) 
401  end 
402 
403  --orb glow func 
404  local function create_me_a_orb_glow(f,type,pos) 
405    local glow = CreateFrame("PlayerModel", nil, f) 
406    glow:SetFrameStrata("BACKGROUND"
407    glow:SetFrameLevel(5
408    glow:SetAllPoints(f) 
409    if type == "power" then 
410      glow:SetModel(orbtab[manacolor].anim) 
411      glow:SetModelScale(orbtab[manacolor].scale) 
412      glow:SetPosition(orbtab[manacolor].z, orbtab[manacolor].x, orbtab[manacolor].y+pos) 
413      glow:SetAlpha(1/fog_smoother) 
414      glow:SetScript("OnShow",function() 
415        glow:SetModel(orbtab[manacolor].anim) 
416        glow:SetModelScale(orbtab[manacolor].scale) 
417        glow:SetPosition(orbtab[manacolor].z, orbtab[manacolor].x, orbtab[manacolor].y+pos) 
418      end
419    else 
420      glow:SetModel(orbtab[healthcolor].anim) 
421      --glow:SetModelScale(orbtab[healthcolor].scale) 
422      --glow:SetPosition(orbtab[healthcolor].z, orbtab[healthcolor].x, orbtab[healthcolor].y+pos)  
423      glow:SetAlpha(1/fog_smoother) 
424      glow:SetScript("OnShow",function() 
425        glow:SetModel(orbtab[healthcolor].anim) 
426        glow:SetModelScale(orbtab[healthcolor].scale) 
427        glow:SetPosition(orbtab[healthcolor].z, orbtab[healthcolor].x, orbtab[healthcolor].y+pos) 
428      end
429    end 
430    return glow 
431  end 
432 
433  local function create_me_a_galaxy(f,type,x,y,size,alpha,dur,tex) 
434    local h = CreateFrame("Frame",nil,f) 
435    h:SetHeight(size) 
436    h:SetWidth(size) 
437    h:SetPoint("CENTER",x,y-10
438    h:SetAlpha(alpha) 
439    h:SetFrameLevel(3
440 
441    local t = h:CreateTexture() 
442    t:SetAllPoints(h) 
443    t:SetTexture("Interface\\AddOns\\rTextures\\"..tex) 
444    t:SetBlendMode("ADD"
445    if type == "power" then 
446      t:SetVertexColor(galaxytab[manacolor].r,galaxytab[manacolor].g,galaxytab[manacolor].b) 
447    else 
448      t:SetVertexColor(galaxytab[healthcolor].r,galaxytab[healthcolor].g,galaxytab[healthcolor].b) 
449    end 
450    h.t = t 
451 
452    local ag = h:CreateAnimationGroup() 
453    h.ag = ag 
454 
455    local a1 = h.ag:CreateAnimation("Rotation"
456    a1:SetDegrees(360
457    a1:SetDuration(dur) 
458    h.ag.a1 = a1 
459 
460    h:SetScript("OnUpdate",function(self,elapsed) 
461      local t = self.total 
462      if (not t) then 
463        self.total = 0 
464        return 
465      end 
466      t = t + elapsed 
467      if (t<1) then 
468        self.total = t 
469        return 
470      else 
471        h.ag:Play() 
472      end 
473    end
474 
475    return
476 
477  end 
478 
479  --check vehicle type 
480  local function check_vehicle_mana(self,event) 
481    if event == "UNIT_ENTERED_VEHICLE" then 
482      playerinvehicle = 1 
483    else 
484      playerinvehicle = 0 
485      vehiclepower = nil 
486      set_automana() 
487      set_vehicle_mana(self) 
488    end 
489  end 
490 
491  --create orb func 
492  local function d3o2_createOrb(self,type
493    local orb 
494    if type == "power" then 
495      orb = CreateFrame("StatusBar", "oUF_D3Orbs2_PlayerPowerOrb", self) 
496    else 
497      orb = CreateFrame("StatusBar", nil, self) 
498    end 
499    orb:SetStatusBarTexture("Interface\\AddOns\\rTextures\\orb_transparent.tga"
500    orb:SetHeight(orbsize) 
501    orb:SetWidth(orbsize) 
502    orb.bg = orb:CreateTexture(nil, "BACKGROUND"
503    orb.bg:SetTexture("Interface\\AddOns\\rTextures\\orb_back2.tga"
504    orb.bg:SetAllPoints(orb) 
505    orb.Filling = orb:CreateTexture(nil, "ARTWORK"
506    if type == "power" then 
507      orb.Filling:SetTexture("Interface\\AddOns\\rTextures\\"..orbfilling_texture) 
508    else 
509      orb.Filling:SetTexture("Interface\\AddOns\\rTextures\\"..orbfilling_texture) 
510    end 
511    orb.Filling:SetPoint("BOTTOMLEFT",0,0
512    orb.Filling:SetWidth(orbsize) 
513    orb.Filling:SetHeight(orbsize) 
514    --orb.Filling:SetBlendMode("add") 
515    orb.Filling:SetAlpha(1
516    orbGlossHolder = CreateFrame("Frame", nil, orb) 
517    orbGlossHolder:SetAllPoints(orb) 
518    orbGlossHolder:SetFrameStrata("LOW"
519    orbOrbGloss = orbGlossHolder:CreateTexture(nil, "OVERLAY"
520    orbOrbGloss:SetTexture("Interface\\AddOns\\rTextures\\orb_gloss.tga"
521    orbOrbGloss:SetAllPoints(orbGlossHolder) 
522    if type == "power" then 
523      orb:SetPoint(tabvalues.frame_positions[1].a1, tabvalues.frame_positions[1].af, tabvalues.frame_positions[1].a2, tabvalues.frame_positions[1].x, tabvalues.frame_positions[1].y) 
524      self.Power = orb 
525      self.Power.Filling = orb.Filling 
526      if usegalaxy == 1 then 
527        self.gal4 = create_me_a_galaxy(orb,type,0,10,110,1,40,"galaxy2"
528        self.gal5 = create_me_a_galaxy(orb,type,-10,-10,150,1,50,"galaxy"
529        self.gal6 = create_me_a_galaxy(orb,type,10,-10,130,1,20,"galaxy3"
530        self.Power.Filling:SetVertexColor(orbtab[manacolor].r,orbtab[manacolor].g,orbtab[manacolor].b) 
531        if myclass == "DRUID" and automana == 1 then 
532          self.Power:RegisterEvent("PLAYER_ENTERING_WORLD"
533          self.Power:RegisterEvent("UPDATE_SHAPESHIFT_FORM"
534          self.Power:SetScript("OnEvent", function() 
535            check_druid_mana(self) 
536          end
537        end 
538        if automana == 1 then 
539          orbGlossHolder:RegisterEvent("UNIT_ENTERED_VEHICLE"
540          orbGlossHolder:RegisterEvent("UNIT_EXITED_VEHICLE"
541          orbGlossHolder:SetScript("OnEvent", function(_,event,arg1) 
542            if arg1 == "player" then 
543              check_vehicle_mana(self,event) 
544            end 
545          end
546        end 
547      elseif useglow == 1 then 
548        self.pm3 = create_me_a_orb_glow(orb,type,0
549        self.pm4 = create_me_a_orb_glow(orb,type,1
550        self.Power.Filling:SetVertexColor(orbtab[manacolor].r,orbtab[manacolor].g,orbtab[manacolor].b) 
551        if myclass == "DRUID" and automana == 1 then 
552          self.Power:RegisterEvent("PLAYER_ENTERING_WORLD"
553          self.Power:RegisterEvent("UPDATE_SHAPESHIFT_FORM"
554          self.Power:SetScript("OnEvent", function() 
555            check_druid_mana(self) 
556          end
557        end 
558        if automana == 1 then 
559          orbGlossHolder:RegisterEvent("UNIT_ENTERED_VEHICLE"
560          orbGlossHolder:RegisterEvent("UNIT_EXITED_VEHICLE"
561          orbGlossHolder:SetScript("OnEvent", function(_,event,arg1) 
562            if arg1 == "player" then 
563              check_vehicle_mana(self,event) 
564            end 
565          end
566        end 
567      else 
568        self.Power.Filling:SetVertexColor(0,0.5,1
569      end 
570      self.Power.frequentUpdates = true 
571      self.Power.Smooth = true 
572    else 
573      orb:SetPoint("TOPLEFT", 0, 0
574      self.Health = orb 
575      self.Health.Filling = orb.Filling 
576      if usegalaxy == 1 then 
577        self.gal1 = create_me_a_galaxy(orb,type,0,15,110,1,35,"galaxy2"
578        self.gal2 = create_me_a_galaxy(orb,type,0,-10,150,1,45,"galaxy"
579        self.gal3 = create_me_a_galaxy(orb,type,-10,-10,130,1,18,"galaxy3"
580        self.Health.Filling:SetVertexColor(orbtab[healthcolor].r,orbtab[healthcolor].g,orbtab[healthcolor].b) 
581      elseif useglow == 1 then 
582        self.pm1 = create_me_a_orb_glow(orb,type,0
583        self.pm2 = create_me_a_orb_glow(orb,type,1
584        self.Health.Filling:SetVertexColor(orbtab[healthcolor].r,orbtab[healthcolor].g,orbtab[healthcolor].b) 
585      else 
586        self.Health.Filling:SetVertexColor(0.5,1,0
587      end 
588      self.Health.Smooth = true 
589    end 
590  end 
591 
592  --set fontstring 
593  local function SetFontString(parent, fontName, fontHeight, fontStyle) 
594    local fs = parent:CreateFontString(nil, "OVERLAY"
595    fs:SetFont(fontName, fontHeight, fontStyle) 
596    fs:SetShadowColor(0,0,0,1
597    return fs 
598  end 
599 
600  --create health and power bar func for every frame but not player 
601  local function d3o2_createHealthPowerFrames(self,unit) 
602    --health 
603    self.Health = CreateFrame("StatusBar", nil, self) 
604    if unit == "target" then 
605      self.Health:SetStatusBarTexture(statusbar256) 
606    else 
607      self.Health:SetStatusBarTexture(statusbar128) 
608    end 
609    self.Health:SetHeight(16
610    self.Health:SetWidth(self:GetWidth()) 
611    if unit == "target" or unit == "targettarget" then 
612      self.Health:SetPoint("TOPLEFT",0,-1
613    else 
614      self.Health:SetPoint("BOTTOMLEFT",0,1
615    end 
616    if unit == "target" then 
617      self.bg = self:CreateTexture(nil, "BACKGROUND"
618      self.bg:SetTexture("Interface\\AddOns\\rTextures\\d3_targetframe.tga"
619      self.bg:SetWidth(512
620      self.bg:SetHeight(128
621      self.bg:SetPoint("CENTER",-3,0
622      self.Health.bg = self.Health:CreateTexture(nil, "BACKGROUND"
623      self.Health.bg:SetTexture(statusbar256) 
624      self.Health.bg:SetAllPoints(self.Health) 
625    elseif unit == "targettarget" then 
626      self.bg = self:CreateTexture(nil, "BACKGROUND"
627      self.bg:SetTexture("Interface\\AddOns\\rTextures\\d3totframe.tga"
628      self.bg:SetWidth(256
629      self.bg:SetHeight(128
630      self.bg:SetPoint("CENTER",-2,0
631      self.Health.bg = self.Health:CreateTexture(nil, "BACKGROUND"
632      self.Health.bg:SetTexture(statusbar128) 
633      self.Health.bg:SetAllPoints(self.Health) 
634    else 
635      self.bg = self:CreateTexture(nil, "BACKGROUND"
636      self.bg:SetTexture("Interface\\AddOns\\rTextures\\d3totframe.tga"
637      self.bg:SetWidth(256
638      self.bg:SetHeight(128
639      self.bg:SetPoint("BOTTOM",-2,-56
640      self.Health.bg = self.Health:CreateTexture(nil, "BACKGROUND"
641      self.Health.bg:SetTexture(statusbar128) 
642      self.Health.bg:SetAllPoints(self.Health) 
643    end 
644    self.Health.Smooth = true 
645    --power     
646    self.Power = CreateFrame("StatusBar", nil, self) 
647    if unit == "target" then 
648      self.Power:SetStatusBarTexture(statusbar256) 
649    else 
650      self.Power:SetStatusBarTexture(statusbar128) 
651    end 
652    self.Power:SetHeight(4
653    self.Power:SetWidth(self:GetWidth()) 
654    self.Power:SetPoint("TOP", self.Health, "BOTTOM", 0, 0
655    self.Power.bg = self.Power:CreateTexture(nil, "BACKGROUND"
656    if unit == "target" then 
657      self.Power.bg:SetTexture(statusbar256) 
658    else 
659      self.Power.bg:SetTexture(statusbar128) 
660    end 
661    self.Power.bg:SetAllPoints(self.Power) 
662    self.Power.Smooth = true 
663    if unit == "pet" then 
664      self.Power.frequentUpdates = true 
665    end 
666  end 
667 
668  --aura icon func 
669  local function d3o2_createAuraIcon(self, button, icons, index, debuff) 
670    button.cd:SetReverse() 
671    button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9
672    button.count:SetPoint("BOTTOMRIGHT", button, 2, -2
673    button.count:SetTextColor(0.7,0.7,0.7
674    --fix the count on aurawatch, make the count fontsize button size dependend 
675    button.count:SetFont(d3font,button:GetWidth()/1.5,"THINOUTLINE"
676    self.ButtonOverlay = button:CreateTexture(nil, "OVERLAY"
677    self.ButtonOverlay:SetTexture("Interface\\AddOns\\rTextures\\gloss2.tga"
678    self.ButtonOverlay:SetVertexColor(0.37,0.3,0.3,1); 
679    self.ButtonOverlay:SetParent(button) 
680    self.ButtonOverlay:SetPoint("TOPLEFT", -1, 1
681    self.ButtonOverlay:SetPoint("BOTTOMRIGHT", 1, -1
682 
683    local back = button:CreateTexture(nil, "BACKGROUND"
684    back:SetPoint("TOPLEFT",button.icon,"TOPLEFT",-4,4
685    back:SetPoint("BOTTOMRIGHT",button.icon,"BOTTOMRIGHT",4,-4
686    back:SetTexture("Interface\\AddOns\\rTextures\\simplesquare_glow"
687    back:SetVertexColor(0, 0, 0, 1
688 
689  end 
690 
691  --buff func 
692  local function d3o2_createBuffs(self,unit) 
693    self.Buffs = CreateFrame("Frame", nil, self) 
694    self.Buffs.size = 22 
695    self.Buffs.num = 40 
696    self.Buffs:SetHeight((self.Buffs.size+5)*3
697    self.Buffs:SetWidth(self:GetWidth()) 
698    self.Buffs:SetPoint("BOTTOMLEFT", self, "TOPRIGHT", 20, 15
699    self.Buffs.initialAnchor = "BOTTOMLEFT" 
700    self.Buffs["growth-x"] = "RIGHT" 
701    self.Buffs["growth-y"] = "UP" 
702    self.Buffs.spacing = 5 
703  end 
704 
705  --debuff func 
706  local function d3o2_createDebuffs(self,unit) 
707    self.Debuffs = CreateFrame("Frame", nil, self) 
708    if unit == "target" then 
709      self.Debuffs.size = 22 
710      self.Debuffs.num = 40 
711      self.Debuffs:SetHeight((self.Debuffs.size+5)*3
712      self.Debuffs:SetWidth(self:GetWidth()) 
713      self.Debuffs:SetPoint("TOPLEFT", self, "BOTTOMRIGHT", 20, -15
714      self.Debuffs.initialAnchor = "TOPLEFT" 
715      self.Debuffs["growth-x"] = "RIGHT" 
716      self.Debuffs["growth-y"] = "DOWN" 
717      self.Debuffs.spacing = 5 
718    elseif unit == "targettarget" then 
719      self.Debuffs.size = 20 
720      self.Debuffs.num = 8 
721      self.Debuffs:SetHeight((self.Debuffs.size+5)*1
722      self.Debuffs:SetWidth(self:GetWidth()) 
723      self.Debuffs:SetPoint("TOP", self, "BOTTOM", 0, -15
724      self.Debuffs.initialAnchor = "TOPLEFT" 
725      self.Debuffs["growth-x"] = "RIGHT" 
726      self.Debuffs["growth-y"] = "DOWN" 
727      self.Debuffs.spacing = 5 
728    else 
729      self.Debuffs.size = 34 
730      self.Debuffs.num = 3 
731      self.Debuffs:SetHeight((self.Debuffs.size+5)*1
732      self.Debuffs:SetWidth(self:GetWidth()) 
733      self.Debuffs:SetPoint("TOP", self, "BOTTOM", 0, -17
734      self.Debuffs.initialAnchor = "TOPLEFT" 
735      self.Debuffs["growth-x"] = "RIGHT" 
736      self.Debuffs["growth-y"] = "DOWN" 
737      self.Debuffs.spacing = 5 
738    end 
739    self.Debuffs.onlyShowPlayer = false 
740    self.Debuffs.showDebuffType = false 
741  end 
742 
743  local function d3o2_createCastbar(self,unit) 
744    self.Castbar = CreateFrame("StatusBar", nil, UIParent) 
745    self.Castbar:SetFrameStrata("DIALOG"
746    self.Castbar:SetWidth(224
747    self.Castbar:SetHeight(18
748    self.Castbar:SetStatusBarTexture(statusbar256) 
749    self.Castbar.bg2 = self.Castbar:CreateTexture(nil, "BACKGROUND"
750    self.Castbar.bg2:SetTexture("Interface\\AddOns\\rTextures\\d3_targetframe.tga"
751    self.Castbar.bg2:SetWidth(512
752    self.Castbar.bg2:SetHeight(128
753    self.Castbar.bg2:SetPoint("CENTER",-3,0
754    self.Castbar.bg = self.Castbar:CreateTexture(nil, "BORDER"
755    self.Castbar.bg:SetTexture(statusbar256) 
756    self.Castbar.bg:SetAllPoints(self.Castbar) 
757    if color_switcher == 1 then 
758      self.Castbar.bg:SetVertexColor(0.15,0.15,0.15,1
759      self.Castbar:SetStatusBarColor(180/255,110/255,30/255,1
760    else 
761      self.Castbar.bg:SetVertexColor(180/255,110/255,30/255,1
762      self.Castbar:SetStatusBarColor(0.15,0.15,0.15,1
763    end 
764    if unit == "player" then 
765      self.Castbar:SetPoint(tabvalues.frame_positions[13].a1, tabvalues.frame_positions[13].af, tabvalues.frame_positions[13].a2, tabvalues.frame_positions[13].x, tabvalues.frame_positions[13].y) 
766    elseif unit == "target" then 
767      self.Castbar:SetPoint(tabvalues.frame_positions[12].a1, tabvalues.frame_positions[12].af, tabvalues.frame_positions[12].a2, tabvalues.frame_positions[12].x, tabvalues.frame_positions[12].y) 
768    elseif unit == "focus" then 
769      self.Castbar:SetPoint(tabvalues.frame_positions[14].a1, tabvalues.frame_positions[14].af, tabvalues.frame_positions[14].a2, tabvalues.frame_positions[14].x, tabvalues.frame_positions[14].y) 
770    end 
771 
772    self.Castbar.Text = SetFontString(self.Castbar, d3font, 14, "THINOUTLINE"
773    self.Castbar.Text:SetPoint("LEFT", 2, 1
774    self.Castbar.Text:SetPoint("RIGHT", -50, 1
775    self.Castbar.Text:SetJustifyH("LEFT"
776 
777    self.Castbar.Time = SetFontString(self.Castbar, d3font, 14, "THINOUTLINE"
778    self.Castbar.Time:SetPoint("RIGHT", -2, 1
779 
780    --icon 
781    self.Castbar.Icon = self.Castbar:CreateTexture(nil, "BORDER"
782    self.Castbar.Icon:SetWidth(32
783    self.Castbar.Icon:SetHeight(32
784    self.Castbar.Icon:SetPoint("LEFT", -77, 0
785    self.Castbar.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9
786 
787    self.Castbar.IconBack = self.Castbar:CreateTexture(nil, "BACKGROUND"
788    self.Castbar.IconBack:SetPoint("TOPLEFT",self.Castbar.Icon,"TOPLEFT",-5,5
789    self.Castbar.IconBack:SetPoint("BOTTOMRIGHT",self.Castbar.Icon,"BOTTOMRIGHT",5,-5
790    self.Castbar.IconBack:SetTexture("Interface\\AddOns\\rTextures\\simplesquare_glow"
791    self.Castbar.IconBack:SetVertexColor(0, 0, 0, 1
792 
793    self.Castbar.IconOverlay = self.Castbar:CreateTexture(nil, "OVERLAY"
794    self.Castbar.IconOverlay:SetTexture("Interface\\AddOns\\rTextures\\gloss2.tga"
795    self.Castbar.IconOverlay:SetVertexColor(0.37,0.3,0.3,1); 
796    self.Castbar.IconOverlay:SetPoint("TOPLEFT", self.Castbar.Icon, "TOPLEFT", -1, 1
797    self.Castbar.IconOverlay:SetPoint("BOTTOMRIGHT", self.Castbar.Icon, "BOTTOMRIGHT", 1, -1
798 
799 
800    self.Castbar:SetScale(targetscale) 
801 
802  end 
803 
804  --lowhp func 
805  local function d3o2_createLowHP(self,unit) 
806    if unit == "player" then 
807      self.LowHP = self.Health:CreateTexture(nil, "ARTWORK"
808      self.LowHP:SetAllPoints(self.Health) 
809      self.LowHP:SetTexture("Interface\\AddOns\\rTextures\\orb_lowhp_glow.tga"
810      self.LowHP:SetBlendMode("BLEND"
811      self.LowHP:SetVertexColor(1, 0, 0, 1
812      self.LowHP:Hide() 
813    elseif unit == "target" then 
814      self.LowHP = self.Health:CreateTexture(nil, "ARTWORK"
815      self.LowHP:SetWidth(505
816      self.LowHP:SetHeight(115
817      self.LowHP:SetPoint("CENTER",-3,0
818      self.LowHP:SetTexture("Interface\\AddOns\\rTextures\\d3_targetframe_lowhp.tga"
819      self.LowHP:SetBlendMode("ADD"
820      self.LowHP:SetVertexColor(1, 0, 0, 1
821      self.LowHP:SetAlpha(0.8
822      self.LowHP:Hide() 
823    else 
824      self.LowHP = self.Health:CreateTexture(nil, "ARTWORK"
825      self.LowHP:SetWidth(250
826      self.LowHP:SetHeight(115
827      self.LowHP:SetPoint("CENTER",-2,0
828      self.LowHP:SetTexture("Interface\\AddOns\\rTextures\\d3totframe_lowhp.tga"
829      self.LowHP:SetBlendMode("ADD"
830      self.LowHP:SetVertexColor(1, 0, 0, 1
831      self.LowHP:SetAlpha(0.8
832      self.LowHP:Hide() 
833    end 
834  end 
835 
836  local function d3o2_createDebuffGlow(self,unit) 
837    if unit == "player" then 
838      self.DebuffHighlight = self:CreateTexture(nil, "BACKGROUND"
839      --self.DebuffHighlight:SetAllPoints(self) 
840      self.DebuffHighlight:SetWidth(self:GetWidth()) 
841      self.DebuffHighlight:SetHeight(self:GetWidth()) 
842      self.DebuffHighlight:SetPoint("CENTER",0,0
843      self.DebuffHighlight:SetBlendMode("BLEND"
844      self.DebuffHighlight:SetVertexColor(1, 0, 0, 0) -- set alpha to 0 to hide the texture 
845      self.DebuffHighlightAlpha = 0.7 
846      self.DebuffHighlightFilter = false 
847      self.DebuffHighlight:SetTexture("Interface\\AddOns\\rTextures\\orb_debuff_glow.tga"
848    elseif unit == "target" then 
849      self.DebuffHighlight = self:CreateTexture(nil, "OVERLAY"
850      self.DebuffHighlight:SetWidth(302
851      self.DebuffHighlight:SetHeight(self.DebuffHighlight:GetWidth()/4
852      self.DebuffHighlight:SetPoint("CENTER",-3,0
853      self.DebuffHighlight:SetBlendMode("BLEND"
854      self.DebuffHighlight:SetVertexColor(1, 0, 0, 0) -- set alpha to 0 to hide the texture 
855      self.DebuffHighlightAlpha = 0.8 
856      self.DebuffHighlightFilter = true 
857      self.DebuffHighlight:SetTexture("Interface\\AddOns\\rTextures\\d3_nameplate_border_glow.tga"
858    elseif unit == "targettarget" then 
859      self.DebuffHighlight = self:CreateTexture(nil, "OVERLAY"
860      self.DebuffHighlight:SetWidth(256
861      self.DebuffHighlight:SetHeight(self.DebuffHighlight:GetWidth()/2
862      self.DebuffHighlight:SetPoint("CENTER",-2,0
863      self.DebuffHighlight:SetBlendMode("BLEND"
864      self.DebuffHighlight:SetVertexColor(1, 0, 0, 0) -- set alpha to 0 to hide the texture 
865      self.DebuffHighlightAlpha = 0.8 
866      self.DebuffHighlightFilter = true 
867      self.DebuffHighlight:SetTexture("Interface\\AddOns\\rTextures\\d3totframe_debuff.tga"
868    else 
869      self.DebuffHighlight = self:CreateTexture(nil, "OVERLAY"
870      self.DebuffHighlight:SetWidth(256
871      self.DebuffHighlight:SetHeight(115
872      self.DebuffHighlight:SetPoint("BOTTOM",-2,-50
873      self.DebuffHighlight:SetBlendMode("BLEND"
874      self.DebuffHighlight:SetVertexColor(1, 0, 0, 0) -- set alpha to 0 to hide the texture 
875      self.DebuffHighlightAlpha = 0.8 
876      self.DebuffHighlightFilter = true 
877      self.DebuffHighlight:SetTexture("Interface\\AddOns\\rTextures\\d3totframe_debuff.tga"
878    end 
879  end 
880 
881  --create the elite head texture 
882  local bubblehead 
883  local function d3o2_createBubbleHead(self,unit) 
884    local headsize = 100 
885    local head = self.Health:CreateTexture(nil,"OVERLAY"
886    head:SetTexture("Interface\\AddOns\\rTextures\\d3_head_trans"
887    head:SetWidth(headsize) 
888    head:SetHeight(headsize/2
889    head:SetPoint("TOP",0,-6
890    bubblehead = head 
891    bubblehead:Hide() 
892  end 
893 
894  --create portraits func 
895  local function d3o2_createPortraits(self,unit) 
896    self.Portrait_bgf = CreateFrame("Frame",nil,self) 
897    self.Portrait_bgf:SetPoint("BOTTOM",self.Health,"TOP",0,14
898    self.Portrait_bgf:SetWidth(self:GetWidth()+10
899    self.Portrait_bgf:SetHeight(self:GetWidth()+10
900 
901    local back = self.Portrait_bgf:CreateTexture(nil, "BACKGROUND"
902    back:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT",-15,15
903    back:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOTTOMRIGHT",15,-15
904    back:SetTexture("Interface\\AddOns\\rTextures\\simplesquare_glow"
905    back:SetVertexColor(0, 0, 0, 0.7
906 
907    self.Portrait_bgt = self.Portrait_bgf:CreateTexture(nil, "BACKGROUND"
908    self.Portrait_bgt:SetAllPoints(self.Portrait_bgf) 
909    self.Portrait_bgt:SetTexture("Interface\\AddOns\\rTextures\\d3portrait_back2.tga"
910    self.Portrait_bgt:SetVertexColor(0.7,0.7,0.7
911 
912    if use_3dportraits == 1 and unit ~= "focustarget" then 
913      self.Portrait = CreateFrame("PlayerModel", nil, self.Portrait_bgf) 
914      self.Portrait:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT",4,-4
915      self.Portrait:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOTTOMRIGHT",-4,4
916 
917      self.Portrait_glossf = CreateFrame("Frame",nil,self.Portrait) 
918      self.Portrait_glossf:SetAllPoints(self.Portrait_bgf) 
919    else 
920      self.Portrait = self.Portrait_bgf:CreateTexture(nil, "BORDER"
921      self.Portrait:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT",2,-2
922      self.Portrait:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOTTOMRIGHT",-2,2
923 
924      self.Portrait_glossf = CreateFrame("Frame",nil,self.Portrait_bgf) 
925      self.Portrait_glossf:SetAllPoints(self.Portrait_bgf) 
926    end 
927 
928    self.Portrait_glosst = self.Portrait_glossf:CreateTexture(nil, "ARTWORK"
929    self.Portrait_glosst:SetAllPoints(self.Portrait_glossf) 
930    self.Portrait_glosst:SetTexture("Interface\\AddOns\\rTextures\\simplesquare_roth"
931    self.Portrait_glosst:SetVertexColor(0.37,0.3,0.3
932 
933    self.Name:SetPoint("BOTTOM", self.Portrait_bgf, "TOP", 0, 5
934    self.Name:SetFont(d3font,22,"THINOUTLINE"
935  end 
936 
937  local function d3o2_createAuraWatch(self,unit) 
938    --if unit ~= "target" then return end 
939    -- We only want to create this for the target 
940    local auras = CreateFrame("Frame", nil, self) 
941    auras:SetWidth(34
942    auras:SetHeight(34
943    auras:SetPoint("BOTTOMLEFT", self.Health, "TOPRIGHT", 58, -25
944 
945    local spellIDs = { 
946      48440, --reju 
947      48443, --regrowth 
948      48450, --lifebloom 
949      53249, --wildgrowth 
950    } 
951 
952    auras.presentAlpha = 1 
953    auras.missingAlpha = 0 
954    auras.PostCreateIcon = d3o2_createAuraIcon 
955    auras.icons = {} 
956    for i, sid in pairs(spellIDs) do 
957      local icon = CreateFrame("Frame", nil, auras) 
958      icon.spellID = sid 
959      icon:SetWidth(34
960      icon:SetHeight(34
961      icon:SetPoint("RIGHT", auras, "LEFT", 0, 38*i) 
962      auras.icons[sid] = icon 
963    end 
964    self.AuraWatch = auras 
965  end 
966 
967  --create special icons (raid, leader) 
968  local function d3o2_createIcons(self,unit) 
969    if unit == "player" then 
970      --nothing    
971    elseif unit == "target" then 
972      self.RaidIcon = self:CreateTexture(nil, "OVERLAY"
973      self.RaidIcon:SetHeight(24
974      self.RaidIcon:SetWidth(24
975      self.RaidIcon:SetPoint("RIGHT", self.Name, "LEFT", -5, 2
976      self.RaidIcon:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons"
977    else 
978      self.RaidIcon = self:CreateTexture(nil, "OVERLAY"
979      self.RaidIcon:SetHeight(16
980      self.RaidIcon:SetWidth(16
981      self.RaidIcon:SetPoint("RIGHT", self.Name, "LEFT", -2, 2
982      self.RaidIcon:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons"
983    end 
984 
985    if unit == "player" then 
986      self.Leader = self:CreateTexture(nil, "OVERLAY"
987      self.Leader:SetHeight(16
988      self.Leader:SetWidth(16
989      self.Leader:SetPoint("TOPLEFT", self, "TOPLEFT", 0, 0
990      self.Leader:SetTexture("Interface\\GroupFrame\\UI-Group-LeaderIcon"
991    elseif unit == "target" or unit == "targettarget" then 
992      -- nothing 
993    else 
994      self.Leader = self:CreateTexture(nil, "OVERLAY"
995      self.Leader:SetHeight(24
996      self.Leader:SetWidth(24
997      self.Leader:SetPoint("RIGHT", self.Health, "LEFT", -22, 22
998      self.Leader:SetTexture("Interface\\GroupFrame\\UI-Group-LeaderIcon"
999    end 
1000  end 
1001 
1002  local function d3o2_createComboPoints(self,unit) 
1003    self.CPoints = SetFontString(self.Health, d3font, 24, "THINOUTLINE"
1004    self.CPoints:SetPoint("LEFT", self.Name, "RIGHT", 5, -1
1005    self.CPoints:SetTextColor(1, .5, 0
1006    self.CPoints.unit = PlayerFrame.unit 
1007  end 
1008 
1009  --thanks to p3lim for this one 
1010  --it does fix the vehicle combopoints 
1011  local function updateCPoints(self, event, unit) 
1012    if(unit == PlayerFrame.unit) and (unit ~= self.CPoints.unit) then 
1013        self.CPoints.unit = unit 
1014        --am("ding "..unit) 
1015    end 
1016  end 
1017 
1018 
1019  local function make_me_movable(f) 
1020    if allow_frame_movement == 0 then 
1021      f:IsUserPlaced(false
1022    else 
1023      f:SetMovable(true
1024      f:SetUserPlaced(true
1025      if lock_all_frames == 0 then 
1026        f:EnableMouse(true
1027        f:RegisterForDrag("LeftButton","RightButton"
1028        f:SetScript("OnDragStart", function(self) if IsAltKeyDown() and IsShiftKeyDown() then self:StartMoving() end end
1029        f:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end
1030      end 
1031    end 
1032  end 
1033 
1034  ----------------------------- 
1035  -- CUSTOM TAGS 
1036  ----------------------------- 
1037 
1038  oUF.Tags["[d3o2name]"] = function(unit) 
1039    local tmpunitname = UnitName(unit) 
1040    if unit == "target" then 
1041      if tmpunitname:len() > 20 then 
1042        tmpunitname = tmpunitname:sub(1, 20).."..." 
1043      end 
1044    else 
1045      if tmpunitname:len() > 16 then 
1046        tmpunitname = tmpunitname:sub(1, 16).."..." 
1047      end 
1048    end 
1049    return tmpunitname 
1050  end 
1051 
1052  oUF.Tags["[d3o2misshp]"] = function(unit) 
1053    local max, min = UnitHealthMax(unit), UnitHealth(unit) 
1054    local v = max-min 
1055    local string = "" 
1056    if UnitIsDeadOrGhost(unit) == 1 then 
1057      string = "dead" 
1058    elseif UnitIsConnected(unit) == nil then 
1059      string = "off" 
1060    elseif v == 0 then 
1061      string = "" 
1062    elseif v > 1000000 then 
1063      string = -(floor((v/1000000)*10)/10).."m" 
1064    elseif v > 1000 then 
1065      string = -(floor((v/1000)*10)/10).."k" 
1066    else 
1067      string = -v 
1068    end 
1069    return string 
1070  end 
1071  oUF.TagEvents["[d3o2misshp]"] = "UNIT_HEALTH" 
1072 
1073  oUF.Tags["[d3o2abshp]"] = function(unit) 
1074    local v = UnitHealth(unit) 
1075    local string = "" 
1076    if UnitIsDeadOrGhost(unit) == 1 then 
1077      string = "dead" 
1078    elseif UnitIsConnected(unit) == nil then 
1079      string = "off" 
1080    elseif v > 1000000 then 
1081      string = (floor((v/1000000)*10)/10).."m" 
1082    elseif v > 1000 then 
1083      string = (floor((v/1000)*10)/10).."k" 
1084    else 
1085      string = v 
1086    end 
1087    return string 
1088  end 
1089  oUF.TagEvents["[d3o2abshp]"] = "UNIT_HEALTH" 
1090 
1091  oUF.Tags["[d3o2absmp]"] = function(unit) 
1092    local v = UnitMana(unit) 
1093    local string = "" 
1094    if v > 1000000 then 
1095      string = (floor((v/1000000)*10)/10).."m" 
1096    elseif v > 1000 then 
1097      string = (floor((v/1000)*10)/10).."k" 
1098    else 
1099      string = v 
1100    end 
1101    return string 
1102  end 
1103  oUF.TagEvents["[d3o2absmp]"] = "UNIT_ENERGY UNIT_FOCUS UNIT_MANA UNIT_RAGE UNIT_RUNIC_POWER" 
1104 
1105  oUF.Tags["[d3o2classtext]"] = function(unit) 
1106    bubblehead:Hide() 
1107    local string, tmpstring, sp = "", "", " " 
1108    if UnitLevel(unit) ~= -1 then 
1109      string = UnitLevel(unit) 
1110    else 
1111      string = "??" 
1112    end 
1113    string = string..sp 
1114    local unitrace = UnitRace(unit) 
1115    local creatureType = UnitCreatureType(unit) 
1116    if unitrace and UnitIsPlayer(unit) then 
1117      string = string..unitrace..sp 
1118    end 
1119    if creatureType and not UnitIsPlayer(unit) then 
1120      string = string..creatureType..sp 
1121    end 
1122    local unit_classification = UnitClassification(unit) 
1123    if unit_classification == "worldboss" then 
1124      tmpstring = "Boss" 
1125      bubblehead:Show() 
1126      bubblehead:SetTexture("Interface\\AddOns\\rTextures\\d3_head_skull"
1127    elseif unit_classification == "rare" or unit_classification == "rareelite" then 
1128      tmpstring = "Rare" 
1129      bubblehead:Show() 
1130      bubblehead:SetTexture("Interface\\AddOns\\rTextures\\d3_head_diablo"
1131      if unit_classification == "rareelite" then 
1132        tmpstring = tmpstring.." Elite" 
1133      end 
1134    elseif unit_classification == "elite" then 
1135      tmpstring = "Elite" 
1136      bubblehead:Show() 
1137      bubblehead:SetTexture("Interface\\AddOns\\rTextures\\d3_head_garg"
1138    end 
1139    if tmpstring ~= "" then 
1140      tmpstring = tmpstring..sp 
1141    end 
1142    string = string..tmpstring 
1143    tmpstring = "" 
1144    local localizedClass, englishClass = UnitClass(unit) 
1145 
1146    if localizedClass and UnitIsPlayer(unit) then 
1147      string = string..localizedClass..sp 
1148    end 
1149    return string 
1150  end 
1151 
1152  ----------------------------- 
1153  -- CREATE STYLES 
1154  ----------------------------- 
1155 
1156  --create the player style 
1157  local function CreatePlayerStyle(self, unit) 
1158    if use_rbottombarstyler ~= 1 then 
1159      d3o2_setupFrame(self,orbsize,orbsize,"BACKGROUND"
1160      d3o2_createOrb(self,"health"
1161      make_me_movable(self) 
1162      d3o2_createOrb(self,"power"
1163      make_me_movable(self.Power) 
1164      self.HealthValueHolder = CreateFrame("FRAME", nil, self.Health) 
1165      self.HealthValueHolder:SetFrameStrata("LOW"
1166      self.HealthValueHolder:SetAllPoints(self.Health) 
1167      local hpval1 = SetFontString(self.HealthValueHolder, d3font, 28, "THINOUTLINE"
1168      hpval1:SetPoint("CENTER", 0, 10
1169      local hpval2 = SetFontString(self.HealthValueHolder, d3font, 16, "THINOUTLINE"
1170      hpval2:SetPoint("CENTER", 0, -10
1171      hpval2:SetTextColor(0.6,0.6,0.6
1172      self.PowerValueHolder = CreateFrame("FRAME", nil, self.Power) 
1173      self.PowerValueHolder:SetFrameStrata("LOW"
1174      self.PowerValueHolder:SetAllPoints(self.Power) 
1175      local mpval1 = SetFontString(self.PowerValueHolder, d3font, 28, "THINOUTLINE"
1176      mpval1:SetPoint("CENTER", 0, 10
1177      local mpval2 = SetFontString(self.PowerValueHolder, d3font, 16, "THINOUTLINE"
1178      mpval2:SetPoint("CENTER", 0, -10
1179      mpval2:SetTextColor(0.6,0.6,0.6
1180      self:Tag(hpval1, "[perhp]"
1181      self:Tag(hpval2, "[d3o2abshp]"
1182      --cannot use custom events with frequentupdates enabled 
1183      --self:Tag(mpval1, "[perpp]") 
1184      --self:Tag(mpval2, "[d3o2absmp]") 
1185      --set the subobjects to be available for the d3o2_updatePlayerPower func 
1186      self.mpval1 = mpval1 
1187      self.mpval2 = mpval2 
1188      self.PostUpdateHealth = d3o2_updatePlayerHealth 
1189      self.PostUpdatePower = d3o2_updatePlayerPower 
1190      d3o2_createLowHP(self,unit) 
1191      d3o2_createDebuffGlow(self,unit) 
1192      d3o2_createIcons(self,unit) 
1193    end 
1194    --d3o2_createCastbar(self,unit) 
1195    self:SetScale(playerscale) 
1196  end 
1197 
1198  --create the target style 
1199  local function CreateTargetStyle(self, unit) 
1200    d3o2_setupFrame(self,224,20,"BACKGROUND"
1201    make_me_movable(self) 
1202    d3o2_createHealthPowerFrames(self,unit) 
1203    d3o2_createBuffs(self,unit) 
1204    d3o2_createDebuffs(self,unit) 
1205    d3o2_createBubbleHead(self,unit) 
1206    local name = SetFontString(self, d3font, 20, "THINOUTLINE"
1207    name:SetPoint("BOTTOM", self, "TOP", 0, 30
1208    local hpval = SetFontString(self.Health, d3font, 14, "THINOUTLINE"
1209    hpval:SetPoint("RIGHT", self.Health, "RIGHT", -2, 2
1210    local classtext = SetFontString(self, d3font, 16, "THINOUTLINE"
1211    classtext:SetPoint("BOTTOM", self, "TOP", 0, 13
1212    self.Name = name 
1213    self:Tag(name, "[d3o2name]"
1214    self:Tag(hpval, "[d3o2abshp] - [perhp]%"
1215    self:Tag(classtext, "[d3o2classtext]"
1216 
1217    d3o2_createCastbar(self,unit) 
1218    d3o2_createLowHP(self,unit) 
1219    d3o2_createDebuffGlow(self,unit) 
1220    d3o2_createIcons(self,unit) 
1221    d3o2_createComboPoints(self,unit) 
1222    self:RegisterEvent('UNIT_COMBO_POINTS', updateCPoints) 
1223 
1224    self.PostUpdateHealth = d3o2_updateHealth 
1225    self.PostUpdatePower = d3o2_updatePower 
1226    self.PostCreateAuraIcon = d3o2_createAuraIcon 
1227    self:SetScale(targetscale) 
1228  end 
1229 
1230  --create the tot style 
1231  local function CreateToTStyle(self, unit) 
1232    d3o2_setupFrame(self,110,20,"BACKGROUND"
1233    make_me_movable(self) 
1234    d3o2_createHealthPowerFrames(self,unit) 
1235    d3o2_createDebuffs(self,unit) 
1236    local name = SetFontString(self, d3font, 18, "THINOUTLINE"
1237    name:SetPoint("BOTTOM", self, "TOP", 0, 15
1238    local hpval = SetFontString(self.Health, d3font, 14, "THINOUTLINE"
1239    hpval:SetPoint("RIGHT", self.Health, "RIGHT", -2, 2
1240    self.Name = name 
1241    self:Tag(name, "[d3o2name]"
1242    self:Tag(hpval, "[perhp]%"
1243 
1244    d3o2_createLowHP(self,unit) 
1245    d3o2_createDebuffGlow(self,unit) 
1246    d3o2_createIcons(self,unit) 
1247 
1248    self.PostUpdateHealth = d3o2_updateHealth 
1249    self.PostUpdatePower = d3o2_updatePower 
1250    self.PostCreateAuraIcon = d3o2_createAuraIcon 
1251    self:SetScale(targetscale) 
1252  end 
1253 
1254  --create the focus, pet and party style 
1255  local function CreateFocusStyle(self, unit) 
1256    d3o2_setupFrame(self,110,200,"BACKGROUND"
1257    d3o2_createHealthPowerFrames(self,unit) 
1258    d3o2_createDebuffs(self,unit) 
1259    local name = SetFontString(self, d3font, 18, "THINOUTLINE"
1260    name:SetPoint("BOTTOM", self, "TOP", 0, 15
1261    self.Name = name 
1262    self:Tag(name, "[d3o2name]"
1263    local hpval = SetFontString(self.Health, d3font, 20, "THINOUTLINE"
1264    hpval:SetPoint("RIGHT", self.Health, "RIGHT", -2, 0
1265    self:Tag(hpval, "[d3o2misshp]"
1266 
1267    d3o2_createLowHP(self,unit) 
1268    d3o2_createDebuffGlow(self,unit) 
1269    d3o2_createPortraits(self,unit) 
1270    if unit == "focus" then 
1271      d3o2_createCastbar(self,unit) 
1272    end 
1273    d3o2_createIcons(self,unit) 
1274 
1275    if myclass == "DRUID" then 
1276      d3o2_createAuraWatch(self,unit) 
1277    end 
1278 
1279    self.PostUpdateHealth = d3o2_updateHealth 
1280    self.PostUpdatePower = d3o2_updatePower 
1281    self.PostCreateAuraIcon = d3o2_createAuraIcon 
1282    self:SetScale(focusscale) 
1283 
1284    if (not unit) then 
1285      self.Range = true 
1286      self.outsideRangeAlpha = 0.6 
1287      self.inRangeAlpha = 1 
1288    else 
1289      make_me_movable(self) 
1290    end 
1291 
1292  end 
1293 
1294 
1295  ----------------------------- 
1296  -- REGISTER STYLES 
1297  ----------------------------- 
1298 
1299  oUF:RegisterStyle("oUF_D3Orbs2_player", CreatePlayerStyle) 
1300 
1301  ----------------------------- 
1302  -- SPAWN UNITS 
1303  ----------------------------- 
1304 
1305  oUF:SetActiveStyle("oUF_D3Orbs2_player"
1306  oUF:Spawn("player", "oUF_D3Orbs2_PlayerFrame"):SetPoint(tabvalues.frame_positions[2].a1, tabvalues.frame_positions[2].af, tabvalues.frame_positions[2].a2, tabvalues.frame_positions[2].x, tabvalues.frame_positions[2].y) 
1307 
1308  ----------------------------- 
1309  -- CREATING D3 ART FRAMES 
1310  ----------------------------- 
1311 
1312  if use_rbottombarstyler ~= 1 then 
1313 
1314    local d3f = CreateFrame("Frame","oUF_D3Orbs_AngelFrame",UIParent) 
1315    d3f:SetFrameStrata("TOOLTIP"
1316    d3f:SetWidth(320
1317    d3f:SetHeight(160
1318    d3f:SetPoint(tabvalues.frame_positions[8].a1, tabvalues.frame_positions[8].af, tabvalues.frame_positions[8].a2, tabvalues.frame_positions[8].x, tabvalues.frame_positions[8].y) 
1319    d3f:Show() 
1320    d3f:SetScale(playerscale) 
1321    make_me_movable(d3f) 
1322    local d3t = d3f:CreateTexture(nil,"BACKGROUND"
1323    d3t:SetTexture("Interface\\AddOns\\rTextures\\d3_angel2"
1324    d3t:SetAllPoints(d3f) 
1325 
1326    local d3f2 = CreateFrame("Frame","oUF_D3Orbs_DemonFrame",UIParent) 
1327    d3f2:SetFrameStrata("TOOLTIP"
1328    d3f2:SetWidth(320
1329    d3f2:SetHeight(160
1330    d3f2:SetPoint(tabvalues.frame_positions[9].a1, tabvalues.frame_positions[9].af, tabvalues.frame_positions[9].a2, tabvalues.frame_positions[9].x, tabvalues.frame_positions[9].y) 
1331    d3f2:Show() 
1332    d3f2:SetScale(playerscale) 
1333    make_me_movable(d3f2) 
1334    local d3t2 = d3f2:CreateTexture(nil,"BACKGROUND"
1335    d3t2:SetTexture("Interface\\AddOns\\rTextures\\d3_demon2"
1336    d3t2:SetAllPoints(d3f2) 
1337 
1338    local d3f3 = CreateFrame("Frame","oUF_D3Orbs_BottomBarLine",UIParent) 
1339    d3f3:SetFrameStrata("TOOLTIP"
1340    d3f3:SetWidth(500
1341    d3f3:SetHeight(112
1342    d3f3:SetPoint(tabvalues.frame_positions[10].a1, tabvalues.frame_positions[10].af, tabvalues.frame_positions[10].a2, tabvalues.frame_positions[10].x, tabvalues.frame_positions[10].y) 
1343    d3f3:Show() 
1344    d3f3:SetScale(playerscale) 
1345    make_me_movable(d3f3) 
1346    local d3t3 = d3f3:CreateTexture(nil,"BACKGROUND"
1347    d3t3:SetTexture("Interface\\AddOns\\rTextures\\d3_bottom"
1348    d3t3:SetAllPoints(d3f3) 
1349 
1350    local d3f4 = CreateFrame("Frame","oUF_D3Orbs_BottomBarArt",UIParent) 
1351    d3f4:SetFrameStrata("BACKGROUND"
1352    d3f4:SetWidth(512
1353    d3f4:SetHeight(256
1354    d3f4:SetPoint(tabvalues.frame_positions[11].a1, tabvalues.frame_positions[11].af, tabvalues.frame_positions[11].a2, tabvalues.frame_positions[11].x, tabvalues.frame_positions[11].y) 
1355    d3f4:Show() 
1356    d3f4:SetScale(playerscale) 
1357    make_me_movable(d3f4) 
1358    local d3t4 = d3f4:CreateTexture(nil,"BACKGROUND"
1359    d3t4:SetAllPoints(d3f4) 
1360 
1361 
1362 
1363    if usebar == 2 then 
1364      d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar1"
1365    elseif usebar == 3 then 
1366      d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar2"
1367    elseif usebar == 4 then 
1368      d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar3"
1369    else 
1370      if MultiBarBottomRight:IsShown() then 
1371        d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar3"
1372      elseif MultiBarBottomLeft:IsShown() then 
1373        d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar2"
1374      else 
1375        d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar1"
1376      end 
1377      MultiBarBottomRight:HookScript("OnShow", function() d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar3") end
1378      MultiBarBottomRight:HookScript("OnHide", function() d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar2") end
1379      MultiBarBottomLeft:HookScript("OnShow", function() d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar2") end
1380      MultiBarBottomLeft:HookScript("OnHide", function() d3t4:SetTexture("Interface\\AddOns\\rTextures\\bar1") end
1381    end 
1382  end 
Download and save
Toggle line numbers
Thread:
[125488] oUF_D3Orbs player frame only by zork at 2009-09-21 02:47:31
Tip: Click the line numbers to toggle highliting on that line.

Paste followup:

Language:
Author:
Subject: