/trunk
-- if new amount is larger than the stored amount we'll want to store it |
if amount > data.amount then |
self:NewRecord(tree, spellID, periodic, amount, critical, data, isFiltered) |
if not isFiltered then |
self:NewRecord(self:GetFullSpellName(spellID, periodic, true), amount, critical) |
-- update the highest record if needed |
local topRecords = topRecords[tree] |
if amount > topRecords[hitType] then |
callbacks:Fire("OnNewTopRecord", tree) |
end |
end |
callbacks:Fire("NewRecord", tree, spellID, periodic, amount, critical, data, isFiltered) |
data.amount = amount |
data.target = destName |
end |
function Critline:NewRecord(spell, amount, crit) |
function Critline:NewRecord(tree, spellID, periodic, amount, critical, prevRecord, isFiltered) |
callbacks:Fire("NewRecord", tree, spellID, periodic, amount, critical, prevRecord, isFiltered) |
if isFiltered then |
return |
end |
amount = self:ShortenNumber(amount) |
if self.db.profile.oldRecord and prevRecord.amount > 0 then |
amount = format("%s (%s)", amount, self:ShortenNumber(prevRecord.amount)) |
end |
if self.db.profile.chatOutput then |
self:Message(format(L["New %s%s record - %d"], crit and L["critical "] or "", spell, amount)) |
self:Message(format(L["New %s%s record - %s"], critical and L["critical "] or "", self:GetFullSpellName(spellID, periodic, true), amount)) |
end |
if self.db.profile.sound then |
[16803] = true, -- Death Knight Understudy |
[22841] = true, -- Shade of Akama |
[33329] = true, -- Heart of the Deconstructor |
[33670] = true, -- Aerial Command Unit |
[34496] = true, -- Eydis Darkbane |
[34497] = true, -- Fjola Lightbane |
[38567] = true, -- Phantom Hallucination |
[58549] = true, -- Tenacity (Lake Wintergrasp) |
[59641] = true, -- Warchief's Blessing (The Battle For The Undercity) |
[60964] = true, -- Strength of Wrynn (The Battle For The Undercity) |
[61888] = true, -- Overwhelming Power (Assembly of Iron - 10 man hard mode) |
[61888] = true, -- Overwhelming Power (Assembly of Iron - 25 man) |
[62243] = true, -- Unstable Sun Beam (Elder Brightleaf) |
[62650] = true, -- Fortitude of Frost (Yogg-Saron) |
[62670] = true, -- Resilience of Nature (Yogg-Saron) |
[62671] = true, -- Speed of Invention (Yogg-Saron) |
[62702] = true, -- Fury of the Storm (Yogg-Saron) |
[63277] = true, -- Shadow Crash (General Vezax) |
[63711] = true, -- Storm Power (Hodir 10 man) |
[63711] = true, -- Storm Power (Hodir - 10 man) |
[64320] = true, -- Rune of Power (Assembly of Iron) |
[64321] = true, -- Potent Pheromones (Freya) |
[64637] = true, -- Overwhelming Power (Assembly of Iron - 25 man hard mode) |
[65134] = true, -- Storm Power (Hodir 25 man) |
[64637] = true, -- Overwhelming Power (Assembly of Iron - 10 man) |
[65134] = true, -- Storm Power (Hodir - 25 man) |
[70867] = true, -- Essence of the Blood Queen (Blood Queen Lana'thel) |
[70879] = true, -- Essence of the Blood Queen (Blood Queen Lana'thel, bitten by a player) |
[72219] = true, -- Gastric Bloat (Festergut) |
end |
spell = format(L["New %s record!"], addon:GetFullSpellName(spellID, periodic, true)) |
amount = addon:ShortenNumber(amount) |
if self.profile.oldRecord and prevRecord.amount > 0 then |
amount = format("%s (%s)", addon:ShortenNumber(amount), addon:ShortenNumber(prevRecord.amount)) |
amount = format("%s (%s)", amount, addon:ShortenNumber(prevRecord.amount)) |
end |
local colors = self.profile.colors |
libs\LibStub.lua |
libs\CallbackHandler-1.0.lua |
libs\AceDB-3.0.lua |
libs\AceDBOptions-3.0.lua |
libs\AceLocale-3.0.lua |
libs\LibDataBroker-1.1.lua |
libs\LibDualSpec-1.0.lua |