From 96201261ae77ad20b184e6f9c768df3c566017c2 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Mon, 15 Jan 2007 23:38:23 +0000 Subject: [PATCH] Restructured code to avoid an error on R_R_U --- PerfectRaid.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/PerfectRaid.lua b/PerfectRaid.lua index a385771..1a2631c 100644 --- a/PerfectRaid.lua +++ b/PerfectRaid.lua @@ -385,20 +385,20 @@ local function OnAttributeChanged(frame, name, value) end end - local unitname = UnitName(value) - if not frame.unit then + if value then + local unitname = UnitName(value) + if not frame.unit then + frame.unit = value + frame.unitname = unitname + else + if frame.unit == value and frame.unitname == unitname then + return + end + end + frame.unit = value frame.unitname = unitname - else - if frame.unit == value and frame.unitname == unitname then - return - end - end - - frame.unit = value - frame.unitname = unitname - if value then -- Do Visual Configuration here local unit = value frame.name:SetText(self:GetColoredName(unit)) -- 1.7.9.5