Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local T, C, L, _ = unpack(select(2, ...))
- ----------------------------------------------------------------------------------------
- -- Temporary stuff
- ----------------------------------------------------------------------------------------
- local frame = CreateFrame("Frame")
- local function CallToArms(self, elapsed)
- self.elapsed = (self.elapsed or 0) + elapsed
- if self.elapsed >= 10 then
- local available = false
- -- Dungeons
- for i = 1, GetNumRandomDungeons() do
- local id, name = GetLFGRandomDungeonInfo(i)
- for x = 1, LFG_ROLE_NUM_SHORTAGE_TYPES do
- local eligible, forTank, forHealer, forDamage, itemCount = GetLFGRoleShortageRewards(id, x)
- if eligible then
- if forTank and itemCount > 0 then
- RaidNotice_AddMessage(RaidWarningFrame, name.." "..TANK, ChatTypeInfo["RAID_WARNING"])
- print("|cffffff00"..name.." "..TANK.."|r")
- available = true
- elseif forHealer and itemCount > 0 then
- RaidNotice_AddMessage(RaidWarningFrame, name.." "..HEALER, ChatTypeInfo["RAID_WARNING"])
- print("|cffffff00"..name.." "..HEALER.."|r")
- available = true
- elseif forDamage and itemCount > 0 then
- RaidNotice_AddMessage(RaidWarningFrame, name.." "..DAMAGER, ChatTypeInfo["RAID_WARNING"])
- print("|cffffff00"..name.." "..DAMAGER.."|r")
- available = true
- end
- end
- end
- if available then
- PlaySound("RaidWarning", "master")
- end
- end
- -- LFR
- for i = 1, GetNumRFDungeons() do
- local id, name = GetRFDungeonInfo(i)
- for x = 1, LFG_ROLE_NUM_SHORTAGE_TYPES do
- local eligible, forTank, forHealer, forDamage, itemCount = GetLFGRoleShortageRewards(id, x)
- if eligible then
- if forTank and itemCount > 0 then
- RaidNotice_AddMessage(RaidWarningFrame, name.." "..TANK, ChatTypeInfo["RAID_WARNING"])
- print("|cffffff00"..name.." "..TANK.."|r")
- available = true
- elseif forHealer and itemCount > 0 then
- RaidNotice_AddMessage(RaidWarningFrame, name.." "..HEALER, ChatTypeInfo["RAID_WARNING"])
- print("|cffffff00"..name.." "..HEALER.."|r")
- available = true
- elseif forDamage and itemCount > 0 then
- RaidNotice_AddMessage(RaidWarningFrame, name.." "..DAMAGER, ChatTypeInfo["RAID_WARNING"])
- print("|cffffff00"..name.." "..DAMAGER.."|r")
- available = true
- end
- end
- end
- if available then
- PlaySound("RaidWarning", "master")
- end
- end
- self.elapsed = 0
- end
- end
- frame:SetScript("OnUpdate", CallToArms)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement