Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. local eventframe = CreateFrame("Frame", nil)
  2. local raidframe = CreateFrame("Frame", "dispellassistRow", dispellassistAnchor) -- WHere names go on
  3. local fontaids = raidframe:CreateFontString("aidsstring", "OVERLAY","GameFontHighlight" ) --Fontstring for names on window
  4. local lfdrole = raidframe:CreateTexture(nil, "OVERLAY") -- Texture for role icon
  5.  
  6. --raid1
  7. function eventframe:UNIT_AURA(self, event, unit)
  8. local playername = UnitName("player")
  9. local renew = GetSpellInfo(139)
  10. local buff = UnitBuff(unit, renew)
  11. --local name, _, _, _, _, duration, expires = UnitDebuff("player", TaintOfTheSea) -- change player to raid1
  12. if buff then
  13. if not debuffexists then
  14. debuffexists = true
  15. fontaids:SetPoint("TOPLEFT", dispellassistAnchor, "TOPLEFT", 7,-25)
  16. fontaids:SetText('1 ' .. ' ' .. ' ' .. ' ' .. ' ' .. ' ' .. playername)
  17. fontaids:SetFont(titleFont, 14);
  18.  
  19. local role = UnitGroupRolesAssigned("player")
  20. if role=="HEALER" then
  21. lfdrole:SetPoint("TOPLEFT", dispellassistAnchor, "TOPLEFT", 16,-23)
  22. lfdrole:SetSize(15,15)
  23. lfdrole:SetTexture([[Interface\AddOns\Aidsfest\media\textures\healer.tga]])
  24. lfdrole:Show()
  25. end
  26. if role=="DAMAGER" then
  27. lfdrole:SetPoint("TOPLEFT", dispellassistAnchor, "TOPLEFT", 16,-23)
  28. lfdrole:SetSize(15,15)
  29. lfdrole:SetTexture([[Interface\AddOns\Aidsfest\media\textures\dps.tga]])
  30. lfdrole:Show()
  31. end
  32. if role=="TANK" then
  33. lfdrole:SetPoint("TOPLEFT", dispellassistAnchor, "TOPLEFT", 16,-23)
  34. lfdrole:SetSize(15,15)
  35. lfdrole:SetTexture([[Interface\AddOns\Aidsfest\media\textures\tank.tga]])
  36. lfdrole:Show()
  37. end
  38. end -- ends if not debuffexists
  39. else
  40. debuffexists = false
  41. fontaids:Hide()
  42. lfdrole:Hide()
  43. end -- Ends if name then
  44. end -- Ends function for raid1
  45.  
  46.  
  47. eventframe:SetScript("OnEvent", function(self, event, ...)
  48. self[event](self, event, ...)
  49. end)
  50. eventframe:RegisterEvent("PLAYER_ENTERING_WORLD");
  51.  
  52.  
  53.  
  54. function eventframe:PLAYER_ENTERING_WORLD(event, ...)
  55. self:RegisterEvent("UNIT_AURA")
  56. end
  57.  
  58.  
  59. function eventframe:ENCOUNTER_END()
  60. self:UnregisterEvent("UNIT_AURA")
  61. self:UnregisterEvent("ENCOUNTER_END")
  62. end
  63.  
  64. function eventframe:ENCOUNTER_START(event, encounterID)
  65. if encounterID == 1829 then
  66. self:RegisterEvent("UNIT_AURA")
  67. self:RegisterEvent("ENCOUNTER_END")
  68. end
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement