Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Nov 20, 2023
1 parent 6106eea commit 850a1d4
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions ElvUI_Libraries/Core/oUF/ouf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,8 @@ local function initObject(unit, style, styleFunc, header, ...)
-- Expose the frame through oUF.objects.
tinsert(objects, object)

--[[ frame.IsPingable
This boolean can be set to false to disable the frame from being pingable. Enabled by default.
--]]
--[[ Override: frame:GetContextualPingType()
Used to define which contextual ping is used for the frame.
By default this wraps `C_Ping.GetContextualPingTypeForUnit(UnitGUID(frame.unit))`.
--]]
-- add the mixin for pings
if PingableType_UnitFrameMixin then
object:SetAttribute('ping-receiver', true)
Mixin(object, PingableType_UnitFrameMixin)
end

Expand Down Expand Up @@ -355,6 +348,17 @@ local function initObject(unit, style, styleFunc, header, ...)
object:SetAttribute('*type2', 'togglemenu')
object:SetAttribute('toggleForVehicle', true)

--[[ frame.IsPingable
This boolean can be set to false to disable the frame from being pingable. Enabled by default.
--]]
--[[ Override: frame:GetContextualPingType()
Used to define which contextual ping is used for the frame.
By default this wraps `C_Ping.GetContextualPingTypeForUnit(UnitGUID(frame.unit))`.
--]]
if PingableType_UnitFrameMixin then
object:SetAttribute('ping-receiver', true)
end

if(isEventlessUnit(objectUnit)) then
oUF:HandleEventlessUnit(object)
else
Expand Down Expand Up @@ -645,6 +649,10 @@ do
frame:SetAttribute('*type1', 'target')
frame:SetAttribute('*type2', 'togglemenu')
frame:SetAttribute('oUF-guessUnit', unit)
if PingableType_UnitFrameMixin then
object:SetAttribute('ping-receiver', true)
end
end
local body = header:GetAttribute('oUF-initialConfigFunction')
Expand Down

0 comments on commit 850a1d4

Please sign in to comment.