From 41505f73ffa0b6da12f69a85207a00c77a449c67 Mon Sep 17 00:00:00 2001 From: Parnic Date: Thu, 20 Nov 2008 01:12:13 +0000 Subject: [PATCH] - switched from UnitIsInVehicle to Blizzard's method of UnitHasVehicleUI for determining where to get combo points from - registered ENTERED_VEHICLE and EXITED_VEHICLE events to update the combo points appropriately --- modules/ComboPoints.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ComboPoints.lua b/modules/ComboPoints.lua index 7b45a08..ed49a77 100644 --- a/modules/ComboPoints.lua +++ b/modules/ComboPoints.lua @@ -172,6 +172,8 @@ function ComboPoints.prototype:Enable(core) self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints") if IceHUD.WowVer >= 30000 then self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints") + self:RegisterEvent("UNIT_ENTERED_VEHICLE", "UpdateComboPoints") + self:RegisterEvent("UNIT_EXITED_VEHICLE", "UpdateComboPoints") else self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints") end @@ -293,7 +295,7 @@ function ComboPoints.prototype:UpdateComboPoints() points = 5 elseif IceHUD.WowVer >= 30000 then -- Parnic: apparently some fights have combo points while the player is in a vehicle? - local isInVehicle = UnitInVehicle("player") + local isInVehicle = UnitHasVehicleUI("player") points = GetComboPoints(isInVehicle and "vehicle" or "player", "target") else points = GetComboPoints("target")