mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added support to player health, mana, and cast bars to change which unit they are monitoring to be the vehicle when the player enters one
This commit is contained in:
@ -75,6 +75,11 @@ function PlayerHealth.prototype:Enable(core)
|
||||
self:RegisterEvent("PLAYER_FLAGS_CHANGED", "CheckPvP")
|
||||
self:RegisterEvent("UNIT_FACTION", "CheckPvP")
|
||||
|
||||
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
||||
self:RegisterEvent("UNIT_ENTERING_VEHICLE", "EnteringVehicle")
|
||||
self:RegisterEvent("UNIT_EXITING_VEHICLE", "ExitingVehicle")
|
||||
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
||||
|
||||
if AceLibrary:HasInstance("LibHealComm-3.0") then
|
||||
HealComm = AceLibrary("LibHealComm-3.0")
|
||||
HealComm.RegisterCallback(self, "HealComm_DirectHealStart", function(event, healerName, healSize, endTime, ...) self:HealComm_DirectHealStart(event, healerName, healSize, endTime, ...) end)
|
||||
@ -643,6 +648,20 @@ function PlayerHealth.prototype:GetOptions()
|
||||
end
|
||||
|
||||
|
||||
function PlayerHealth.prototype:EnteringVehicle()
|
||||
self.unit = "vehicle"
|
||||
self:RegisterFontStrings()
|
||||
self:Update(self.unit)
|
||||
end
|
||||
|
||||
|
||||
function PlayerHealth.prototype:ExitingVehicle()
|
||||
self.unit = "player"
|
||||
self:RegisterFontStrings()
|
||||
self:Update(self.unit)
|
||||
end
|
||||
|
||||
|
||||
function PlayerHealth.prototype:CreateFrame()
|
||||
PlayerHealth.super.prototype.CreateFrame(self)
|
||||
|
||||
|
Reference in New Issue
Block a user