mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Attempt to fix pet health/power not updating when entering instance
This commit is contained in:
@ -54,7 +54,7 @@ function PetHealth.prototype:Enable(core)
|
||||
|
||||
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
||||
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
||||
self:RegisterEvent("PLAYER_ENTERING_WORLD", "CheckVehicle")
|
||||
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
|
||||
|
||||
self.frame:SetAttribute("unit", self.unit)
|
||||
RegisterUnitWatch(self.frame)
|
||||
@ -220,7 +220,9 @@ function PetHealth.prototype:ExitingVehicle(event, unit)
|
||||
end
|
||||
end
|
||||
|
||||
function PetHealth.prototype:CheckVehicle()
|
||||
function PetHealth.prototype:EnteringWorld()
|
||||
self:Update(self.unit)
|
||||
|
||||
if UnitHasVehicleUI("player") then
|
||||
self:EnteringVehicle(nil, "player", true)
|
||||
else
|
||||
|
@ -88,7 +88,7 @@ function PetMana.prototype:Enable(core)
|
||||
|
||||
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
||||
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
||||
self:RegisterEvent("PLAYER_ENTERING_WORLD", "CheckVehicle")
|
||||
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
|
||||
|
||||
self:CheckPet()
|
||||
self:ManaType(nil, self.unit)
|
||||
@ -239,7 +239,9 @@ function PetMana.prototype:ExitingVehicle(event, unit)
|
||||
end
|
||||
end
|
||||
|
||||
function PetMana.prototype:CheckVehicle()
|
||||
function PetMana.prototype:EnteringWorld()
|
||||
self:Update(self.unit)
|
||||
|
||||
if UnitHasVehicleUI("player") then
|
||||
self:EnteringVehicle(nil, "player", true)
|
||||
else
|
||||
|
Reference in New Issue
Block a user