From e3cc5eb8595deb44f338e15b736908cea1e3db78 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 6 Sep 2013 02:47:03 +0000 Subject: [PATCH] Fix bug with SpellDamageBuff() information not being applied to DoTs. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1017 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleAura.lua | 2 ++ OvaleCondition.lua | 8 ++++++-- OvaleState.lua | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/OvaleAura.lua b/OvaleAura.lua index a7a63d5..f5338fc 100644 --- a/OvaleAura.lua +++ b/OvaleAura.lua @@ -151,6 +151,8 @@ local function UnitGainedAura(guid, spellId, filter, casterGUID, icon, count, de Ovale:DebugPrintf(OVALE_AURA_DEBUG, " Snapshot stats for %s %s (%s) on %s from %f, now=%f, aura.serial=%d", filter, name, spellId, guid, lastSpellcast.snapshotTime, Ovale.now, aura.serial) OvalePaperDoll:SnapshotStats(aura, Ovale.lastSpellcast) + -- TODO: This isn't correct if lastSpellId doesn't directly apply the DoT. + aura.damageMultiplier = Ovale.lastSpellcast.damageMultiplier end end end diff --git a/OvaleCondition.lua b/OvaleCondition.lua index 836c101..3dd3136 100644 --- a/OvaleCondition.lua +++ b/OvaleCondition.lua @@ -1383,8 +1383,9 @@ OvaleCondition.conditions.damage = function(condition) local sp = OvalePaperDoll.stat.spellBonusDamage local mh = OvalePaperDoll.stat.mainHandWeaponDamage local oh = OvalePaperDoll.stat.offHandWeaponDamage + local bdm = OvalePaperDoll.stat.baseDamageMultiplier local dm = OvaleState:GetDamageMultiplier(spellId) - return 0, nil, OvaleData:GetDamage(spellId, ap, sp, mh, oh, combo) * dm, 0, 0 + return 0, nil, OvaleData:GetDamage(spellId, ap, sp, mh, oh, combo) * bdm * dm, 0, 0 end end @@ -1400,7 +1401,10 @@ end -- Spell(rupture) OvaleCondition.conditions.damagemultiplier = function(condition) - return 0, nil, OvaleState:GetDamageMultiplier(condition[1]), 0, 0 + local spellId = condition[1] + local bdm = OvalePaperDoll.stat.baseDamageMultiplier + local dm = OvaleState:GetDamageMultiplier(spellId) + return 0, nil, bdm * dm, 0, 0 end --- Get the damage taken by the player in the previous time interval. diff --git a/OvaleState.lua b/OvaleState.lua index edba394..f109365 100644 --- a/OvaleState.lua +++ b/OvaleState.lua @@ -656,7 +656,7 @@ function OvaleState:NewAura(guid, spellId, filter) end function OvaleState:GetDamageMultiplier(spellId) - local damageMultiplier = OvalePaperDoll.stat.baseDamageMultiplier + local damageMultiplier = 1 if spellId then local si = OvaleData.spellInfo[spellId] if si and si.damageAura then -- 1.7.9.5