- same fix as r763, but for the player's cast bar this time

This commit is contained in:
Parnic
2010-11-05 05:02:16 +00:00
parent 4149d4e733
commit 94c2099736

View File

@ -298,6 +298,7 @@ function CastBar.prototype:Enable(core)
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "CheckVehicle")
if self.moduleSettings.enabled and not self.moduleSettings.showBlizzCast then
self:ToggleBlizzCast(false)
@ -321,6 +322,15 @@ function CastBar.prototype:ExitingVehicle(event, unit)
end
function CastBar.prototype:CheckVehicle()
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
end
end
function CastBar.prototype:Disable(core)
CastBar.super.prototype.Disable(self, core)