From 83dfe88105ffa2e82243c16ae8f18d06761542ee Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Mon, 22 Sep 2014 19:33:11 +0200 Subject: [PATCH] Add a tag for Shaman's Maelstrom Weapon --- elements/tags.lua | 17 +++++++++++++++++ oUF_P3lim.lua | 2 ++ 2 files changed, 19 insertions(+) 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 -- 1.7.9.5