Push to prepare v2

This commit is contained in:
Robin 2021-01-31 16:38:18 +01:00
parent 4a52e1c14d
commit ca3df09ad7
7 changed files with 175 additions and 190 deletions

View File

@ -45,12 +45,19 @@ local function GetDefaultSource(data, offset)
local offset = offset or 5
local src = CopyTable(defaultSource)
if(data) then
src['guid'] = data[offset]
src['name'] = data[offset + 1]
src['flags'] = data[offset + 2]
setClass(src, data[offset + 1], data[offset])
if(not src['name']) then
print("no src name", offset)
if(data:HasExtraSource()) then
offset = 16
-- return GetDefaultSource(data, 16)
end
src[1] = data[offset]
src[2] = data[offset + 1]
src['guid'] = data[offset]
src['name'] = data[offset + 1]
src['flags'] = data[offset + 2]
setClass(src, data[offset + 1], data[offset])
if(not src[2]) then
print("no src name", offset, data:HasExtraSource())
print(unpack(data))
end
end
@ -66,6 +73,8 @@ local defaultDestination = {
}
local function GetDefaultDestination(data)
local dest = CopyTable(defaultDestination)
dest[1] = data[9]
dest[2] = data[10]
dest['guid'] = data[9]
dest['name'] = data[10]
dest['flags'] = data[11]
@ -170,8 +179,8 @@ function methods_store:GetSourceEmpty(data)
local guid = "Unknown"
self['source'][guid] = self['source'][guid] or GetDefaultSource(data)
local src = self['source'][guid]
src['name'] = "<Unknown>"
src['guid'] = "Unknown"
src[2] = "<Unknown>"
src[1] = "Unknown"
src['data'] = data
for k, v in pairs(methods_source) do
src[k] = v

View File

