Skip to content

Commit

Permalink
core: register UNIT_ENTERED_VEHICLE, UNIT_EXITED_VEHICLE and UNIT_PET…
Browse files Browse the repository at this point in the history
… as unitless to properly get the updates.
  • Loading branch information
Adirelle committed Oct 27, 2013
1 parent e72ba5e commit 1eead35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ouf.lua
Expand Up @@ -213,14 +213,14 @@ local initObject = function(unit, style, styleFunc, header, ...)
end

if(not (suffix == 'target' or objectUnit and objectUnit:match'target')) then
object:RegisterEvent('UNIT_ENTERED_VEHICLE', updateActiveUnit)
object:RegisterEvent('UNIT_EXITED_VEHICLE', updateActiveUnit)
object:RegisterEvent('UNIT_ENTERED_VEHICLE', updateActiveUnit, true)
object:RegisterEvent('UNIT_EXITED_VEHICLE', updateActiveUnit, true)

-- We don't need to register UNIT_PET for the player unit. We register it
-- mainly because UNIT_EXITED_VEHICLE and UNIT_ENTERED_VEHICLE doesn't always
-- have pet information when they fire for party and raid units.
if(objectUnit ~= 'player') then
object:RegisterEvent('UNIT_PET', UpdatePet)
object:RegisterEvent('UNIT_PET', UpdatePet, true)
end
end

Expand Down

0 comments on commit 1eead35

Please sign in to comment.