SHARE
TWEET

Untitled

a guest Aug 12th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. lib.addPortrait = function(self)
  2.     local p = CreateFrame("PlayerModel", nil, self)
  3.     p:SetSize(234, 22)
  4.     p:SetFrameLevel(4)
  5.     p:SetPoint("BOTTOM", self, "BOTTOM", 0, 8)
  6.    
  7.     local darkoverlay = p:CreateTexture(nil, "OVERLAY")
  8.     darkoverlay:SetPoint("TOPLEFT", p,"TOPLEFT", 0, 1)
  9.     darkoverlay:SetPoint("BOTTOMRIGHT", p,"BOTTOMRIGHT", 0, 0)
  10.     darkoverlay:SetTexture(cfg.debuffHighlightTexture)
  11.     darkoverlay:SetVertexColor(0, 0, 0, 0.4)
  12.  
  13.     local bg = p:CreateTexture(nil, "OVERLAY")
  14.     bg:SetPoint("TOPLEFT", p,"TOPLEFT", 0, 1)
  15.     bg:SetPoint("BOTTOMRIGHT", p,"BOTTOMRIGHT", 0, 0)
  16.     bg:SetTexture(cfg.portraitBGTexture)
  17.     bg:SetVertexColor(0, 0, 0, 0.4)
  18.    
  19.     local overlay = p:CreateTexture(nil, "OVERLAY")
  20.     overlay:SetPoint("TOPLEFT", p,"TOPLEFT", 0, 1)
  21.     overlay:SetPoint("BOTTOMRIGHT", p,"BOTTOMRIGHT", 0, 0)
  22.     overlay:SetTexture(cfg.portraitOverlayTexture)
  23.     overlay:SetVertexColor(0, 0, 0, 1)
  24.    
  25.     createBGFrame(p, 3)
  26.     CreateShadowww(p, 4)
  27.    
  28.     self.Portrait = p
  29.     self.Portrait.PostUpdate = postUpdatePortrait
  30.     self.Portrait:SetPortraitZoom(1)
  31.     self.Portrait:SetPortraitZoom(.98)
  32. end
RAW Paste Data
Top