From bc9b775b95e24ae1a64e33ff7f873f9b23694673 Mon Sep 17 00:00:00 2001 From: Xinhuan Date: Tue, 25 Nov 2008 06:09:44 +0800 Subject: [PATCH] Fix "Passed X% of Y's threat" message where it would report your name instead of the tank's name if you passed your tank's aggro AND pulled aggro at the same time. --- Omen.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Omen.lua b/Omen.lua index bb6510f..237e924 100644 --- a/Omen.lua +++ b/Omen.lua @@ -1549,7 +1549,7 @@ function Omen:UpdateBars() myClass == "DRUID" and GetBonusBarOffset() == 3 or myClass == "PALADIN" and UnitAura("player", GetSpellInfo(25780)) or myClass == "DEATHKNIGHT" and GetShapeshiftFormInfo(GetShapeshiftForm()) == "Interface\\Icons\\Spell_Deathknight_FrostPresence") then - self:Warn(t.Sound, t.Flash, t.Shake, t.Message and L["Passed %s%% of %s's threat!"]:format(t.Threshold, guidNameLookup[tankGUID or mobTargetGUID or sortTable[1]])) + self:Warn(t.Sound, t.Flash, t.Shake, t.Message and L["Passed %s%% of %s's threat!"]:format(t.Threshold, guidNameLookup[lastWarn.tankGUID])) end end -- Remove TPS data if the last scanned mob is different @@ -1562,6 +1562,7 @@ function Omen:UpdateBars() tinsert(threatStoreTime, GetTime()) -- Store last scanned mob GUID lastWarn.mobGUID = mobGUID + lastWarn.tankGUID = tankGUID or mobTargetGUID or sortTable[1] lastWarn.threatpercent = myThreatPercent threatTable = nil end @@ -1582,6 +1583,7 @@ function Omen:ClearAll() self.BarList.barsShown = 0 -- Store last scanned mob GUID lastWarn.mobGUID = nil + lastWarn.tankGUID = nil lastWarn.threatpercent = 0 -- Remove TPS data delTable(threatStore)