@ -52,18 +52,19 @@ UNITNAME_SUMMON_TITLE7 = "Konstrukt von %s";
UNITNAME_SUMMON_TITLE8 = "Gegner von %s";
UNITNAME_SUMMON_TITLE9 = "Fahrzeug von %s";
]]
local LibGUID = LibStub("LibGUID")
addon['LibGUID'] = LibGUID
local methods_guid = {}
local scanIds = { 1, 2, 3, 7, 9, 26, 29}
local scanTip = CreateFrame("GameTooltip", format("%s_ScanTooltip",name), nil, "GameTooltipTemplate")
scanTip:SetOwner( WorldFrame, "ANCHOR_NONE" )
function methods_guid:scanTooltip()
if(self:HasOwner()) then return end
local guid = self['guid']
local guid = self[1]
local text = _G[format("%s_ScanTooltipTextLeft2",name)]
scanTip:SetOwner(WorldFrame, 'ANCHOR_NONE')
scanTip:SetHyperlink('unit:' .. guid or '')
if(text) then
if(guid and text) then
local text2 = text:GetText()
if(text2) then
for i = 1, #scanIds do
@ -98,30 +99,66 @@ local function GetGuid(unit)
end
end
function methods_guid:IsParty()
if(self['isParty'] ~= nil) then
-- return self['isParty']
end
if(self[3] and bit.band(self[3], COMBATLOG_OBJECT_AFFILIATION_OUTSIDER) == 0) then
self['isParty'] = true
else
self['isParty'] = false
end
return self['isParty']
end
function methods_guid:SetName(newName)
self['name'] = newName
local nameSplit, serverSplit = strsplit('-',self['name'],2)
self[2] = newName
local nameSplit, serverSplit = strsplit('-',self[2],2)
if(not serverSplit) then
serverSplit = GetNormalizedRealmName()
end
self['shortName'] = nameSplit
self['shortRealm'] = serverSplit
end
local function processPet(self, clot)
if(guid) then
local gi = addon:GetGuidInfo(guid, UnitFlag, UnitName)
if(gi['isPet'] ~= nil) then
return gi['isPet']
end
if(UnitFlag and bit.band(UnitFlag, COMBATLOG_OBJECT_TYPE_PET) > 0) then
gi['isPet'] = true
return true
else
gi['isPet'] = false
end
end
end
local pet_clots = {COMBATLOG_OBJECT_TYPE_PET, COMBATLOG_OBJECT_TYPE_GUARDIAN, COMBATLOG_OBJECT_TYPE_OBJECT}
function methods_guid:IsPet()
if(self['isPet'] ~= nil) then
return self['isPet']
end
if(self[2]) then
for i = 1, #pet_clots do
if(UnitFlag and bit.band(self[2], COMBATLOG_OBJECT_TYPE_PET) > 0) then
self['isPet'] = true
break
else
self['isPet'] = false
end
end
end
return self['isPet']
end
function methods_guid:HasOwner()
return self['ownerName'] or false
return self['ownerGuid'] or false
end
function methods_guid:SetOwner(gi)
-- print("set owner", self['name'], gi['name'])
self['isPet'] = true
if(gi) then
self['ownerName'] = gi['name']
self['ownerGuid'] = gi['guid']
self['ownerName'] = gi[2]
self['ownerGuid'] = gi[1]
if(gi:IsParty())then
self['isParty'] = true
end
@ -130,14 +167,13 @@ end
local function checkPet(unit)
local guid = GetGuid(unit)
if(guid) then
local unitName, unitRealm = UnitFullName(unit)
local _, unitClass = UnitClass(unit)
local o = addon:GetGuidInfo(guid, nil, unitRealm and format("%s-%s", unitName, unitRealm) or unitName, unitClass)
local o = addon:GetGuidInfo2(guid)
o:SetUnit(unit)
o['isParty'] = true
local pet = format("%sPET", unit)
local pguid = GetGuid(pet)
if(pguid) then
local p = addon:GetGuidInfo(pguid)
local p = addon:GetGuidInfo2(pguid)
p['isParty'] = true
p:SetOwner(o)
end
@ -145,8 +181,8 @@ local function checkPet(unit)
end
end
local function assocOwner(guid, petguid)
local gio = addon:GetGuidInfo(guid)
local gip = addon:GetGuidInfo(petguid)
local gio = addon:GetGuidInfo2(guid)
local gip = addon:GetGuidInfo2(petguid)
gip:SetOwner(gio)
end
local function group_helper(guids, endcount, unitbase)
@ -202,7 +238,7 @@ function addon:UNIT_TARGET(event, unit)
if(guid) then
local _, class = UnitClass(trg)
local fullName, realm = UnitFullName(trg)
local gi = addon:GetGuidInfo(guid, nil, realm and format("%s-%s", fullName, realm) or fullName, class)
local gi = addon:GetGuidInfo2(guid, class)
local clf = UnitClassification(trg)
-- print(trg, clf, UnitLevel(trg))
if(clf == 'elite') then
@ -216,7 +252,7 @@ function addon:UNIT_TARGET(event, unit)
-- print('find class')
local _, class = UnitClass(trg)
if(class) then
print('found class',class)
-- print('found class',class)
gi['class'] = class
end
end
@ -264,10 +300,25 @@ function addon:PurgeGuidInfo()
if(not guids[k]) then
-- print(guidInfo[k]['name'],'purged')
guidInfo[k] = nil
else
guidInfo[k]:Touch()
end
end
return guidInfo
end
function rebuildGI()
local guids = addon:GetGroupGuid()
guids = addon:GetSegmentsGuid(guids)
for i = 1,#QuicklogDB['segments'] do
local store = addon:GetStore(addon:GetSegment(i))
for guid, data in pairs(store['source']) do
local obj = addon:GetGuidInfo2(data)
for dguid, ddata in pairs(data['dest']) do
local obj2 = addon:GetGuidInfo2(ddata)
end
end
end
end
function addon:GetGuidInfoDB()
return guidInfo
end
@ -275,61 +326,31 @@ function addon:SetGuidInfoDB(db)
if(db and type(db) == 'table') then
guidInfo = db
end
for guid, data in pairs(guidInfo) do
guidInfo[guid] = LibGUID:UpdateGUID(guid, data)
end
rebuildGI()
return guidInfo
end
function addon:GetGuidInfo(guid, unitFlag, unitName, unitClass)
if(guid and guid ~= '') then
if(not guidInfo[guid] or not guidInfo[guid]['name']) then
if(guid == 'Unknown') then
guidInfo[guid] = {
['added'] = time(),
['isParty'] = false,
['isPet'] = false,
['name'] = "<Unknown>",
['guid'] = guid,
['class'] = 'WARRIOR',
}
else --if(UnitFlag and bit.band(UnitFlag, COMBATLOG_OBJECT_TYPE_PLAYER) ~= 0) then
local localizedClass, englishClass, localizedRace, englishRace, sexGuid, nameGuid, realmGuid = GetPlayerInfoByGUID(guid)
-- print("gg",guid, unitFlag, unitName, " = ", nameGuid, realmGuid)
-- print(UnitName, nameGuid, realmGuid,format("%s-%s", nameGuid, realmGuid),format("%s-%s", nameGuid, realmGuid) ~= UnitName)
if(nameGuid) then
if(not realmGuid or realmGuid=='') then
realmGuid = GetNormalizedRealmName()
end
guidInfo[guid] = {
['added'] = time(),
['name'] = realmGuid and format("%s-%s", nameGuid, realmGuid) or nameGuid,
['guid'] = guid,
['class'] = englishClass,
['classLocal'] = localizedClass,
['race'] = englishRace,
['raceLocal'] = localizedRace,
}
end
end
if(not guidInfo[guid]) then
guidInfo[guid] = {
['added'] = time(),
['name'] = unitName,
['guid'] = guid,
['flags'] = unitFlag
}
end
end
for k, v in pairs(methods_guid) do
guidInfo[guid][k] = v
end
if(unitClass and not guidInfo[guid]['class']) then
guidInfo[guid]['class'] = unitClass
end
if(guidInfo[guid]['name'] and not guidInfo[guid]['shortName']) then
guidInfo[guid]:SetName(guidInfo[guid]['name'])
end
if(not guidInfo[guid]['classColor']) then
guidInfo[guid]['classColor'] = addon:GetClassColors(guidInfo[guid]['class'])
end
-- guidInfo[guid]:scanTooltip()
return guidInfo[guid]
function addon:GetGuidInfo2(obj, unitClass)
obj = LibGUID:CreateGUIDObject(obj)
if(not obj) then return end
-- local objDB = obj:GetNamespace(name)
for k, v in pairs(methods_guid) do
obj[k] = v
end
end
if(obj[2]) then
obj:SetName(obj[2])
end
if(unitClass) then
obj['class'] = unitClass
end
if(obj['class'] and not obj['classColor']) then
obj['classColor'] = addon:GetClassColors(obj['class'])
end
guidInfo[obj[1]] = obj
return obj
end
LibGUID:RegisterPrune(function(self)
addon:PurgeGuidInfo()
end)

