View Single Post
08-23-18, 06:48 PM   #4
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Originally Posted by Xrystal View Post
I guess there is a difference between [@vehicle, exists] and [vehicleUI] in regards to the posessbar.
Here is that code section so you can see the logic flow and why vehicle stuff is in there two different ways:
Code:
-- If we have a skinned vehicle bar or skinned override bar, display the OverrideActionBar
if ((HasVehicleActionBar() and UnitVehicleSkin("player") and UnitVehicleSkin("player") ~= "")
or (HasOverrideActionBar() and GetOverrideBarSkin() and GetOverrideBarSkin() ~= 0)) then
    -- For now, a vehicle has precedence over override bars (hopefully designers make it so these never conflict)
    if (HasVehicleActionBar()) then
        OverrideActionBar_Setup(UnitVehicleSkin("player"), GetVehicleBarIndex());
    else
        OverrideActionBar_Setup(GetOverrideBarSkin(), GetOverrideBarIndex());
    end
-- If we have a non-skinned override bar of some sort, use the MainMenuBarArtFrame
elseif ( HasBonusActionBar() or HasOverrideActionBar() or HasVehicleActionBar() or HasTempShapeshiftActionBar() or C_PetBattles.IsInBattle() ) then
    if (HasVehicleActionBar()) then
        MainMenuBarArtFrame:SetAttribute("actionpage", GetVehicleBarIndex());
    elseif (HasOverrideActionBar()) then
        MainMenuBarArtFrame:SetAttribute("actionpage", GetOverrideBarIndex());
    elseif (HasTempShapeshiftActionBar()) then
        MainMenuBarArtFrame:SetAttribute("actionpage", GetTempShapeshiftBarIndex());
    elseif (HasBonusActionBar() and GetActionBarPage() == 1) then
        MainMenuBarArtFrame:SetAttribute("actionpage", GetBonusBarIndex());
    else
        MainMenuBarArtFrame:SetAttribute("actionpage", GetActionBarPage());
    end
else
    -- Otherwise, display the normal action bar
    ActionBarController_ResetToDefault(force);
end
  Reply With Quote