From 97a9efc07a8445bc784316e8ec95e57d7aaabea1 Mon Sep 17 00:00:00 2001 From: Albea Date: Wed, 29 Mar 2017 12:23:21 +0200 Subject: [PATCH] Fixing a few parser errors --- DPSMate/DPSMate.lua | 2 +- DPSMate/DPSMate_DataBuilder.lua | 4 ++-- DPSMate/Damage/DPSMate_Details_Damage.lua | 2 +- DPSMate/Damage/DPSMate_Details_Damage.xml | 16 ++++++++++++++++ DPSMate_!deDE/DPSMate_ParserDEDE.lua | 2 +- DPSMate_!frFR/DPSMate_ParserFRFR.lua | 8 ++++---- 6 files changed, 25 insertions(+), 9 deletions(-) diff --git a/DPSMate/DPSMate.lua b/DPSMate/DPSMate.lua index 21fe51e..77d8980 100644 --- a/DPSMate/DPSMate.lua +++ b/DPSMate/DPSMate.lua @@ -1,6 +1,6 @@ -- Global Variables DPSMate = {} -DPSMate.VERSION = 108 +DPSMate.VERSION = 109 DPSMate.LOCALE = GetLocale() DPSMate.SYNCVERSION = DPSMate.VERSION..DPSMate.LOCALE DPSMate.Parser = CreateFrame("Frame", nil, UIParent) diff --git a/DPSMate/DPSMate_DataBuilder.lua b/DPSMate/DPSMate_DataBuilder.lua index 9549a26..c80a2dc 100644 --- a/DPSMate/DPSMate_DataBuilder.lua +++ b/DPSMate/DPSMate_DataBuilder.lua @@ -1302,8 +1302,8 @@ function DPSMate.DB:EnemyDamage(mode, arr, Duser, Dname, Dhit, Dcrit, Dmiss, Dpa for cat, val in pairs(tablemodes) do if not arr[cat][cause] then arr[cat][cause] = {} end gen = arr[cat][cause] - if not arr[cat][cause][Duser] then - arr[cat][cause][Duser] = { + if not gen[Duser] then + gen[Duser] = { i = 0, } end diff --git a/DPSMate/Damage/DPSMate_Details_Damage.lua b/DPSMate/Damage/DPSMate_Details_Damage.lua index 4bf2abc..665a139 100644 --- a/DPSMate/Damage/DPSMate_Details_Damage.lua +++ b/DPSMate/Damage/DPSMate_Details_Damage.lua @@ -461,7 +461,7 @@ function DPSMate.Modules.DetailsDamage:SelectDetailsButton(i, comp, cname) local hit, crit, miss, parry, dodge, resist, hitMin, hitMax, critMin, critMax, hitav, critav, glance, glanceMin, glanceMax, glanceav, block, blockMin, blockMax, blockav = path[1], path[5], path[9], path[10], path[11], path[12], path[2], path[3], path[6], path[7], path[4], path[8], path[14], path[15], path[16], path[17], path[18], path[19], path[20], path[21] local total, max = hit+crit+miss+parry+dodge+resist+glance+block, DPSMate:TMax({hit, crit, miss, parry, dodge, resist, glance, block}) - --_G("DPSMate_Details"..comp.."_LogDetails_Casts"):SetText("C: "..path[22]) + _G("DPSMate_Details"..comp.."_LogDetails_Casts"):SetText("C: "..total) -- Block _G("DPSMate_Details"..comp.."_LogDetails_Amount0_Amount"):SetText(block) _G("DPSMate_Details"..comp.."_LogDetails_Amount0_Percent"):SetText(strformat("%.1f", 100*block/total).."%") diff --git a/DPSMate/Damage/DPSMate_Details_Damage.xml b/DPSMate/Damage/DPSMate_Details_Damage.xml index 2c29cc4..f608e0c 100644 --- a/DPSMate/Damage/DPSMate_Details_Damage.xml +++ b/DPSMate/Damage/DPSMate_Details_Damage.xml @@ -450,6 +450,14 @@ + + + + + + + + @@ -1269,6 +1277,14 @@ + + + + + + + + diff --git a/DPSMate_!deDE/DPSMate_ParserDEDE.lua b/DPSMate_!deDE/DPSMate_ParserDEDE.lua index ebe9819..c686333 100644 --- a/DPSMate_!deDE/DPSMate_ParserDEDE.lua +++ b/DPSMate_!deDE/DPSMate_ParserDEDE.lua @@ -447,7 +447,7 @@ if (GetLocale() == "deDE") then return end for a,b,c,d in strgfind(msg, "(.+) trifft Euch mit %'(.+)%' für (%d+)(.*)") do - t = {tnbr(d)} + t = {tnbr(c)} DB:UnregisterPotentialKick(self.player, b, GetTime()) DB:EnemyDamage(false, DPSMateEDD, self.player, b, 1, 0, 0, 0, 0, 0, t[1], a, 0, 0) DB:DamageTaken(self.player, b, 1, 0, 0, 0, 0, 0, t[1], a, 0, 0) diff --git a/DPSMate_!frFR/DPSMate_ParserFRFR.lua b/DPSMate_!frFR/DPSMate_ParserFRFR.lua index daf9a9c..10267a4 100644 --- a/DPSMate_!frFR/DPSMate_ParserFRFR.lua +++ b/DPSMate_!frFR/DPSMate_ParserFRFR.lua @@ -483,13 +483,13 @@ if (GetLocale() == "frFR") then end DPSMate.Parser.CreatureVsSelfSpellDamage = function(self, msg) - for a,b,d,e in strgfind(msg, "(.+) de (.+) vous inflige (%d+) points de dégâts%.(.*)") do -- Potential here to track school and resisted damage + for c,a,d,e in strgfind(msg, "(.+) de (.+) vous inflige (%d+) points de dégâts%.(.*)") do -- Potential here to track school and resisted damage t = {tnbr(d)} - DB:UnregisterPotentialKick(self.player, b, GetTime()) + DB:UnregisterPotentialKick(self.player, c, GetTime()) DB:EnemyDamage(false, DPSMateEDD, self.player, c, 1, 0, 0, 0, 0, 0, t[1], a, 0, 0) DB:DamageTaken(self.player, c, 1, 0, 0, 0, 0, 0, t[1], a, 0, 0) DB:DeathHistory(self.player, a, c, t[1], 1, 0, 0, 0) - if self.FailDT[b] then DB:BuildFail(2, a, self.player, c, t[1]) end + if self.FailDT[c] then DB:BuildFail(2, a, self.player, c, t[1]) end return end for a,b,c,d in strgfind(msg, "(.+) lance (.+) et vous inflige un coup critique %((%d+) points de dégâts%)%.(.*)") do -- Potential here to track school and resisted damage @@ -607,7 +607,7 @@ if (GetLocale() == "frFR") then DB:DeathHistory(c, a, DPSMate.L["AutoAttack"], t[5], t[1] or 1, 0, 0, t[3] or 0) return end - for a,c,d,f,e in strgfind(msg, "(.+) inflige un coup critique à (.+) %((%d+) points de dégâts (.*))%.(.*)") do + for a,c,d,f,e in strgfind(msg, "(.+) inflige un coup critique à (.+) %((%d+) points de dégâts (.*)%)%.(.*)") do t = {false, false, false, false, tnbr(d)} if strfind(e, "écrase") then t[3]=1;t[1]=0;t[2]=0 elseif strfind(e, "érafle") then t[4]=1;t[1]=0;t[2]=0 end DB:EnemyDamage(false, DPSMateEDD, c, DPSMate.L["AutoAttack"], 0, t[2] or 1, 0, 0, 0, 0, t[5], a, t[4] or 0, t[3] or 0)