@ -1 +1 @@
Subproject commit b20f7ecfb0b98006d158ed372d0025fb9ec887bc
Subproject commit 11219e3ffe8f3a442feb799aa58e2ea5aea743f7

View File

@ -15,7 +15,7 @@ local function purgeDB(tbl)
return tbl
end
local dbdefaults = {
['maxSegments'] = 5,
['maxSegments'] = 10,
['maxTooltipSpells'] = 6,
['maxTooltipUnits'] = 5,
['currentSegment'] = 0,
@ -59,46 +59,6 @@ function addon:PLAYER_LOGOUT(event)
QuicklogDB = purgeDB(QuicklogDB)
-- QuicklogDB['GuidDB'] = nil
end
local function processPet(UnitFlag, UnitName, guid, clot)
if(guid) then
local gi = addon:GetGuidInfo(guid, UnitFlag, UnitName)
if(gi['isPet'] ~= nil) then
return gi['isPet']
end
if(UnitFlag and bit.band(UnitFlag, COMBATLOG_OBJECT_TYPE_PET) > 0) then
gi['isPet'] = true
return true
else
gi['isPet'] = false
end
end
end
local pet_clots = {COMBATLOG_OBJECT_TYPE_PET, COMBATLOG_OBJECT_TYPE_GUARDIAN, COMBATLOG_OBJECT_TYPE_OBJECT}
function addon:IsPet(UnitFlag, UnitName, guid)
local gi = addon:GetGuidInfo(guid, UnitFlag, UnitName)
for i = 1, #pet_clots do
processPet(UnitFlag, UnitName, guid, pet_clots[i])
if(gi['isPet'] == true) then break end
end
return gi['isPet']
end
function addon:IsInParty(UnitFlag, UnitName, guid)
--print("UF", UnitFlag, guid, data)
if(guid) then
local gi = addon:GetGuidInfo(guid, UnitFlag, UnitName)
if(gi) then
if(gi['isParty'] ~= nil) then
return gi['isParty']
end
if(UnitFlag and bit.band(UnitFlag, COMBATLOG_OBJECT_AFFILIATION_OUTSIDER) == 0) then
gi['isParty'] = true
return true
else
gi['isParty'] = false
end
end
end
end
local function init(seg, data)
print('initSeg', data and #data)
if(data) then
@ -131,7 +91,15 @@ local function computeEvent(data, prefix, suffix)
if(canCompute(suffix)) then
local res = addon:GetSegment()
local store = addon:GetStore(res)
local source = store:GetSource(data[5], data)
local data_src = data:GetSource()
local gis = addon:GetGuidInfo2(data_src)
local source
if(data_src and gis:IsPet()) then
source = store:GetSource(data_src['ownerGuid'], data)
else
source = store:GetSource(data[5], data)
end
if(not source) then
source = NoSource(data)
if(not source) then
@ -155,7 +123,7 @@ local function computeEvent(data, prefix, suffix)
amount = amount - overkill
end
if(resisted or blocked) then
local destSource = store:GetSource(dest['guid'], data)
local destSource = store:GetSource(dest[1], data)
if(resisted and resisted > 0) then
destSource:addTotal('totalAbsorbed', resisted)
end
@ -168,8 +136,8 @@ local function computeEvent(data, prefix, suffix)
if(spellId) then
dest:addSpell(spellId, spellName, spellSchool, amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing, isOffHand)
if(resisted or blocked) then
local destSource = store:GetSource(dest['guid'], data)
local destSourceDest = destSource:GetDestination(dest['guid'])
local destSource = store:GetSource(dest[1], data)
local destSourceDest = destSource:GetDestination(dest[1])
if(resisted and resisted > 0) then
destSourceDest:addAbsorbSpell('RESISTED', 'RESISTED', 1, resisted)
end
@ -179,8 +147,8 @@ local function computeEvent(data, prefix, suffix)
end
end
else
print("no amount")
print(unpack(data))
-- print("no amount")
-- print(unpack(data))
end
elseif(suffix == 'ABSORBED') then
local spellId, spellName, spellSchool, extraGUID, extraName, extraFlags, extraRaidFlags, extraSpellID, extraSpellName, extraSchool, amount
@ -246,11 +214,12 @@ local function stopSegment(...)
end
end
local throttleUpdate,trottleDelay = time(), 0.4
function addon:summon(data, prefix, suffix)
local summon = addon:GetGuidInfo(data[9], data[11], data[10])
function addon:summon(event, data, prefix, suffix)
self:CreateDataObject(data, prefix, suffix)
local summon = addon:GetGuidInfo2(data:GetDestination())
if(not summon:HasOwner()) then
summon:scanTooltip()
local owner = addon:GetGuidInfo(data[5], data[7], data[6])
-- summon:scanTooltip()
local owner = addon:GetGuidInfo2(data:GetSource())
summon:SetOwner(owner)
end
-- summon['isPet'] = true
@ -263,35 +232,16 @@ end
local function prepData(data, offset)
local offset = offset or 5
if(data[offset + 1]) then
local gis = addon:GetGuidInfo(data[offset], data[offset + 2], data[offset + 1])
local gis = addon:GetGuidInfo2({data[offset], data[offset + 1], data[offset + 2]})
if(segStarted and gis['isBoss']) then
QuicklogDB['segments'][#QuicklogDB['segments']]['hasBoss'] = true
QuicklogDB['segments'][#QuicklogDB['segments']]['BossNames'][data[offset]] = data[offset + 1]
end
-- print('petc')
if(gis['isPet'] == nil) then
-- print('petc not yet',data[offset + 2], data[offset + 1], data[offset])
addon:IsPet(data[offset + 2], data[offset + 1], data[offset])
end
if(gis:IsPet()) then
-- print('pet found', gis['name'], gis['ownerName'])
if(not gis['ownerGuid']) then
-- print('pet found, no owner', gis['name'], gis['ownerName'])
gis:scanTooltip()
end
if(gis['ownerGuid']) then
-- print('rewrite', gis['name'], gis['ownerName'])
data[offset + 2] = gis['ownerFlags']
data[offset + 1] = gis['ownerName']
data[offset] = gis['ownerGuid']
end
else
-- print("no pet", gis['name'])
end
end
return data
end
function addon:dmg(data, prefix, suffix)
function addon:dmg(event, data, prefix, suffix)
-- print(data, prefix, suffix)
--[[ [1] = event,
[2] = time,
[3] = type,
@ -305,22 +255,23 @@ function addon:dmg(data, prefix, suffix)
[11] = destFlags,
[12] = destRaidFlags,
]]
if(not segStarted and not data[6]) then
self:CreateDataObject(data, prefix, suffix)
local data_src = data:GetSource()
local data_dest = data:GetDestination()
local data_extrasrc = data:GetExtraSource()
if(not segStarted and not data_src and not data_extrasrc) then
-- print('environmental/aoe?', data[3], data[10])
return
end
-- if(addon:IsInParty(data[7],data[5]) or addon:IsInParty(data[11], data[9])) then
data = prepData(data, 5)
data = prepData(data, 9)
if(not segStarted) then
local gis = addon:GetGuidInfo(data[5], data[7], data[6])
local gis = addon:GetGuidInfo2(data_extrasrc and data_extrasrc or data_src)
if(gis and not gis['died'] and not (suffix == 'HEAL') and not(prefix == 'ENVIRONMENTAL')) then
local gid = addon:GetGuidInfo(data[9], data[11], data[10])
-- if(addon:IsInParty(data[7], data[6], data[5])) then
local gid = addon:GetGuidInfo2(data_dest)
if(gis:IsParty()) then
if(gis['guid'] and gid['guid'] and gis['guid'] ~= gid['guid']) then
if(gis[1] and gid[1] and gis[1] ~= gid[1]) then
startSegment(data)
end
end
@ -338,14 +289,14 @@ function addon:BOSS_KILL(event, encounterID, encounterName)
print("boss kill", encounterID, encounterName)
end
function addon:ENCOUNTER_END(event, encounterID, encounterName, difficultyID, groupSize, success)
print(event, encounterID, encounterName, difficultyID, groupSize)
-- print(event, encounterID, encounterName, difficultyID, groupSize)
addon:UpdateWindows()
stopSegment(event, encounterID, encounterName, difficultyID, groupSize, success)
self:UnregisterEvent(event)
self:RegisterEvent('ENCOUNTER_START')
end
function addon:ENCOUNTER_START(event, encounterID, encounterName, difficultyID, groupSize)
print(event, encounterID, encounterName, difficultyID, groupSize)
-- print(event, encounterID, encounterName, difficultyID, groupSize)
if(not segStarted) then
startSegment()
end
@ -356,7 +307,7 @@ print(event, encounterID, encounterName, difficultyID, groupSize)
self:UnregisterEvent(event)
end
function addon:SCENARIO_COMPLETED(event, questID, xp, money)
print("scenario end", event, questID, xp, money)
-- print("scenario end", event, questID, xp, money)
stopSegment(event, questID, xp, money)
end
function addon:UNIT_EXITED_VEHICLE(event, unit)
@ -366,13 +317,13 @@ function addon:UNIT_EXITED_VEHICLE(event, unit)
end
end
function addon:UNIT_NAME_UPDATE(event, unit)
local gi = addon:GetGuidInfo(UnitGUID(unit))
local gi = addon:GetGuidInfo2(UnitGUID(unit))
if(gi) then
gi:SetName(UnitName(unit))
end
end
function addon:PLAYER_ENTERING_WORLD(event, isInitialLogin, isReloadingUi)
print("PEW")
-- print("PEW")
if(not isInitialLogin and not isReloadingUi) then
stopSegment(event, isInitialLogin, isReloadingUi)
end
@ -386,31 +337,30 @@ function addon:cmbStatus(event)
stopSegment(event)
end
end
addon['LibGUID']:PruneGUIDCache(600)
elseif(event=='PLAYER_REGEN_DISABLED') then
if(not segStarted) then
startSegment()
end
end
end
function addon:died(data)
function addon:died(event, data, prefix, suffix)
-- print(unpack(data))
if(data[9] and data[10]) then
local gi = addon:GetGuidInfo(data[9], data[11], data[10])
gi['died'] = gi['died'] or {}
gi['died'][#gi['died'] + 1] = data
gi['dead'] = true
end
self:CreateDataObject(data, prefix, suffix)
local gi = addon:GetGuidInfo2(data:GetDestination())
gi['died'] = gi['died'] or {}
gi['died'][#gi['died'] + 1] = data
gi['dead'] = true
end
function addon:resurrect(data)
function addon:resurrect(event, data)
-- local gis = addon:GetGuidInfo(data[5], data[7], data[6])
-- print('res', gis['name'])
if(data[9] and data[10]) then
local gi = addon:GetGuidInfo(data[9], data[11], data[10])
self:CreateDataObject(data, prefix, suffix)
local gi = addon:GetGuidInfo2(data:GetDestination())
-- print('res dest', gi['name'])
gi['resurrect'] = gi['resurrect'] or {}
gi['resurrect'][#gi['resurrect'] + 1] = data
gi['dead'] = nil
end
gi['resurrect'] = gi['resurrect'] or {}
gi['resurrect'][#gi['resurrect'] + 1] = data
gi['dead'] = nil
end
addon['f']:SetScript("OnEvent", function(self, event, arg1, ...)
if(event == "ADDON_LOADED" and arg1 == name) then
@ -436,6 +386,7 @@ addon['f']:SetScript("OnEvent", function(self, event, arg1, ...)
end
LibStub("LibCombatLog"):Embed(addon)
LibStub("LibCombatLog_data"):Embed(addon)
addon:RegisterCLEvent({'UNIT_DIED', 'UNIT_DESTROYED', 'UNIT_DISSIPATES'}, 'died')
addon:RegisterCLSuffix({'DAMAGE','HEAL','ABSORBED'}, 'dmg')
addon:RegisterCLSuffix({'SUMMON', 'CREATE'}, 'summon')

View File

@ -2,6 +2,7 @@
## Name: Quicklog
## SavedVariables: QuicklogDB
## Description: Combatlog display
## OptionalDeps: LibCombatlog, LibGUID, LibCombatlog_data
Libs/LibCombatlog/Libstub/Libstub.lua
Libs/LibCombatlog/LibCombatlog.lua
GuidInfo.lua

View File

@ -56,11 +56,14 @@ end
function segfunc:GetSegmentGuid(guids)
guids = guids or {}
for c, d in pairs(self['source']) do
if(addon:IsInParty(d['flags'], d['name'], d['guid'])) then
local gis = addon:GetGuidInfo2(d[1])
if(gis and gis:IsParty()) then
for k, v in pairs(d['dest']) do
guids[k] = true
end
guids[c] = true
else
-- print("seg fault",d['guid'],d[1])
end
end
return guids

View File

@ -53,7 +53,8 @@ local function defaultDisplay(win, total)
local src = {}
local maxtotal = 0
for c, d in pairs(seg['source']) do
if(d[total] > 0 and addon:IsInParty(d['flags'], d['name'], d['guid'])) then
local gis = addon:GetGuidInfo2(d)
if(gis and d[total] > 0 and gis:IsParty()) then
if(d[total]>maxtotal) then
maxtotal = d[total]
end
@ -69,9 +70,9 @@ local function defaultDisplay(win, total)
for i = 1, #src do
local d = src[i]
local bar = win:GetBar(i)
local guid = d['guid']
local guid = d[1]
bar['guid'] = guid
local gib = addon:GetGuidInfo(guid)
local gib = addon:GetGuidInfo2(d)
if(bar['class'] ~= gib['class']) then
bar:SetColorByClass(gib['class'])
end
@ -82,7 +83,7 @@ local function defaultDisplay(win, total)
end
bar:SetMinMaxValues(0, maxtotal)
bar:SetValue(d[total])
bar:SetText(gib['shortName'] and gib['shortName'] or gib['name'], d[total])
bar:SetText(gib['shortName'] and gib['shortName'] or gib[2], d[total])
last = bar
if(i >= maxBars) then
break
@ -131,11 +132,10 @@ local function defaultTooltip(tooltip, src, total, spells)
sort(dip, sorts[total])
for i = 1, #dip do
local dest = dip[i]
local gib = addon:GetGuidInfo(dest['guid'])
local gib = addon:GetGuidInfo2(dest)
if(gib) then
local r, g, b, a, u = unpack(gib['classColor'])
tooltip:AddDoubleLine(gib['name'] and gib['name'] or '<Unbekannt>', dest[total], r, g, b, 1, 1, 1)
local r, g, b = unpack(gib['classColor'] or addon:GetClassColors(gib['class']))
tooltip:AddDoubleLine(gib[2] and gib[2] or '<Unbekannt>', dest[total], r, g, b, 1, 1, 1)
if(dest[spells]) then
local tip = {}
for _, spell in pairs(dest[spells]) do
@ -167,10 +167,10 @@ function window_methods:StatusBarOnEnter(bar)
local seg = self['seg']
local store = addon:GetStore(seg)
local src = store:GetSource(bar['guid'], nil, nil, true)
if(not src or not src['name']) then bar:Release() return end
if(not src or not src[2]) then bar:Release() return end
local display = self['settings']['display']
bar['tooltip']:AddLine(format("%s - %s", display, src['name']),1,1,1)
bar['tooltip']:AddLine(format("%s - %s", display, src[2]),1,1,1)
if(display == 'DAMAGE') then
defaultTooltip(bar['tooltip'], src, 'total', 'spells')
elseif(display == 'HEAL') then