Attempt to fix pet health/power not updating when entering instance

This commit is contained in:
Parnic
2019-06-03 22:46:24 -05:00
parent 53b59b5be2
commit 901b49f7b3
2 changed files with 8 additions and 4 deletions

View File

@ -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