Advertisement
Wetxius

Untitled

Feb 13th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. local T, C, L, _ = unpack(select(2, ...))
  2.  
  3. ----------------------------------------------------------------------------------------
  4. -- Temporary stuff
  5. ----------------------------------------------------------------------------------------
  6. local frame = CreateFrame("Frame")
  7. local function CallToArms(self, elapsed)
  8. self.elapsed = (self.elapsed or 0) + elapsed
  9. if self.elapsed >= 10 then
  10. local available = false
  11.  
  12. -- Dungeons
  13. for i = 1, GetNumRandomDungeons() do
  14. local id, name = GetLFGRandomDungeonInfo(i)
  15. for x = 1, LFG_ROLE_NUM_SHORTAGE_TYPES do
  16. local eligible, forTank, forHealer, forDamage, itemCount = GetLFGRoleShortageRewards(id, x)
  17. if eligible then
  18. if forTank and itemCount > 0 then
  19. RaidNotice_AddMessage(RaidWarningFrame, name.." "..TANK, ChatTypeInfo["RAID_WARNING"])
  20. print("|cffffff00"..name.." "..TANK.."|r")
  21. available = true
  22. elseif forHealer and itemCount > 0 then
  23. RaidNotice_AddMessage(RaidWarningFrame, name.." "..HEALER, ChatTypeInfo["RAID_WARNING"])
  24. print("|cffffff00"..name.." "..HEALER.."|r")
  25. available = true
  26. elseif forDamage and itemCount > 0 then
  27. RaidNotice_AddMessage(RaidWarningFrame, name.." "..DAMAGER, ChatTypeInfo["RAID_WARNING"])
  28. print("|cffffff00"..name.." "..DAMAGER.."|r")
  29. available = true
  30. end
  31. end
  32. end
  33. if available then
  34. PlaySound("RaidWarning", "master")
  35. end
  36. end
  37.  
  38. -- LFR
  39. for i = 1, GetNumRFDungeons() do
  40. local id, name = GetRFDungeonInfo(i)
  41. for x = 1, LFG_ROLE_NUM_SHORTAGE_TYPES do
  42. local eligible, forTank, forHealer, forDamage, itemCount = GetLFGRoleShortageRewards(id, x)
  43. if eligible then
  44. if forTank and itemCount > 0 then
  45. RaidNotice_AddMessage(RaidWarningFrame, name.." "..TANK, ChatTypeInfo["RAID_WARNING"])
  46. print("|cffffff00"..name.." "..TANK.."|r")
  47. available = true
  48. elseif forHealer and itemCount > 0 then
  49. RaidNotice_AddMessage(RaidWarningFrame, name.." "..HEALER, ChatTypeInfo["RAID_WARNING"])
  50. print("|cffffff00"..name.." "..HEALER.."|r")
  51. available = true
  52. elseif forDamage and itemCount > 0 then
  53. RaidNotice_AddMessage(RaidWarningFrame, name.." "..DAMAGER, ChatTypeInfo["RAID_WARNING"])
  54. print("|cffffff00"..name.." "..DAMAGER.."|r")
  55. available = true
  56. end
  57. end
  58. end
  59. if available then
  60. PlaySound("RaidWarning", "master")
  61. end
  62. end
  63.  
  64. self.elapsed = 0
  65. end
  66. end
  67. frame:SetScript("OnUpdate", CallToArms)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement