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.

This commit is contained in:
Xinhuan
2008-11-25 06:09:44 +08:00
parent db863ec9a3
commit bc9b775b95
+3 -1
View File
@@ -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)