Optimize and harden raid frames
This commit is contained in:
@@ -12,16 +12,17 @@ local module = ShaguTweaks:register({
|
||||
|
||||
module.enable = function(self)
|
||||
ShaguTweaks.UnitFrame_NewComponent('combat feedback', {
|
||||
onupdate = true,
|
||||
events = {
|
||||
'UNIT_COMBAT',
|
||||
},
|
||||
|
||||
create = function(frame)
|
||||
-- create combat feedback text
|
||||
frame.feedback = frame.mana:CreateFontString("feedback"..GetTime(), "OVERLAY", "NumberFontNormalHuge")
|
||||
frame.feedback = frame.mana:CreateFontString(nil, "OVERLAY", "NumberFontNormalHuge")
|
||||
frame.feedback:SetFont(DAMAGE_TEXT_FONT, 12, "OUTLINE")
|
||||
frame.feedback:SetParent(frame.mana)
|
||||
frame.feedback:ClearAllPoints(frame.bar)
|
||||
frame.feedback:ClearAllPoints()
|
||||
frame.feedback:SetPoint("CENTER", frame.bar, "CENTER", 0, 0)
|
||||
|
||||
frame.feedbackFontHeight = 12
|
||||
@@ -32,7 +33,7 @@ module.enable = function(self)
|
||||
update = function(frame, event)
|
||||
if event and event == 'UNIT_COMBAT' then
|
||||
-- update with latest values
|
||||
if arg1 ~= this.unitstr then return end
|
||||
if arg1 ~= frame.unitstr then return end
|
||||
CombatFeedback_OnCombatEvent(arg2, arg3, arg4, arg5)
|
||||
else
|
||||
-- animate combat text
|
||||
|
||||
Reference in New Issue
Block a user