View Single Post
08-27-18, 09:32 PM   #11
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Can you put this into it's own temp addon and see if it works for that quest:
Code:
local addonName, addon = ...

------------------------------------------------------
--[[                  Bar Setup                   ]]--
------------------------------------------------------
local actionbar = CreateFrame('Frame', addonName .. "ActionBar", UIParent, 'SecureHandlerStateTemplate')
actionbar:SetPoint('CENTER')
actionbar:SetSize(51 * 12, 51)

local background = actionbar:CreateTexture(nil, 'BACKGROUND')
actionbar.background = background
background:SetColorTexture(0, 0, 0, 0.5)
background:SetAllPoints()

actionbar:Execute([[
    ActionButtons = newtable()
]])

------------------------------------------------------
--[[                 Button Setup                 ]]--
------------------------------------------------------
local lastButton
for id = 1, NUM_ACTIONBAR_BUTTONS do    
    local button = CreateFrame('CheckButton', "$parentButton" .. id, actionbar, 'ActionBarButtonTemplate')
    button:SetID(id)
    button:SetSize(50, 50)

    if id ~= 1 then
        button:SetPoint('LEFT', lastButton, 'RIGHT', 1, 0)
    else
        button:SetPoint('LEFT', 5, 0)
    end

    button.NormalTexture:Hide()

    actionbar:SetFrameRef("button", button)
    actionbar:Execute(([[
        ActionButtons[%s] = self:GetFrameRef("button")
    ]]):format(id))

    lastButton = button
end

actionbar:Execute([[
    self:SetAttribute("frameref-button", nil)
]])

------------------------------------------------------
--[[                 Paging Stuff                 ]]--
------------------------------------------------------
actionbar:SetAttribute("_onstate-page", [[
	newstate = tonumber(newstate)
	for id, button in ipairs(ActionButtons) do
		button:SetAttribute('actionpage', newstate)
	end
]])

local paging = {
    ("[vehicleui] %d"):format(GetVehicleBarIndex()),
    ("[overridebar] %s"):format(GetOverrideBarIndex()),
    ("[possessbar] [@vehicle, exists] %s"):format(GetVehicleBarIndex()),
    ("[shapeshift] %d"):format(GetTempShapeshiftBarIndex())
}
for index = 2, NUM_ACTIONBAR_PAGES do
    paging[#paging + 1] = ("[bar:%d] %d"):format(index, index)
end
for index = 1, 5 do
    paging[#paging + 1] = ("[bonusbar:%d] %d"):format(index, index + NUM_ACTIONBAR_PAGES)
end
paging[#paging + 1] = "1"
RegisterStateDriver(actionbar, "page", strjoin("; ", unpack(paging)))

------------------------------------------------------
--[[                 Leave Button                 ]]--
------------------------------------------------------
OverrideActionBarLeaveFrameLeaveButton:SetParent(actionbar)
OverrideActionBarLeaveFrameLeaveButton:SetAllPoints(lastButton)
RegisterStateDriver(OverrideActionBarLeaveFrameLeaveButton, "visibility", "[canexitvehicle] show; hide")
Of course make sure you change it to a better spot/size so you can actually play.
  Reply With Quote