Fix for ticket 176.
Johnny C. Lam [10-16-12 - 01:20]
Fix for ticket 176.
The Ovale icon bar is being shown/hidden improperly when the player is in
a pseudo-vehicle where the player is controlling something other than
himself. Use UnitHasVehicleUI() instead of UnitInVehicle() to detect this
condition properly. UnitHasVehicleUI() returns true if the player has a
vehicle action bar, which corresponds to the player not being able to use
his own abilities.
Analysis and fix from Galvin in ticket 176.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@599 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/Ovale.lua b/Ovale.lua
index 6d8fb88..2f4c2c6 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -16,7 +16,7 @@ local Skada = Skada
local pairs, strsplit = pairs, string.split
local SendAddonMessage, UnitAura, UnitCanAttack = SendAddonMessage, UnitAura, UnitCanAttack
-local UnitExists, UnitInVehicle, UnitIsDead = UnitExists, UnitInVehicle, UnitIsDead
+local UnitExists, UnitHasVehicleUI, UnitIsDead = UnitExists, UnitHasVehicleUI, UnitIsDead
--</private-static-properties>
--<public-static-properties>
@@ -265,7 +265,7 @@ function Ovale:UpdateVisibility()
self.frame:Show()
- if OvaleOptions:GetApparence().hideVehicule and UnitInVehicle("player") then
+ if OvaleOptions:GetApparence().hideVehicule and UnitHasVehicleUI("player") then
self.frame:Hide()
end