From 55d7922f96b096cce2717777f27d1bf42e910fcd Mon Sep 17 00:00:00 2001 From: Zidras <10605951+Zidras@users.noreply.github.com> Date: Tue, 28 May 2024 23:07:02 +0100 Subject: [PATCH 1/8] TIMERS: Parse all special events since pull, instead of only previous event (#1) Account for all special events on the first compare --- Transcriptor/Transcriptor.lua | 258 +++++++++++++++++++++++++++++++--- 1 file changed, 240 insertions(+), 18 deletions(-) diff --git a/Transcriptor/Transcriptor.lua b/Transcriptor/Transcriptor.lua index 4192ac6..736c8ce 100644 --- a/Transcriptor/Transcriptor.lua +++ b/Transcriptor/Transcriptor.lua @@ -36,6 +36,7 @@ local hiddenAuraPermList = { --[209997] = true, -- Play Dead (Hunter Pet) } local previousSpecialEvent = nil +local specialEventsSincePullList = {} local hiddenAuraEngageList = nil local shouldLogFlags = false --local inEncounter, blockingRelease, limitingRes = false, false, false @@ -52,6 +53,7 @@ local debugprofilestop = debugprofilestop --local C_Scenario, C_DeathInfo_GetSelfResurrectOptions, Enum = C_Scenario, C_DeathInfo.GetSelfResurrectOptions, Enum --local IsEncounterInProgress, IsEncounterLimitingResurrections, IsEncounterSuppressingRelease = IsEncounterInProgress, IsEncounterLimitingResurrections, IsEncounterSuppressingRelease --local IsAltKeyDown, EJ_GetEncounterInfo, C_EncounterJournal_GetSectionInfo, C_Map_GetMapInfo = IsAltKeyDown, EJ_GetEncounterInfo, C_EncounterJournal.GetSectionInfo, C_Map.GetMapInfo +local CopyTable = CopyTable local IsAltKeyDown = IsAltKeyDown local UnitInRaid, UnitInParty, UnitIsFriend, UnitCastingInfo, UnitChannelInfo = UnitInRaid, UnitInParty, UnitIsFriend, UnitCastingInfo, UnitChannelInfo local UnitCanAttack, UnitExists, UnitIsVisible, UnitGUID, UnitClassification = UnitCanAttack, UnitExists, UnitIsVisible, UnitGUID, UnitClassification @@ -112,6 +114,7 @@ local function InsertSpecialEvent(name) if not name then return end local t = debugprofilestop() previousSpecialEvent = {t, name} + tinsert(specialEventsSincePullList, previousSpecialEvent) if compareSuccess then for _,tbl in next, compareSuccess do for _, list in next, tbl do @@ -731,7 +734,8 @@ do local npcIdString = MobId(sourceGUID, true) if not compareSuccess[spellId][npcIdString] then if previousSpecialEvent then - compareSuccess[spellId][npcIdString] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2]}} + local specialEventCache = CopyTable(specialEventsSincePullList) + compareSuccess[spellId][npcIdString] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2], specialEventCache}} else compareSuccess[spellId][npcIdString] = {compareStartTime} end @@ -744,7 +748,8 @@ do local npcIdString = MobId(sourceGUID, true) if not compareStart[spellId][npcIdString] then if previousSpecialEvent then - compareStart[spellId][npcIdString] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2]}} + local specialEventCache = CopyTable(specialEventsSincePullList) + compareStart[spellId][npcIdString] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2], specialEventCache}} else compareStart[spellId][npcIdString] = {compareStartTime} end @@ -757,7 +762,8 @@ do local npcIdString = MobId(sourceGUID, true) if not compareSummon[spellId][npcIdString] then if previousSpecialEvent then - compareSummon[spellId][npcIdString] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2]}} + local specialEventCache = CopyTable(specialEventsSincePullList) + compareSummon[spellId][npcIdString] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2], specialEventCache}} else compareSummon[spellId][npcIdString] = {compareStartTime} end @@ -770,7 +776,8 @@ do local npcIdString = MobId(sourceGUID, true) if not compareAuraApplied[spellId][npcIdString] then if previousSpecialEvent then - compareAuraApplied[spellId][npcIdString] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2]}} + local specialEventCache = CopyTable(specialEventsSincePullList) + compareAuraApplied[spellId][npcIdString] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2], specialEventCache}} else compareAuraApplied[spellId][npcIdString] = {compareStartTime} end @@ -1049,7 +1056,8 @@ do local npcId = MobId(UnitGUID(unit), true) if not compareUnitSuccess[spellName][npcId] then if previousSpecialEvent then - compareUnitSuccess[spellName][npcId] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2]}} + local specialEventCache = CopyTable(specialEventsSincePullList) + compareUnitSuccess[spellName][npcId] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2], specialEventCache}} else compareUnitSuccess[spellName][npcId] = {compareStartTime} end @@ -1084,7 +1092,8 @@ do local npcId = MobId(UnitGUID(unit), true) if not compareUnitStart[spellName][npcId] then if previousSpecialEvent then - compareUnitStart[spellName][npcId] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2]}} + local specialEventCache = CopyTable(specialEventsSincePullList) + compareUnitStart[spellName][npcId] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2], specialEventCache}} else compareUnitStart[spellName][npcId] = {compareStartTime} end @@ -1281,7 +1290,8 @@ function sh.CHAT_MSG_RAID_BOSS_EMOTE(msg, npcName, ...) if not compareEmotes[spellId] then compareEmotes[spellId] = {} end if not compareEmotes[spellId][npcName] then if previousSpecialEvent then - compareEmotes[spellId][npcName] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2]}} + local specialEventCache = CopyTable(specialEventsSincePullList) + compareEmotes[spellId][npcName] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2], specialEventCache}} else compareEmotes[spellId][npcName] = {compareStartTime} end @@ -1301,7 +1311,8 @@ function sh.CHAT_MSG_MONSTER_YELL(msg, npcName, ...) if not compareYells[spellId] then compareYells[spellId] = {} end if not compareYells[spellId][npcName] then if previousSpecialEvent then - compareYells[spellId][npcName] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2]}} + local specialEventCache = CopyTable(specialEventsSincePullList) + compareYells[spellId][npcName] = {{compareStartTime, previousSpecialEvent[1], previousSpecialEvent[2], specialEventCache}} else compareYells[spellId][npcName] = {compareStartTime} end @@ -1592,10 +1603,12 @@ local function eventHandler(_, event, ...) elseif event == "DBM_Kill" then local mod = ... previousSpecialEvent = nil -- prevent Stage from spreading if log was not stopped between pulls + twipe(specialEventsSincePullList) line = strjoin("#", tostringall(mod and mod.id or UNKNOWN)) elseif event == "DBM_Wipe" then local mod = ... previousSpecialEvent = nil -- prevent Stage from spreading if log was not stopped between pulls + twipe(specialEventsSincePullList) line = strjoin("#", tostringall(mod and mod.id or UNKNOWN)) end @@ -1953,6 +1966,7 @@ do hiddenUnitAuraCollector = {} playerSpellCollector = {} previousSpecialEvent = nil + twipe(specialEventsSincePullList) compareStartTime = debugprofilestop() logStartTime = compareStartTime / 1000 local instanceName, instanceType, diff, diffText = GetCurrentInstanceDifficulty() @@ -2073,7 +2087,33 @@ function Transcriptor:StopLog(silent) local sincePull = list[i] - list[1][1] local sincePreviousEvent = list[i] - list[1][2] local previousEventName = list[1][3] - str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) + local cachedEventList = list[1][4] + if type(cachedEventList) == "table" then + local cachedEventString = {} + local cachedSpellTimeDiffString = {} + + for eventIndex, eventInfo in ipairs(cachedEventList) do + local eventTime = eventInfo[1] + local eventName = eventInfo[2] + local sincePreviousTime = eventIndex == 1 and (eventTime - list[1][1])/1000 or (eventTime - cachedEventList[eventIndex-1][1])/1000 -- since pull timer if first event or since previous + + tinsert(cachedEventString, format("%s/%.2f", eventName, sincePreviousTime)) + end + + for j = #cachedEventList, 1, -1 do + local eventTime = cachedEventList[j][1] + local spellSincePreviousTime = (list[i] - eventTime)/1000 + + tinsert(cachedSpellTimeDiffString, format("%.2f", spellSincePreviousTime)) + end + + local eventString = tconcat(cachedEventString, ", ") + local timeDiffString = tconcat(cachedSpellTimeDiffString, "/") + + str = format("%s = pull:%.2f/[%s] %s", n, sincePull/1000, eventString, timeDiffString) -- pull:100.00/[Stage 1/10.00, Stage 1.5/10.78, Intermission 1/9.44, Stage 2/15.64] 54.14/69.77/79.22/89.14 + else + str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) -- pull:125.69/Stage 2/26.85 + end else local sincePull = list[i] - list[1] str = format("%s = pull:%.2f", n, sincePull/1000) @@ -2146,7 +2186,33 @@ function Transcriptor:StopLog(silent) local sincePull = list[i] - list[1][1] local sincePreviousEvent = list[i] - list[1][2] local previousEventName = list[1][3] - str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) + local cachedEventList = list[1][4] + if type(cachedEventList) == "table" then + local cachedEventString = {} + local cachedSpellTimeDiffString = {} + + for eventIndex, eventInfo in ipairs(cachedEventList) do + local eventTime = eventInfo[1] + local eventName = eventInfo[2] + local sincePreviousTime = eventIndex == 1 and (eventTime - list[1][1])/1000 or (eventTime - cachedEventList[eventIndex-1][1])/1000 -- since pull timer if first event or since previous + + tinsert(cachedEventString, format("%s/%.2f", eventName, sincePreviousTime)) + end + + for j = #cachedEventList, 1, -1 do + local eventTime = cachedEventList[j][1] + local spellSincePreviousTime = (list[i] - eventTime)/1000 + + tinsert(cachedSpellTimeDiffString, format("%.2f", spellSincePreviousTime)) + end + + local eventString = tconcat(cachedEventString, ", ") + local timeDiffString = tconcat(cachedSpellTimeDiffString, "/") + + str = format("%s = pull:%.2f/[%s] %s", n, sincePull/1000, eventString, timeDiffString) -- pull:100.00/[Stage 1/10.00, Stage 1.5/10.78, Intermission 1/9.44, Stage 2/15.64] 54.14/69.77/79.22/89.14 + else + str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) -- pull:125.69/Stage 2/26.85 + end else local sincePull = list[i] - list[1] str = format("%s = pull:%.2f", n, sincePull/1000) @@ -2219,7 +2285,33 @@ function Transcriptor:StopLog(silent) local sincePull = list[i] - list[1][1] local sincePreviousEvent = list[i] - list[1][2] local previousEventName = list[1][3] - str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) + local cachedEventList = list[1][4] + if type(cachedEventList) == "table" then + local cachedEventString = {} + local cachedSpellTimeDiffString = {} + + for eventIndex, eventInfo in ipairs(cachedEventList) do + local eventTime = eventInfo[1] + local eventName = eventInfo[2] + local sincePreviousTime = eventIndex == 1 and (eventTime - list[1][1])/1000 or (eventTime - cachedEventList[eventIndex-1][1])/1000 -- since pull timer if first event or since previous + + tinsert(cachedEventString, format("%s/%.2f", eventName, sincePreviousTime)) + end + + for j = #cachedEventList, 1, -1 do + local eventTime = cachedEventList[j][1] + local spellSincePreviousTime = (list[i] - eventTime)/1000 + + tinsert(cachedSpellTimeDiffString, format("%.2f", spellSincePreviousTime)) + end + + local eventString = tconcat(cachedEventString, ", ") + local timeDiffString = tconcat(cachedSpellTimeDiffString, "/") + + str = format("%s = pull:%.2f/[%s] %s", n, sincePull/1000, eventString, timeDiffString) -- pull:100.00/[Stage 1/10.00, Stage 1.5/10.78, Intermission 1/9.44, Stage 2/15.64] 54.14/69.77/79.22/89.14 + else + str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) -- pull:125.69/Stage 2/26.85 + end else local sincePull = list[i] - list[1] str = format("%s = pull:%.2f", n, sincePull/1000) @@ -2293,7 +2385,33 @@ function Transcriptor:StopLog(silent) local sincePull = list[i] - list[1][1] local sincePreviousEvent = list[i] - list[1][2] local previousEventName = list[1][3] - str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) + local cachedEventList = list[1][4] + if type(cachedEventList) == "table" then + local cachedEventString = {} + local cachedSpellTimeDiffString = {} + + for eventIndex, eventInfo in ipairs(cachedEventList) do + local eventTime = eventInfo[1] + local eventName = eventInfo[2] + local sincePreviousTime = eventIndex == 1 and (eventTime - list[1][1])/1000 or (eventTime - cachedEventList[eventIndex-1][1])/1000 -- since pull timer if first event or since previous + + tinsert(cachedEventString, format("%s/%.2f", eventName, sincePreviousTime)) + end + + for j = #cachedEventList, 1, -1 do + local eventTime = cachedEventList[j][1] + local spellSincePreviousTime = (list[i] - eventTime)/1000 + + tinsert(cachedSpellTimeDiffString, format("%.2f", spellSincePreviousTime)) + end + + local eventString = tconcat(cachedEventString, ", ") + local timeDiffString = tconcat(cachedSpellTimeDiffString, "/") + + str = format("%s = pull:%.2f/[%s] %s", n, sincePull/1000, eventString, timeDiffString) -- pull:100.00/[Stage 1/10.00, Stage 1.5/10.78, Intermission 1/9.44, Stage 2/15.64] 54.14/69.77/79.22/89.14 + else + str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) -- pull:125.69/Stage 2/26.85 + end else local sincePull = list[i] - list[1] str = format("%s = pull:%.2f", n, sincePull/1000) @@ -2383,7 +2501,33 @@ function Transcriptor:StopLog(silent) local sincePull = list[i] - list[1][1] local sincePreviousEvent = list[i] - list[1][2] local previousEventName = list[1][3] - str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) + local cachedEventList = list[1][4] + if type(cachedEventList) == "table" then + local cachedEventString = {} + local cachedSpellTimeDiffString = {} + + for eventIndex, eventInfo in ipairs(cachedEventList) do + local eventTime = eventInfo[1] + local eventName = eventInfo[2] + local sincePreviousTime = eventIndex == 1 and (eventTime - list[1][1])/1000 or (eventTime - cachedEventList[eventIndex-1][1])/1000 -- since pull timer if first event or since previous + + tinsert(cachedEventString, format("%s/%.2f", eventName, sincePreviousTime)) + end + + for j = #cachedEventList, 1, -1 do + local eventTime = cachedEventList[j][1] + local spellSincePreviousTime = (list[i] - eventTime)/1000 + + tinsert(cachedSpellTimeDiffString, format("%.2f", spellSincePreviousTime)) + end + + local eventString = tconcat(cachedEventString, ", ") + local timeDiffString = tconcat(cachedSpellTimeDiffString, "/") + + str = format("%s = pull:%.2f/[%s] %s", n, sincePull/1000, eventString, timeDiffString) -- pull:100.00/[Stage 1/10.00, Stage 1.5/10.78, Intermission 1/9.44, Stage 2/15.64] 54.14/69.77/79.22/89.14 + else + str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) -- pull:125.69/Stage 2/26.85 + end else local sincePull = list[i] - list[1] str = format("%s = pull:%.2f", n, sincePull/1000) @@ -2455,7 +2599,33 @@ function Transcriptor:StopLog(silent) local sincePull = list[i] - list[1][1] local sincePreviousEvent = list[i] - list[1][2] local previousEventName = list[1][3] - str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) + local cachedEventList = list[1][4] + if type(cachedEventList) == "table" then + local cachedEventString = {} + local cachedSpellTimeDiffString = {} + + for eventIndex, eventInfo in ipairs(cachedEventList) do + local eventTime = eventInfo[1] + local eventName = eventInfo[2] + local sincePreviousTime = eventIndex == 1 and (eventTime - list[1][1])/1000 or (eventTime - cachedEventList[eventIndex-1][1])/1000 -- since pull timer if first event or since previous + + tinsert(cachedEventString, format("%s/%.2f", eventName, sincePreviousTime)) + end + + for j = #cachedEventList, 1, -1 do + local eventTime = cachedEventList[j][1] + local spellSincePreviousTime = (list[i] - eventTime)/1000 + + tinsert(cachedSpellTimeDiffString, format("%.2f", spellSincePreviousTime)) + end + + local eventString = tconcat(cachedEventString, ", ") + local timeDiffString = tconcat(cachedSpellTimeDiffString, "/") + + str = format("%s = pull:%.2f/[%s] %s", n, sincePull/1000, eventString, timeDiffString) -- pull:100.00/[Stage 1/10.00, Stage 1.5/10.78, Intermission 1/9.44, Stage 2/15.64] 54.14/69.77/79.22/89.14 + else + str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) -- pull:125.69/Stage 2/26.85 + end else local sincePull = list[i] - list[1] str = format("%s = pull:%.2f", n, sincePull/1000) @@ -2527,8 +2697,34 @@ function Transcriptor:StopLog(silent) local sincePull = list[i] - list[1][1] local sincePreviousEvent = list[i] - list[1][2] local previousEventName = list[1][3] - str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) - else + local cachedEventList = list[1][4] + if type(cachedEventList) == "table" then + local cachedEventString = {} + local cachedSpellTimeDiffString = {} + + for eventIndex, eventInfo in ipairs(cachedEventList) do + local eventTime = eventInfo[1] + local eventName = eventInfo[2] + local sincePreviousTime = eventIndex == 1 and (eventTime - list[1][1])/1000 or (eventTime - cachedEventList[eventIndex-1][1])/1000 -- since pull timer if first event or since previous + + tinsert(cachedEventString, format("%s/%.2f", eventName, sincePreviousTime)) + end + + for j = #cachedEventList, 1, -1 do + local eventTime = cachedEventList[j][1] + local spellSincePreviousTime = (list[i] - eventTime)/1000 + + tinsert(cachedSpellTimeDiffString, format("%.2f", spellSincePreviousTime)) + end + + local eventString = tconcat(cachedEventString, ", ") + local timeDiffString = tconcat(cachedSpellTimeDiffString, "/") + + str = format("%s = pull:%.2f/[%s] %s", n, sincePull/1000, eventString, timeDiffString) -- pull:100.00/[Stage 1/10.00, Stage 1.5/10.78, Intermission 1/9.44, Stage 2/15.64] 54.14/69.77/79.22/89.14 + else + str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) -- pull:125.69/Stage 2/26.85 + end + else local sincePull = list[i] - list[1] str = format("%s = pull:%.2f", n, sincePull/1000) end @@ -2598,8 +2794,34 @@ function Transcriptor:StopLog(silent) local sincePull = list[i] - list[1][1] local sincePreviousEvent = list[i] - list[1][2] local previousEventName = list[1][3] - str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) - else + local cachedEventList = list[1][4] + if type(cachedEventList) == "table" then + local cachedEventString = {} + local cachedSpellTimeDiffString = {} + + for eventIndex, eventInfo in ipairs(cachedEventList) do + local eventTime = eventInfo[1] + local eventName = eventInfo[2] + local sincePreviousTime = eventIndex == 1 and (eventTime - list[1][1])/1000 or (eventTime - cachedEventList[eventIndex-1][1])/1000 -- since pull timer if first event or since previous + + tinsert(cachedEventString, format("%s/%.2f", eventName, sincePreviousTime)) + end + + for j = #cachedEventList, 1, -1 do + local eventTime = cachedEventList[j][1] + local spellSincePreviousTime = (list[i] - eventTime)/1000 + + tinsert(cachedSpellTimeDiffString, format("%.2f", spellSincePreviousTime)) + end + + local eventString = tconcat(cachedEventString, ", ") + local timeDiffString = tconcat(cachedSpellTimeDiffString, "/") + + str = format("%s = pull:%.2f/[%s] %s", n, sincePull/1000, eventString, timeDiffString) -- pull:100.00/[Stage 1/10.00, Stage 1.5/10.78, Intermission 1/9.44, Stage 2/15.64] 54.14/69.77/79.22/89.14 + else + str = format("%s = pull:%.2f/%s/%.2f", n, sincePull/1000, previousEventName, sincePreviousEvent/1000) -- pull:125.69/Stage 2/26.85 + end + else local sincePull = list[i] - list[1] str = format("%s = pull:%.2f", n, sincePull/1000) end From 082265cd902adaaf70333980752ea3344282f9a5 Mon Sep 17 00:00:00 2001 From: Zidras <10605951+Zidras@users.noreply.github.com> Date: Fri, 7 Jun 2024 22:57:10 +0100 Subject: [PATCH 2/8] Add Difficulty changes to log (#3) Useful for dynamic raids --- Transcriptor/Transcriptor.lua | 165 ++++++++++++++++++---------------- 1 file changed, 88 insertions(+), 77 deletions(-) diff --git a/Transcriptor/Transcriptor.lua b/Transcriptor/Transcriptor.lua index 736c8ce..837f812 100644 --- a/Transcriptor/Transcriptor.lua +++ b/Transcriptor/Transcriptor.lua @@ -227,6 +227,87 @@ function GetSectionID(name) end end]] +-------------------------------------------------------------------------------- +-- Difficulty +-- + +--[[local difficultyTbl = { + ["party"] = { + [1] = "5Normal", + [2] = "5Heroic", + }, + ["raid"] = { + [1] = "10Normal", + [2] = "25Normal", + [3] = "10Heroic", + [4] = "25Heroic", + }, + ["none"] = { + [1] = NONE + } + [7] = "25LFR", + [8] = "5Challenge", + [14] = "Normal", + [15] = "Heroic", + [16] = "Mythic", + [17] = "LFR", + [18] = "40Event", + [19] = "5Event", + [23] = "5Mythic", + [24] = "5Timewalking", + [33] = "RaidTimewalking", +}]] + +-- Copied from DBM backport +local function GetCurrentInstanceDifficulty() + local instanceName, instanceType, difficulty, difficultyName, maxPlayers, dynamicDifficulty, isDynamicInstance = GetInstanceInfo() + if instanceType == "raid" then + if isDynamicInstance then -- Dynamic raids (ICC, RS) + if difficulty == 1 then -- 10 players + return instanceName, instanceType, difficulty, dynamicDifficulty == 0 and "10 Normal" or dynamicDifficulty == 1 and "10 Heroic" or "unknown" + elseif difficulty == 2 then -- 25 players + return instanceName, instanceType, difficulty, dynamicDifficulty == 0 and "25 Normal" or dynamicDifficulty == 1 and "25 Heroic" or "unknown" + -- On Warmane, it was confirmed by Midna that difficulty returning only 1 or 2 is their intended behaviour: https://www.warmane.com/bugtracker/report/91065 + -- code below (difficulty 3 and 4 in dynamic instances) prevents GetCurrentInstanceDifficulty() from breaking on servers that correctly assign difficulty 1-4 in dynamic instances. + elseif difficulty == 3 then -- 10 heroic, dynamic + return instanceName, instanceType, difficulty, "10 Heroic" + elseif difficulty == 4 then -- 25 heroic, dynamic + return instanceName, instanceType, difficulty, "25 Heroic" + end + else -- Non-dynamic raids + if difficulty == 1 then + -- check for Timewalking instance (workaround using GetRaidDifficulty since on Warmane all the usual APIs fail and return "normal" difficulty) + local raidDifficulty = GetRaidDifficulty() + if raidDifficulty ~= difficulty and (raidDifficulty == 2 or raidDifficulty == 4) then -- extra checks due to lack of tests and no access to a timewalking server + return instanceName, instanceType, raidDifficulty, "Timewalking" + else + return instanceName, instanceType, difficulty, maxPlayers and maxPlayers.." Normal" or "10 Normal" + end + elseif difficulty == 2 then + return instanceName, instanceType, difficulty, "25 Normal" + elseif difficulty == 3 then + return instanceName, instanceType, difficulty, "10 Heroic" + elseif difficulty == 4 then + return instanceName, instanceType, difficulty, "25 Heroic" + end + end + elseif instanceType == "party" then -- 5 man Dungeons + if difficulty == 1 then + return instanceName, instanceType, difficulty, "5 Normal" + elseif difficulty == 2 then + -- check for Mythic instance (workaround using GetDungeonDifficulty since on Warmane all the usual APIs fail and return "heroic" difficulty) + local dungeonDifficulty = GetDungeonDifficulty() + if dungeonDifficulty == 3 then + return instanceName, instanceType, dungeonDifficulty, "Mythic" + else + return instanceName, instanceType, difficulty, "5 Heroic" + end + end + else + return instanceName, instanceType, difficulty, NONE + end +end + -------------------------------------------------------------------------------- -- Spell blocklist parser: /getspells -- @@ -1262,6 +1343,11 @@ end sh.ZONE_CHANGED_INDOORS = sh.ZONE_CHANGED sh.ZONE_CHANGED_NEW_AREA = sh.ZONE_CHANGED +function sh.PLAYER_DIFFICULTY_CHANGED() + local instanceName, instanceType, diff, diffText = GetCurrentInstanceDifficulty() + return strjoin("#", instanceName or "?", instanceType or "?", diff or "?", diffText or "?") +end + function sh.CINEMATIC_START(...) local id = GetCurrentMapAreaID() return strjoin("#", "uiMapID:", id, "Real Args:", tostringall(...)) @@ -1419,6 +1505,7 @@ local wowEvents = { "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", -- "NAME_PLATE_UNIT_ADDED", + "PLAYER_DIFFICULTY_CHANGED", -- Scenarios -- "SCENARIO_UPDATE", -- "SCENARIO_CRITERIA_UPDATE", @@ -1474,6 +1561,7 @@ local eventCategories = { ZONE_CHANGED = "ZONE_CHANGED", ZONE_CHANGED_INDOORS = "ZONE_CHANGED", ZONE_CHANGED_NEW_AREA = "ZONE_CHANGED", + PLAYER_DIFFICULTY_CHANGED = "COMBAT", -- SCENARIO_UPDATE = "SCENARIO", -- SCENARIO_CRITERIA_UPDATE = "SCENARIO", PLAY_MOVIE = "MOVIE", @@ -1841,83 +1929,6 @@ do end do - --[[local difficultyTbl = { - ["party"] = { - [1] = "5Normal", - [2] = "5Heroic", - }, - ["raid"] = { - [1] = "10Normal", - [2] = "25Normal", - [3] = "10Heroic", - [4] = "25Heroic", - }, - ["none"] = { - [1] = NONE - } - [7] = "25LFR", - [8] = "5Challenge", - [14] = "Normal", - [15] = "Heroic", - [16] = "Mythic", - [17] = "LFR", - [18] = "40Event", - [19] = "5Event", - [23] = "5Mythic", - [24] = "5Timewalking", - [33] = "RaidTimewalking", - }]] - - -- Copied from DBM backport - local function GetCurrentInstanceDifficulty() - local instanceName, instanceType, difficulty, difficultyName, maxPlayers, dynamicDifficulty, isDynamicInstance = GetInstanceInfo() - if instanceType == "raid" then - if isDynamicInstance then -- Dynamic raids (ICC, RS) - if difficulty == 1 then -- 10 players - return instanceName, instanceType, difficulty, dynamicDifficulty == 0 and "10 Normal" or dynamicDifficulty == 1 and "10 Heroic" or "unknown" - elseif difficulty == 2 then -- 25 players - return instanceName, instanceType, difficulty, dynamicDifficulty == 0 and "25 Normal" or dynamicDifficulty == 1 and "25 Heroic" or "unknown" - -- On Warmane, it was confirmed by Midna that difficulty returning only 1 or 2 is their intended behaviour: https://www.warmane.com/bugtracker/report/91065 - -- code below (difficulty 3 and 4 in dynamic instances) prevents GetCurrentInstanceDifficulty() from breaking on servers that correctly assign difficulty 1-4 in dynamic instances. - elseif difficulty == 3 then -- 10 heroic, dynamic - return instanceName, instanceType, difficulty, "10 Heroic" - elseif difficulty == 4 then -- 25 heroic, dynamic - return instanceName, instanceType, difficulty, "25 Heroic" - end - else -- Non-dynamic raids - if difficulty == 1 then - -- check for Timewalking instance (workaround using GetRaidDifficulty since on Warmane all the usual APIs fail and return "normal" difficulty) - local raidDifficulty = GetRaidDifficulty() - if raidDifficulty ~= difficulty and (raidDifficulty == 2 or raidDifficulty == 4) then -- extra checks due to lack of tests and no access to a timewalking server - return instanceName, instanceType, raidDifficulty, "Timewalking" - else - return instanceName, instanceType, difficulty, maxPlayers and maxPlayers.." Normal" or "10 Normal" - end - elseif difficulty == 2 then - return instanceName, instanceType, difficulty, "25 Normal" - elseif difficulty == 3 then - return instanceName, instanceType, difficulty, "10 Heroic" - elseif difficulty == 4 then - return instanceName, instanceType, difficulty, "25 Heroic" - end - end - elseif instanceType == "party" then -- 5 man Dungeons - if difficulty == 1 then - return instanceName, instanceType, difficulty, "5 Normal" - elseif difficulty == 2 then - -- check for Mythic instance (workaround using GetDungeonDifficulty since on Warmane all the usual APIs fail and return "heroic" difficulty) - local dungeonDifficulty = GetDungeonDifficulty() - if dungeonDifficulty == 3 then - return instanceName, instanceType, dungeonDifficulty, "Mythic" - else - return instanceName, instanceType, difficulty, "5 Heroic" - end - end - else - return instanceName, instanceType, difficulty, NONE - end - end - local transcriptorVersion = GetAddOnMetadata("Transcriptor", "Version") local dbmRevision = DBM and format("%s (%s)", DBM.DisplayVersion, (DBM.ShowRealDate and DBM:ShowRealDate(DBM.Revision) or DBM.Revision)) or "No DBM" local wowVersion, buildRevision = GetBuildInfo() -- Note that both returns here are strings, not numbers. From 1c99e49f240a427c8be20fea25ef62138947a039 Mon Sep 17 00:00:00 2001 From: Zidras <10605951+Zidras@users.noreply.github.com> Date: Fri, 5 Jul 2024 18:08:36 +0100 Subject: [PATCH 3/8] Modules/TimersSpecialEvents: Add Bone Storm for ICC-Marrowgar --- Transcriptor/Modules/TimersSpecialEvents.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Transcriptor/Modules/TimersSpecialEvents.lua b/Transcriptor/Modules/TimersSpecialEvents.lua index 8fda7ee..ffd5e1e 100644 --- a/Transcriptor/Modules/TimersSpecialEvents.lua +++ b/Transcriptor/Modules/TimersSpecialEvents.lua @@ -20,6 +20,9 @@ addonTbl.TIMERS_SPECIAL_EVENTS = { }, ["SPELL_AURA_APPLIED"] = { -- [[ Icecrown Citadel ]] -- + [69076] = { -- Bone Storm + [36612] = "Bone Storm applied", -- Lord Marrowgar + }, [70952] = { -- Invocation of Blood (Prince Valanar) [38008] = "Valanar Empowered", -- Blood Orb Controller [37970] = "Valanar Empowered", -- Príncipe Valanar (UltimoWow) @@ -37,7 +40,10 @@ addonTbl.TIMERS_SPECIAL_EVENTS = { }, ["SPELL_AURA_REMOVED"] = { -- [[ Icecrown Citadel ]] -- ---[[ + [69076] = { -- Bone Storm + [36612] = "Bone Storm removed", -- Lord Marrowgar + }, + --[[ [70842] = { -- Mana Barrier [36855] = "Stage 2", -- Lady Deathwhisper }, From f1bd17bdeb1f84cc5696ffde517197109bb9edc9 Mon Sep 17 00:00:00 2001 From: Zidras <10605951+Zidras@users.noreply.github.com> Date: Sat, 20 Jul 2024 13:21:52 +0100 Subject: [PATCH 4/8] Modules/TimersSpecialEvents: Add TOC-Icehowl - Staggered Daze - Frothing Rage - Massive Crash - Trample --- Transcriptor/Modules/TimersSpecialEvents.lua | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Transcriptor/Modules/TimersSpecialEvents.lua b/Transcriptor/Modules/TimersSpecialEvents.lua index ffd5e1e..48a6a19 100644 --- a/Transcriptor/Modules/TimersSpecialEvents.lua +++ b/Transcriptor/Modules/TimersSpecialEvents.lua @@ -19,6 +19,13 @@ addonTbl.TIMERS_SPECIAL_EVENTS = { ["UNIT_SPELLCAST_INTERRUPTED"] = { }, ["SPELL_AURA_APPLIED"] = { + -- [[ Trial of the Crusader ]] -- + [66758] = { -- Staggered Daze + [34797] = "Staggered", -- Icehowl + }, + [66759] = { -- Frothing Rage + [34797] = "Enraged", -- Icehowl + }, -- [[ Icecrown Citadel ]] -- [69076] = { -- Bone Storm [36612] = "Bone Storm applied", -- Lord Marrowgar @@ -60,6 +67,19 @@ addonTbl.TIMERS_SPECIAL_EVENTS = { --]] }, ["SPELL_CAST_START"] = { + -- [[ Trial of the Crusader ]] -- + [66683] = { -- Massive Crash (10N) + [34797] = "Massive Crash start", -- Icehowl + }, + [67660] = { -- Massive Crash (25N) + [34797] = "Massive Crash start", -- Icehowl + }, + [67661] = { -- Massive Crash (10H) + [34797] = "Massive Crash start", -- Icehowl + }, + [67662] = { -- Massive Crash (25H) + [34797] = "Massive Crash start", -- Icehowl + }, -- [[ Icecrown Citadel ]] -- [72852] = { -- Create Concoction (25H) [36678] = "Intermission 1", -- Professor Putricide @@ -87,6 +107,10 @@ addonTbl.TIMERS_SPECIAL_EVENTS = { }, }, ["SPELL_CAST_SUCCESS"] = { + -- [[ Trial of the Crusader ]] -- + [67865] = { -- Trample + [34797] = "Trample", -- Icehowl + }, }, ["UNIT_DIED"] = { } From d17a76e85ee65fb6471804dcab1b140010410801 Mon Sep 17 00:00:00 2001 From: Zidras <10605951+Zidras@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:26:02 +0100 Subject: [PATCH 5/8] Modules/TimersSpecialEvents: Add Incite Terror (BQL) --- Transcriptor/Modules/TimersSpecialEvents.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Transcriptor/Modules/TimersSpecialEvents.lua b/Transcriptor/Modules/TimersSpecialEvents.lua index 48a6a19..629723c 100644 --- a/Transcriptor/Modules/TimersSpecialEvents.lua +++ b/Transcriptor/Modules/TimersSpecialEvents.lua @@ -111,6 +111,10 @@ addonTbl.TIMERS_SPECIAL_EVENTS = { [67865] = { -- Trample [34797] = "Trample", -- Icehowl }, + -- [[ Icecrown Citadel ]] -- + [73070] = { -- Incite Terror + [37955] = "Incite Terror", -- Blood-Queen Lana'thel + }, }, ["UNIT_DIED"] = { } From a162ac323e535208de134a56edebf03b6c1a2296 Mon Sep 17 00:00:00 2001 From: Zidras <10605951+Zidras@users.noreply.github.com> Date: Fri, 15 Nov 2024 22:57:30 +0000 Subject: [PATCH 6/8] Add a debugging flag for RegisterAllEvents Disclaimer: Use with extreme caution. IT WILL LOG ALL EVENTS! I have not and will not add any GUI/slash command for this. This is intended, as it is only meant for power users. --- Transcriptor/Transcriptor.lua | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/Transcriptor/Transcriptor.lua b/Transcriptor/Transcriptor.lua index 837f812..438eb0a 100644 --- a/Transcriptor/Transcriptor.lua +++ b/Transcriptor/Transcriptor.lua @@ -1868,6 +1868,8 @@ init:SetScript("OnEvent", function(self, event) end -- End Minimap Icon snippet + TranscriptOptions.logAllEvents = TranscriptOptions.logAllEvents or false -- custom, only for debugging. HEAVY MEMORY USAGE! + self:UnregisterEvent(event) self:RegisterEvent("PLAYER_LOGOUT") self:SetScript("OnEvent", function() @@ -1992,10 +1994,14 @@ do if type(currentLog.total) ~= "table" then currentLog.total = {} end --Register Events to be Tracked eventFrame:Show() - for i = 1, #wowEvents do - local event = wowEvents[i] - if not TranscriptIgnore[event] then - eventFrame:RegisterEvent(event) + if TranscriptOptions.logAllEvents then + eventFrame:RegisterAllEvents() + else + for i = 1, #wowEvents do + local event = wowEvents[i] + if not TranscriptIgnore[event] then + eventFrame:RegisterEvent(event) + end end end if BigWigsLoader then @@ -2061,10 +2067,14 @@ function Transcriptor:StopLog(silent) --Clear Events eventFrame:Hide() - for i = 1, #wowEvents do - local event = wowEvents[i] - if not TranscriptIgnore[event] then - eventFrame:UnregisterEvent(event) + if TranscriptOptions.logAllEvents then + eventFrame:UnregisterAllEvents() + else + for i = 1, #wowEvents do + local event = wowEvents[i] + if not TranscriptIgnore[event] then + eventFrame:UnregisterEvent(event) + end end end if BigWigsLoader then From 687c8aa8d49f9d5f9bcb860e934b53242e3a9e31 Mon Sep 17 00:00:00 2001 From: Zidras <10605951+Zidras@users.noreply.github.com> Date: Wed, 1 Jan 2025 19:05:03 +0000 Subject: [PATCH 7/8] Fix NPC ID parsing from GUID Was breaking on custom high NPC IDs like 400049 --- Transcriptor/Transcriptor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Transcriptor/Transcriptor.lua b/Transcriptor/Transcriptor.lua index 438eb0a..692891b 100644 --- a/Transcriptor/Transcriptor.lua +++ b/Transcriptor/Transcriptor.lua @@ -82,7 +82,7 @@ end local function MobId(guid, extra) if not guid then return 1 end - local strId = tonumber(guid:sub(9, 12), 16) or 1 + local strId = tonumber(guid:sub(8, 12), 16) or 1 if extra then local uniq = tonumber(guid:sub(13), 16) or 1 -- spawnCounter return strId.."-"..uniq From bf7222876e25543f5c7418ec0f8fea7d9812b1af Mon Sep 17 00:00:00 2001 From: Nap Date: Sun, 2 Mar 2025 11:52:28 +0100 Subject: [PATCH 8/8] Add amount of damage to logs & system messages --- Transcriptor/Transcriptor.lua | 84 +++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 28 deletions(-) diff --git a/Transcriptor/Transcriptor.lua b/Transcriptor/Transcriptor.lua index 692891b..4038e81 100644 --- a/Transcriptor/Transcriptor.lua +++ b/Transcriptor/Transcriptor.lua @@ -790,7 +790,7 @@ do -- HFC/Zakuun - Player boss debuff cast on self "SPELL_AURA_APPLIED#Player-GUID#PLAYER#Player-GUID#PLAYER#189030#Befouled#DEBUFF#" -- ToS/Sisters - Boss pet marked as guardian "SPELL_CAST_SUCCESS#Creature-0-3895-1676-10786-119205-0000063360#Moontalon##nil#236697#Deathly Screech" -- Neltharus/Sargha - Player picks up an item from gold pile that makes you cast a debuff on yourself, SPELL_PERIODIC_DAMAGE#Player-GUID#PLAYER#Player-GUID#PLAYER#391762#Curse of the Dragon Hoard - function sh.COMBAT_LOG_EVENT_UNFILTERED(timeStamp, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, spellId, spellName, spellSchool, extraSpellId, amount,...) + function sh.COMBAT_LOG_EVENT_UNFILTERED(timeStamp, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, spellId, spellName, spellSchool, amount,...) if auraEvents[event] and not hiddenAuraPermList[spellId] then hiddenAuraPermList[spellId] = true end @@ -809,6 +809,13 @@ do -- print("Transcriptor:", sourceName..":"..npcId, "used spell", spellName..":"..spellId, "in event", event, "but isn't in our group.") --end + + if badPlayerEvents[event] then + amount = spellId + end + + amount = amount and tostring(amount) or nil + if event == "SPELL_CAST_SUCCESS" and (not sourceName or (band(sourceFlags, mineOrPartyOrRaid) == 0 and not find(sourceGUID, "Player", nil, true))) then if not compareSuccess then compareSuccess = {} end if not compareSuccess[spellId] then compareSuccess[spellId] = {} end @@ -887,13 +894,15 @@ do if event == "SPELL_DAMAGE" or event == "SPELL_MISSED" then if dmgPrdcCache.spellId then if dmgPrdcCache.count == 1 then - if shouldLogFlags and dmgCache.sourceName ~= "nil" then - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceFlags, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName) + if shouldLogFlags and dmgCache.sourceName ~= "nil" and dmgPrdcCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceFlags, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) + elseif dmgPrdcCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) else currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName) end else - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_PERIODIC_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.count, dmgPrdcCache.spellId, dmgPrdcCache.spellName) + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_PERIODIC_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s Damage#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.count, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) end dmgPrdcCache.spellId = nil end @@ -901,13 +910,15 @@ do if spellId == dmgCache.spellId then if timeStamp - dmgCache.timeStamp > 0.2 then if dmgCache.count == 1 then - if shouldLogFlags and dmgCache.sourceName ~= "nil" then - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceFlags, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName) + if shouldLogFlags and dmgCache.sourceName ~= "nil" and dmgCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceFlags, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) + elseif dmgCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) else currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName) end else - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.count, dmgCache.spellId, dmgCache.spellName) + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s Damage#%s", dmgCache.timeStop, dmgCache.time, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.count, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) end dmgCache.spellId = spellId dmgCache.sourceGUID = sourceGUID @@ -921,19 +932,22 @@ do dmgCache.event = event dmgCache.destGUID = destGUID dmgCache.destName = destName + dmgCache.amount = amount else dmgCache.count = dmgCache.count + 1 end else if dmgCache.spellId then if dmgCache.count == 1 then - if shouldLogFlags and dmgCache.sourceName ~= "nil" then - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceFlags, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName) + if shouldLogFlags and dmgCache.sourceName ~= "nil" and dmgCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceFlags, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) + elseif dmgCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) else currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName) end else - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.count, dmgCache.spellId, dmgCache.spellName) + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s Damage#%s", dmgCache.timeStop, dmgCache.time, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.count, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) end end dmgCache.spellId = spellId @@ -948,17 +962,20 @@ do dmgCache.event = event dmgCache.destGUID = destGUID dmgCache.destName = destName + dmgCache.amount = amount end elseif event == "SPELL_PERIODIC_DAMAGE" or event == "SPELL_PERIODIC_MISSED" then if dmgCache.spellId then if dmgCache.count == 1 then - if shouldLogFlags and dmgCache.sourceName ~= "nil" then - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceFlags, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName) + if shouldLogFlags and dmgCache.sourceName ~= "nil" and dmgCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceFlags, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) + elseif dmgCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) else currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName) end else - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.count, dmgCache.spellId, dmgCache.spellName) + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s Damage#%s", dmgCache.timeStop, dmgCache.time, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.count, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) end dmgCache.spellId = nil end @@ -966,13 +983,15 @@ do if spellId == dmgPrdcCache.spellId then if timeStamp - dmgPrdcCache.timeStamp > 0.2 then if dmgPrdcCache.count == 1 then - if shouldLogFlags and dmgPrdcCache.sourceName ~= "nil" then - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceFlags, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName) + if shouldLogFlags and dmgPrdcCache.sourceName ~= "nil" and dmgPrdcCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceFlags, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) + elseif dmgPrdcCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) else currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName) end else - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_PERIODIC_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.count, dmgPrdcCache.spellId, dmgPrdcCache.spellName) + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_PERIODIC_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s Damage#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.count, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) end dmgPrdcCache.spellId = spellId dmgPrdcCache.sourceGUID = sourceGUID @@ -986,19 +1005,22 @@ do dmgPrdcCache.event = event dmgPrdcCache.destGUID = destGUID dmgPrdcCache.destName = destName + dmgPrdcCache.amount = amount else dmgPrdcCache.count = dmgPrdcCache.count + 1 end else if dmgPrdcCache.spellId then if dmgPrdcCache.count == 1 then - if shouldLogFlags and dmgPrdcCache.sourceName ~= "nil" then - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceFlags, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName) + if shouldLogFlags and dmgPrdcCache.sourceName ~= "nil" and dmgPrdcCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceFlags, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) + elseif dmgPrdcCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) else currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName) end else - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_PERIODIC_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.count, dmgPrdcCache.spellId, dmgPrdcCache.spellName) + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_PERIODIC_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s Damage#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.count, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) end end dmgPrdcCache.spellId = spellId @@ -1013,36 +1035,41 @@ do dmgPrdcCache.event = event dmgPrdcCache.destGUID = destGUID dmgPrdcCache.destName = destName + dmgPrdcCache.amount = amount end else if dmgCache.spellId then if dmgCache.count == 1 then - if shouldLogFlags and dmgCache.sourceName ~= "nil" then - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceFlags, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName) + if shouldLogFlags and dmgCache.sourceName ~= "nil" and dmgCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceFlags, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) + elseif dmgCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) else currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.event, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.destGUID, dmgCache.destName, dmgCache.spellId, dmgCache.spellName) end else - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s", dmgCache.timeStop, dmgCache.time, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.count, dmgCache.spellId, dmgCache.spellName) + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s Damage#%s", dmgCache.timeStop, dmgCache.time, dmgCache.sourceGUID, dmgCache.sourceName, dmgCache.count, dmgCache.spellId, dmgCache.spellName, dmgCache.amount) end dmgCache.spellId = nil elseif dmgPrdcCache.spellId then if dmgPrdcCache.count == 1 then - if shouldLogFlags and dmgPrdcCache.sourceName ~= "nil" then - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceFlags, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName) + if shouldLogFlags and dmgPrdcCache.sourceName ~= "nil" and dmgPrdcCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%s#%d#%s#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceFlags, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) + elseif dmgPrdcCache.amount then + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) else currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] %s#%s#%s#%s#%s#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.event, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.destGUID, dmgPrdcCache.destName, dmgPrdcCache.spellId, dmgPrdcCache.spellName) end else - currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_PERIODIC_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.count, dmgPrdcCache.spellId, dmgPrdcCache.spellName) + currentLog.total[#currentLog.total+1] = format("<%.2f %s> [CLEU] SPELL_PERIODIC_DAMAGE[CONDENSED]#%s#%s#%d Targets#%d#%s Damage#%s", dmgPrdcCache.timeStop, dmgPrdcCache.time, dmgPrdcCache.sourceGUID, dmgPrdcCache.sourceName, dmgPrdcCache.count, dmgPrdcCache.spellId, dmgPrdcCache.spellName, dmgPrdcCache.amount) end dmgPrdcCache.spellId = nil end if shouldLogFlags and sourceName and badPlayerFilteredEvents[event] then - return strjoin("#", tostringall(event, sourceFlags, sourceGUID, sourceName, destGUID, destName, spellId, spellName, extraSpellId, amount)) + return strjoin("#", tostringall(event, sourceFlags, sourceGUID, sourceName, destGUID, destName, spellId, spellName, amount)) else - return strjoin("#", tostringall(event, sourceGUID, sourceName, destGUID, destName, spellId, spellName, extraSpellId, amount)) + return strjoin("#", tostringall(event, sourceGUID, sourceName, destGUID, destName, spellId, spellName, amount)) end end end @@ -1517,6 +1544,7 @@ local wowEvents = { "CHAT_MSG_BG_SYSTEM_HORDE", "CHAT_MSG_BG_SYSTEM_ALLIANCE", "CHAT_MSG_BG_SYSTEM_NEUTRAL", + "CHAT_MSG_SYSTEM", "ARENA_OPPONENT_UPDATE", -- World "UPDATE_WORLD_STATES", @@ -2955,4 +2983,4 @@ function Transcriptor:ClearAll() end end -_G.Transcriptor = Transcriptor \ No newline at end of file +_G.Transcriptor = Transcriptor