View Single Post
11-19-12, 09:43 AM   #6
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Maybe I can help. Afaik it is the macro condition that gets you in trouble.

Neither [vehicleui] or [overridebar] are firing. But still the OverrideActionBar shows up in the default UI.

Can be checked with this macro from Phanx:
Lua Code:
  1. /run local s=SecureCmdOptionParse print(s("[extrabar]extrabar"),s("[overridebar]overridebar"),s("[possessbar]possessbar"),s("[vehicleui]vehicleui"))

How come? It turns out that actually what fired is [possessbar].

Now, to fix the problem and not to destroy normal possessbar behaviour it is possible to create a new condition that checks for the vehicle unit. That is: [possessbar,@vehicle,exists]

Here is my DIFF on rABS:
http://code.google.com/p/rothui/sour...verridebar.lua
http://code.google.com/p/rothui/sour.../core/bar1.lua

Not sure nUI is actually using macro conditions. But that is what worked for me.

If you are not using macro conditions and are using function check instead you can use sth like this:
Lua Code:
  1. --function check
  2.         if ((HasVehicleActionBar() and UnitVehicleSkin("player") and UnitVehicleSkin("player") ~= "")
  3.         or (HasOverrideActionBar() and GetOverrideBarSkin() and GetOverrideBarSkin() ~= ""))
  4.         or UnitHasVehicleUI("player") then
  5.           --I am the OverrideActionBar
  6.         else
  7.           --No thank you
  8.         end

The default ActionBarController is using the same check.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)