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.
This commit is contained in:
+6
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user