mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- removed entering/exiting vehicle events since we really only care about entered/exited
- made sure to check that the unit who entered/exited a vehicle was actually the player before swapping out units. this was causing the player's health/mana/casting bars to go crazy in battlegrounds and anywhere that people were getting in and out of vehicles around the player
This commit is contained in:
@ -301,8 +301,6 @@ function CastBar.prototype:Enable(core)
|
|||||||
CastBar.super.prototype.Enable(self, core)
|
CastBar.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
||||||
self:RegisterEvent("UNIT_ENTERING_VEHICLE", "EnteringVehicle")
|
|
||||||
self:RegisterEvent("UNIT_EXITING_VEHICLE", "ExitingVehicle")
|
|
||||||
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
||||||
|
|
||||||
if self.moduleSettings.enabled and not self.moduleSettings.showBlizzCast then
|
if self.moduleSettings.enabled and not self.moduleSettings.showBlizzCast then
|
||||||
@ -311,15 +309,19 @@ function CastBar.prototype:Enable(core)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function CastBar.prototype:EnteringVehicle()
|
function CastBar.prototype:EnteringVehicle(unit)
|
||||||
|
if (unit == "player") then
|
||||||
self.unit = "vehicle"
|
self.unit = "vehicle"
|
||||||
self:Update(self.unit)
|
self:Update(self.unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function CastBar.prototype:ExitingVehicle()
|
function CastBar.prototype:ExitingVehicle(unit)
|
||||||
|
if (unit == "player") then
|
||||||
self.unit = "player"
|
self.unit = "player"
|
||||||
self:Update(self.unit)
|
self:Update(self.unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,8 +76,6 @@ function PlayerHealth.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_FACTION", "CheckPvP")
|
self:RegisterEvent("UNIT_FACTION", "CheckPvP")
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
||||||
self:RegisterEvent("UNIT_ENTERING_VEHICLE", "EnteringVehicle")
|
|
||||||
self:RegisterEvent("UNIT_EXITING_VEHICLE", "ExitingVehicle")
|
|
||||||
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
||||||
|
|
||||||
if AceLibrary:HasInstance("LibHealComm-3.0") then
|
if AceLibrary:HasInstance("LibHealComm-3.0") then
|
||||||
@ -669,17 +667,21 @@ function PlayerHealth.prototype:GetOptions()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function PlayerHealth.prototype:EnteringVehicle()
|
function PlayerHealth.prototype:EnteringVehicle(unit)
|
||||||
|
if (unit == "player") then
|
||||||
self.unit = "vehicle"
|
self.unit = "vehicle"
|
||||||
self:RegisterFontStrings()
|
self:RegisterFontStrings()
|
||||||
self:Update(self.unit)
|
self:Update(self.unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function PlayerHealth.prototype:ExitingVehicle()
|
function PlayerHealth.prototype:ExitingVehicle(unit)
|
||||||
|
if (unit == "player") then
|
||||||
self.unit = "player"
|
self.unit = "player"
|
||||||
self:RegisterFontStrings()
|
self:RegisterFontStrings()
|
||||||
self:Update(self.unit)
|
self:Update(self.unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,8 +112,6 @@ function PlayerMana.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
||||||
self:RegisterEvent("UNIT_ENTERING_VEHICLE", "EnteringVehicle")
|
|
||||||
self:RegisterEvent("UNIT_EXITING_VEHICLE", "ExitingVehicle")
|
|
||||||
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
||||||
|
|
||||||
-- allow new 'predicted power' stuff to show the power updates constantly instead of ticking
|
-- allow new 'predicted power' stuff to show the power updates constantly instead of ticking
|
||||||
@ -144,17 +142,21 @@ function PlayerMana.prototype:SetupOnUpdate(enable)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function PlayerMana.prototype:EnteringVehicle()
|
function PlayerMana.prototype:EnteringVehicle(unit)
|
||||||
|
if (unit == "player") then
|
||||||
self.unit = "vehicle"
|
self.unit = "vehicle"
|
||||||
self:RegisterFontStrings()
|
self:RegisterFontStrings()
|
||||||
self:Update(self.unit)
|
self:Update(self.unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function PlayerMana.prototype:ExitingVehicle()
|
function PlayerMana.prototype:ExitingVehicle(unit)
|
||||||
|
if (unit == "player") then
|
||||||
self.unit = "player"
|
self.unit = "player"
|
||||||
self:RegisterFontStrings()
|
self:RegisterFontStrings()
|
||||||
self:Update(self.unit)
|
self:Update(self.unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user