Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local eventframe = CreateFrame("Frame", nil)
- local raidframe = CreateFrame("Frame", "dispellassistRow", dispellassistAnchor) -- WHere names go on
- local fontaids = raidframe:CreateFontString("aidsstring", "OVERLAY","GameFontHighlight" ) --Fontstring for names on window
- local lfdrole = raidframe:CreateTexture(nil, "OVERLAY") -- Texture for role icon
- --raid1
- function eventframe:UNIT_AURA(self, event, unit)
- local playername = UnitName("player")
- local renew = GetSpellInfo(139)
- local buff = UnitBuff(unit, renew)
- --local name, _, _, _, _, duration, expires = UnitDebuff("player", TaintOfTheSea) -- change player to raid1
- if buff then
- if not debuffexists then
- debuffexists = true
- fontaids:SetPoint("TOPLEFT", dispellassistAnchor, "TOPLEFT", 7,-25)
- fontaids:SetText('1 ' .. ' ' .. ' ' .. ' ' .. ' ' .. ' ' .. playername)
- fontaids:SetFont(titleFont, 14);
- local role = UnitGroupRolesAssigned("player")
- if role=="HEALER" then
- lfdrole:SetPoint("TOPLEFT", dispellassistAnchor, "TOPLEFT", 16,-23)
- lfdrole:SetSize(15,15)
- lfdrole:SetTexture([[Interface\AddOns\Aidsfest\media\textures\healer.tga]])
- lfdrole:Show()
- end
- if role=="DAMAGER" then
- lfdrole:SetPoint("TOPLEFT", dispellassistAnchor, "TOPLEFT", 16,-23)
- lfdrole:SetSize(15,15)
- lfdrole:SetTexture([[Interface\AddOns\Aidsfest\media\textures\dps.tga]])
- lfdrole:Show()
- end
- if role=="TANK" then
- lfdrole:SetPoint("TOPLEFT", dispellassistAnchor, "TOPLEFT", 16,-23)
- lfdrole:SetSize(15,15)
- lfdrole:SetTexture([[Interface\AddOns\Aidsfest\media\textures\tank.tga]])
- lfdrole:Show()
- end
- end -- ends if not debuffexists
- else
- debuffexists = false
- fontaids:Hide()
- lfdrole:Hide()
- end -- Ends if name then
- end -- Ends function for raid1
- eventframe:SetScript("OnEvent", function(self, event, ...)
- self[event](self, event, ...)
- end)
- eventframe:RegisterEvent("PLAYER_ENTERING_WORLD");
- function eventframe:PLAYER_ENTERING_WORLD(event, ...)
- self:RegisterEvent("UNIT_AURA")
- end
- function eventframe:ENCOUNTER_END()
- self:UnregisterEvent("UNIT_AURA")
- self:UnregisterEvent("ENCOUNTER_END")
- end
- function eventframe:ENCOUNTER_START(event, encounterID)
- if encounterID == 1829 then
- self:RegisterEvent("UNIT_AURA")
- self:RegisterEvent("ENCOUNTER_END")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement