Skip to content

Commit

Permalink
nameplates: check for secure before styling
Browse files Browse the repository at this point in the history
effectively disables styling in dungeons
  • Loading branch information
sbaildon committed Nov 22, 2020
1 parent 5f51b1b commit 5ede4ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/nameplates/nameplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function sPlates:NAME_PLATE_UNIT_ADDED(...)
end

hooksecurefunc("CompactUnitFrame_UpdateAggroFlash", function(frame)
if issecure() then return end
if UnitIsPlayer(frame.unit) then return end

local status = UnitThreatSituation("player", frame.unit)
Expand All @@ -59,6 +60,7 @@ hooksecurefunc("CompactUnitFrame_UpdateAggroFlash", function(frame)
end)

hooksecurefunc("CompactUnitFrame_UpdateHealthColor", function(frame)
if issecure() then return end
local r, g, b = frame.healthBar:GetStatusBarColor()
frame.healthBar.background:SetVertexColor(r*multiplier, g*multiplier, b*multiplier, 1)
end)
Expand Down

0 comments on commit 5ede4ed

Please sign in to comment.