Advertisement
Luunii

Untitled

Oct 7th, 2022
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. -- Combat Indicator
  2. CPT=CreateFrame("Frame")
  3. CPT:SetParent(PlayerFrame)
  4. CPT:SetPoint("Bottom",PlayerFrame,355,-525)
  5. CPT:SetSize(24,24)
  6. CPT.t=CPT:CreateTexture(nil,BORDER)
  7. CPT.t:SetAllPoints()
  8. CPT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")
  9. CPT:Hide()
  10.  
  11. local function FrameOnUpdate(self) if UnitAffectingCombat("Player") then self:Show() else self:Hide() end end
  12. local g = CreateFrame("Frame")
  13. g:SetScript("OnUpdate", function(self) FrameOnUpdate(CPT) end)
  14.  
  15. CTT=CreateFrame("Frame")
  16. CTT:SetParent(TargetFrame)
  17. CTT:SetPoint("Bottom",TargetFrame,40,24)
  18. CTT:SetSize(18,18)
  19. CTT.t=CTT:CreateTexture(nil,BORDER)
  20. CTT.t:SetAllPoints()
  21. CTT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")
  22. CTT:Hide()
  23.  
  24. local function FrameOnUpdate(self) if UnitAffectingCombat("target") then self:Show() else self:Hide() end end
  25. local g = CreateFrame("Frame")
  26. g:SetScript("OnUpdate", function(self) FrameOnUpdate(CTT) end)
  27.  
  28. CFT=CreateFrame("Frame")
  29. CFT:SetParent(FocusFrame)
  30. CFT:SetPoint("Bottom",FocusFrame,40,24)
  31. CFT:SetSize(18,18)
  32. CFT.t=CFT:CreateTexture(nil,BORDER)
  33. CFT.t:SetAllPoints()
  34. CFT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")
  35. CFT:Hide()
  36.  
  37. local function FrameOnUpdate(self) if UnitAffectingCombat("focus") then self:Show() else self:Hide() end end
  38. local g = CreateFrame("Frame")
  39. g:SetScript("OnUpdate", function(self) FrameOnUpdate(CFT) end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement