From 0106928aef10d3b28c862f2098372f1de6730661 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sun, 28 Oct 2012 23:58:11 +0000 Subject: [PATCH] Avoid nil GUIDs. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@633 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleAura.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/OvaleAura.lua b/OvaleAura.lua index ec2b5fb..5bd5acf 100644 --- a/OvaleAura.lua +++ b/OvaleAura.lua @@ -175,7 +175,18 @@ function OvaleAura:UpdateAuras(unitId, unitGUID) local hateClasse local damageMultiplier - if not unitId then return end + if not unitId then + return + end + if not unitGUID and unitId == "player" then + unitGUID = self.playerGUID + end + if not unitGUID then + unitGUID = UnitGUID(unitId) + end + if not unitGUID then + return + end if unitId == "player" then hateBase = GetCombatRatingBonus(18) @@ -186,13 +197,6 @@ function OvaleAura:UpdateAuras(unitId, unitGUID) hateClasse = 0 damageMultiplier = 1 end - - if not unitGUID and unitId == "player" then - unitGUID = self.playerGUID - end - if not unitGUID then - unitGUID = UnitGUID(unitId) - end if not self.aura[unitGUID] then self.aura[unitGUID] = {} -- 1.7.9.5