From 66479e12b952c13b2cd705717098e4535a939c18 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Sat, 27 Sep 2008 22:52:14 +0200 Subject: [PATCH] Added new "type" attribute to the state stance map definition. The new "type" attribute allows the state header to use any macro conditions to be used for paging, currently only used in Warlocks Metamorphosis which only reacts on "stance" and not on "bonusbar" in build 8982. If type is not set, it defaults to "bonusbar" for compat reasons. --- ActionBarStates.lua | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ActionBarStates.lua b/ActionBarStates.lua index 84b9533..ab3942e 100644 --- a/ActionBarStates.lua +++ b/ActionBarStates.lua @@ -43,7 +43,7 @@ local DefaultStanceMap = setmetatable({}, { __index = function(t,k) } elseif k == "WARLOCK" then newT = { - { id = "metamorphosis", name = GetSpellInfo(59672), index = 2 }, + { id = "metamorphosis", name = GetSpellInfo(59672), index = 2, type = "stance"}, } end rawset(t, k, newT) @@ -98,17 +98,13 @@ function ActionBar:UpdateStates() for i,v in pairs(stancemap) do local state = self:GetStanceState(v) if state and state ~= 0 and v.index then - if playerclass == "WARLOCK" then - table_insert(statedriver, fmt("[stance:%s]%s", v.index, state)) - else - if playerclass == "DRUID" and v.id == "cat" then - local prowl = self:GetStanceState("prowl") - if prowl then - table_insert(statedriver, fmt("[bonusbar:%s,stealth:1]%s", v.index, prowl)) - end + if playerclass == "DRUID" and v.id == "cat" then + local prowl = self:GetStanceState("prowl") + if prowl then + table_insert(statedriver, fmt("[bonusbar:%s,stealth:1]%s", v.index, prowl)) end - table_insert(statedriver, fmt("[bonusbar:%s]%s", v.index, state)) end + table_insert(statedriver, fmt("[%s:%s]%s", v.type or "bonusbar", v.index, state)) end end end