/Tukui/modules/unitframes/core/oUF/units.lua
http://github.com/Asphyxia/Tukui · Lua · 20 lines · 16 code · 3 blank · 1 comment · 10 complexity · 2e8f7a485e8b2d404c91e4953a544341 MD5 · raw file
- local parent, ns = ...
- local oUF = ns.oUF
- local Private = oUF.Private
- local enableTargetUpdate = Private.enableTargetUpdate
- -- Handles unit specific actions.
- function oUF:HandleUnit(object, unit)
- local unit = object.unit or unit
- if(unit == 'target') then
- object:RegisterEvent('PLAYER_TARGET_CHANGED', object.UpdateAllElements)
- elseif(unit == 'mouseover') then
- object:RegisterEvent('UPDATE_MOUSEOVER_UNIT', object.UpdateAllElements)
- elseif(unit == 'focus') then
- object:RegisterEvent('PLAYER_FOCUS_CHANGED', object.UpdateAllElements)
- elseif(unit:match'%w+target' or unit:match'(boss)%d?$' == 'boss') then
- enableTargetUpdate(object)
- end
- end