Add a tag for Shaman's Maelstrom Weapon
Adrian L Lange [09-22-14 - 17:33]
Add a tag for Shaman's Maelstrom Weapon
diff --git a/elements/tags.lua b/elements/tags.lua
index a00d5b4..c41e55a 100644
--- a/elements/tags.lua
+++ b/elements/tags.lua
@@ -39,6 +39,7 @@ local events = {
leader = 'PARTY_LEADER_CHANGED',
combo = 'UNIT_COMBO_POINTS PLAYER_TARGET_CHANGED',
anticipation = 'UNIT_AURA',
+ maelstrom = 'UNIT_AURA',
spell = 'UNIT_SPELLCAST_START UNIT_SPELLCAST_STOP UNIT_SPELLCAST_CHANNEL_START UNIT_SPELLCAST_CHANNEL_STOP',
color = 'UNIT_REACTION UNIT_FACTION',
status = 'UNIT_CONNECTION UNIT_HEALTH'
@@ -150,6 +151,22 @@ for tag, func in next, {
return points
end,
+ maelstrom = function(unit)
+ if(not UnitExists('target')) then return end
+
+ local index, charges = 1
+ repeat
+ local _, _, _, count, _, _, _, _, _, _, spellID = UnitAura(unit, index, 'HELPFUL')
+ if(spellID == 53817) then
+ charges = count
+ break
+ end
+
+ index = index + 1
+ until(not spellID)
+
+ return charges
+ end,
color = function(unit)
local reaction = UnitReaction(unit, 'player')
if((UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) or not UnitIsConnected(unit)) then
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index b89ee82..a813025 100644
--- a/oUF_P3lim.lua
+++ b/oUF_P3lim.lua
@@ -263,6 +263,8 @@ local UnitSpecific = {
if(playerClass == 'ROGUE') then
self:Tag(ComboPoints, '[p3lim:anticipation< ][p3lim:combo]')
+ elseif(playerClass == 'SHAMAN') then
+ self:Tag(ComboPoints, '[|cffd577e6>p3lim:maelstrom<|r][p3lim:combo]')
else
self:Tag(ComboPoints, '[p3lim:combo]')
end