From 0e398e3816e352ffb5492e8ca2946d2441b8435c Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Tue, 16 Oct 2012 01:20:32 +0000 Subject: [PATCH] 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 --- Ovale.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- -- @@ -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 -- 1.7.9.5