mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- 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
This commit is contained in:
@ -172,6 +172,8 @@ function ComboPoints.prototype:Enable(core)
|
|||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints")
|
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints")
|
||||||
if IceHUD.WowVer >= 30000 then
|
if IceHUD.WowVer >= 30000 then
|
||||||
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints")
|
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints")
|
||||||
|
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "UpdateComboPoints")
|
||||||
|
self:RegisterEvent("UNIT_EXITED_VEHICLE", "UpdateComboPoints")
|
||||||
else
|
else
|
||||||
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
|
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
|
||||||
end
|
end
|
||||||
@ -293,7 +295,7 @@ function ComboPoints.prototype:UpdateComboPoints()
|
|||||||
points = 5
|
points = 5
|
||||||
elseif IceHUD.WowVer >= 30000 then
|
elseif IceHUD.WowVer >= 30000 then
|
||||||
-- Parnic: apparently some fights have combo points while the player is in a vehicle?
|
-- 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")
|
points = GetComboPoints(isInVehicle and "vehicle" or "player", "target")
|
||||||
else
|
else
|
||||||
points = GetComboPoints("target")
|
points = GetComboPoints("target")
|
||||||
|
Reference in New Issue
Block a user