Your nagging made me go to a quest that I knew from Wrath that always made problems.
You are right. Exactly the case on that quest. >_>
Returns wrong bar index upon entering. At least I now have a testcase.
http://imgur.com/EQxZUEx
Of course the bar index is correct after reload or if I add a wierd condition like modifier and hit CTRL.
Changed it back to
Lua Code:
for i, button in next, buttonList do
frame:SetFrameRef(cfg.buttonName..i, button)
end
frame:Execute(([[
buttons = table.new()
for i=1, %d do
table.insert(buttons, self:GetFrameRef("%s"..i))
end
]]):format(cfg.numButtons, cfg.buttonName))
frame:SetAttribute("_onstate-page", [[
for i, button in next, buttons do
button:SetAttribute("actionpage", newstate)
end
]])
RegisterStateDriver(frame, "page", "[overridebar]14;[shapeshift]13;[vehicleui]12;[possessbar]11;[bonusbar:4]10;[bonusbar:3]9;[bonusbar:2]8;[bonusbar:1]7;[bar:6]6;[bar:5]5;[bar:4]4;[bar:3]3;[bar:2]2;1")
Now what might happen is that the condition does not match the actual bar-id in some cases. Because I know of some quests that trigger for possessbar and show stuff in the vehiclebar under index 12 (if I'm not totally mistaken).
Will keep it at that for now until further issues occur.
Code:
/run local s=SecureCmdOptionParse print(s("[bonusbar]bb;no-bb"),s("[canexitvehicle]cev;no-cev"),s("[overridebar]ob;no-ob"),s("[possessbar]pb;no-pb"),s("[shapeshift]ss;no-ss"),s("[vehicleui]vui;no-vui"),s("[@vehicle,exists]ve;no-ve"))
/run print("vb"..GetVehicleBarIndex(), "ob"..GetOverrideBarIndex(), "tss"..GetTempShapeshiftBarIndex(), "bb"..GetBonusBarIndex(), "ab"..GetActionBarPage())
/run print(HasVehicleActionBar() or "nov-ab", HasOverrideActionBar() or "no-ob", HasTempShapeshiftActionBar() or "no-tss", HasBonusActionBar() or "no-bb")