Quantcast

Add a Raid Group line for showing the unit's current party in a raid.

Scott Sibley [08-05-11 - 05:18]
Add a Raid Group line for showing the unit's current party in a raid.
Filename
Localization/enUS.lua
Modules/UnitTooltip/UnitTooltip.lua
diff --git a/Localization/enUS.lua b/Localization/enUS.lua
index a8a9e3b..96569e0 100644
--- a/Localization/enUS.lua
+++ b/Localization/enUS.lua
@@ -157,6 +157,7 @@ L["Casting:"] = true
 L["Fails"] = true
 L["Fails: %d"] = true
 L["Threat"] = true
+L["Raid Group"] = true
 -- UnitTooltip options
 L["Add Line"] = true
 L["A line named %s already exists."] = true
diff --git a/Modules/UnitTooltip/UnitTooltip.lua b/Modules/UnitTooltip/UnitTooltip.lua
index be83c82..f3313a7 100644
--- a/Modules/UnitTooltip/UnitTooltip.lua
+++ b/Modules/UnitTooltip/UnitTooltip.lua
@@ -777,6 +777,22 @@ return lastArena5
         update = 300,
         leftUpdating = true,
         cols = 100
+    },
+    [40] = {
+        name = L["Raid Group"],
+        enabled = true,
+        right = [[
+if UnitInRaid(unit) then
+ local size = GetNumRaidMembers()
+ local uname=Name(unit)
+ for i = 1, size do
+  local name,_,subgroup = GetRaidRosterInfo(i)
+  if uname==name then
+   return format("Raid Group: %s", subgroup)
+  end
+ end
+end
+]],
     }
 }
 for i, v in ipairs(defaultLines) do