Skip to content

Commit

Permalink
Fixing recent issues, bump to beta 12
Browse files Browse the repository at this point in the history
  • Loading branch information
Geigerkind committed Dec 4, 2018
1 parent e1be4f0 commit d4e76cd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
5 changes: 5 additions & 0 deletions DPSMate/DPSMate_DataBuilder.lua
Expand Up @@ -1280,6 +1280,11 @@ function DPSMate.DB:DamageTaken(Duser, Dname, Dhit, Dcrit, Dmiss, Dparry, Ddodge
Duser = self:BuildUser(Duser)
cause = self:BuildUser(cause)
Dname = self:BuildAbility(Dname)

if not Duser then
return
end

for cat=1,2 do
gen = DPSDMGTaken[cat]
if not gen[Duser] then gen[Duser] = {i=0} end
Expand Down
3 changes: 3 additions & 0 deletions DPSMate/DPSMate_Parser.lua
Expand Up @@ -528,6 +528,9 @@ local UnitHealthMax = UnitHealthMax
local UnitHealth = UnitHealth
function DPSMate.Parser:GetOverhealByName(amount, target)
local result, unit = 0, self:GetUnitByName(target)
if not amount then
return 0;
end
if unit then result = amount-(UnitHealthMax(unit)-UnitHealth(unit)) end
if result<0 then return 0 else return result end
end
Expand Down
16 changes: 13 additions & 3 deletions DPSMate/enUS/DPSMate_ParserENUS.lua
Expand Up @@ -553,7 +553,7 @@ function DPSMate.Parser:SelfMisses(msg)
end
end

local SSDChoices = {" hits ", " crits ", " was ", " is parried by ", " missed ", " is absorbed by ", "ast ", " failed.", "You interrupt ", " is reflected back "}
local SSDChoices = {" hits ", " crits ", " was ", " is parried by ", " missed ", " is absorbed by ", "ast ", " failed.", "You interrupt ", " is reflected back ", "You perform "}
function DPSMate.Parser:SelfSpellDMG(msg)
local i,j,k = 0,0,6
local nextword, choice, ability;
Expand All @@ -564,6 +564,7 @@ function DPSMate.Parser:SelfSpellDMG(msg)
end
if choice == 8 then return end
if choice == 10 then return end
if choice == 11 then return end

if choice < 3 then
local hit, crit = 0,0
Expand Down Expand Up @@ -1167,7 +1168,7 @@ function DPSMate.Parser:CreatureVsSelfMisses(msg)
return
end

local CVSSDChoices = {" hits ", " crits ", " misses you.", " was parried.", " was dodged.", " was resisted.", "You interrupt ", "You absorb ", " performs ", " fail"}
local CVSSDChoices = {" hits ", " crits ", " misses you.", " was parried.", " was dodged.", " was resisted.", "You interrupt ", "You absorb ", " performs ", " fail", " was resisted by "}
function DPSMate.Parser:CreatureVsSelfSpellDamage(msg)
local i,j,k = 0,0,0
local nextword, choice;
Expand Down Expand Up @@ -1244,7 +1245,7 @@ function DPSMate.Parser:CreatureVsSelfSpellDamage(msg)
DB:Absorb(ability, Player, source)
end
return
else
elseif choice < 11 then
i,j = strfind(msg, " on ", k, true)
if i then
local ability = strsub(msg, k, i-1)
Expand All @@ -1258,6 +1259,15 @@ function DPSMate.Parser:CreatureVsSelfSpellDamage(msg)
return
end
return
else
i,j = strfind(nextword, " 's ", 1, true);
local source = strsub(nextword, 1, i-1);
local ability = strsub(nextword, j+1);
i,j = strfind(msg, ".", k, true);
local target = strsub(msg, k, i-1);
DB:EnemyDamage(false, nil, target, ability, 0, 0, 0, 0, 0, 1, 0, source, 0, 0);
DB:DamageTaken(target, ability, 0, 0, 0, 0, 0, 1, 0, source, 0, 0);
return
end
end

Expand Down

0 comments on commit d4e76cd

Please sign in to comment.