Skip to content

Commit

Permalink
Fixing a few parser errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tdymel committed Mar 29, 2017
1 parent 26398cf commit 97a9efc
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DPSMate/DPSMate.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions DPSMate/DPSMate_DataBuilder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion DPSMate/Damage/DPSMate_Details_Damage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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).."%")
Expand Down
16 changes: 16 additions & 0 deletions DPSMate/Damage/DPSMate_Details_Damage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,14 @@
</Anchor>
</Anchors>
</FontString>
<FontString name="$parent_Casts" inherits="GameFontNormal" text="C: ">
<Size x="60" y="24" />
<Anchors>
<Anchor point="BOTTOM" relativeTo="$parent_Block" relativePoint="TOP">
<Offset x="0" y="6" />
</Anchor>
</Anchors>
</FontString>
<FontString name="$parent_Glance" inherits="GameFontNormal" text="Glance" justifyH="LEFT">
<Size x="50" y="24" />
<Anchors>
Expand Down Expand Up @@ -1269,6 +1277,14 @@
</Anchor>
</Anchors>
</FontString>
<FontString name="$parent_Casts" inherits="GameFontNormal" text="C: ">
<Size x="60" y="24" />
<Anchors>
<Anchor point="BOTTOM" relativeTo="$parent_Block" relativePoint="TOP">
<Offset x="0" y="6" />
</Anchor>
</Anchors>
</FontString>
<FontString name="$parent_Glance" inherits="GameFontNormal" text="Glance" justifyH="LEFT">
<Size x="50" y="24" />
<Anchors>
Expand Down
2 changes: 1 addition & 1 deletion DPSMate_!deDE/DPSMate_ParserDEDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions DPSMate_!frFR/DPSMate_ParserFRFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 97a9efc

Please sign in to comment.