9 - 3 hit history
Please provide a "3 hit" history. Acheron is a little "overweight" and this addition to your lightweight addon would make it perfect. As stated by Tiwack in your curse.com comment, Dart from Premonition has already made the required modifications, but it would be nice to get your input regarding his implementation.
function Obituary:ReportDeath(destGUID)
if(not damageTable[destGUID]) then
return;
end
local table_index = damageTable[destGUID]["i"];
OptVar = 1;
OptTot = "";
for index = table_index, LOG_LINES do
self:ReportDeathEx(destGUID, index)
OptVar = OptVar + 1;
end
for index = 1, table_index-1 do
self:ReportDeathEx(destGUID, index)
OptVar = OptVar + 1;
end
OptTot = "";
OptVar = 1;
-- Kalroth: *unsavory comment removed*
-- table.remove(damageTable, destGUID);
end
function Obituary:ReportDeathEx(destGUID, index)
if(not damageTable[destGUID][index]) then
return;
end
local lastDamage = damageTable[destGUID][index];
local damageType = "";
if lastDamage.crit then
damageType = damageType.." critical";
end
if lastDamage.crush then
damageType = damageType.." crushing";
end
local output = lastDamage.name.."; was killed"
if OptVar == 1 then
OptTot = lastDamage.name.."; was killed"
end
if lastDamage.spellName then
output = output.." by "..lastDamage.spellName
if OptVar > 1 then
OptTot = OptTot.." then by "..lastDamage.spellName.."("..lastDamage.amount..")"..damageType
else
OptTot = OptTot.." by "..lastDamage.spellName.."("..lastDamage.amount..")";
end
end
if lastDamage.sourceName then
output = output.." from "..lastDamage.sourceName
OptTot = OptTot.." from "..lastDamage.sourceName
end
-- print to the configured output
--self:Pour( format("%s (%d%s).", output, lastDamage.amount damageType), 1.0, 1.0, 1.0)
if OptVar == 3 then
--self:Print(ICON_LIST[8].."0\124t")
self:Pour( ICON_LIST[8].."0\124t"..OptTot, 1.0, 1.0, 1.0)
end
-- if (UnitInRaid("player")) then
-- SendChatMessage( format("%s (%d%s).", output, lastDamage.amount damageType), "RAID")
-- end
end