{"action":"created","issue":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14817","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14817/labels{/name}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14817/comments","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14817/events","html_url":"https://github.com/TrinityCore/TrinityCore/issues/14817","id":83097899,"number":14817,"title":"[3.3.5] DoT damage bonus not working","user":{"login":"jackpoz","id":1153754,"avatar_url":"https://avatars.githubusercontent.com/u/1153754?v=3","gravatar_id":"","url":"https://api.github.com/users/jackpoz","html_url":"https://github.com/jackpoz","followers_url":"https://api.github.com/users/jackpoz/followers","following_url":"https://api.github.com/users/jackpoz/following{/other_user}","gists_url":"https://api.github.com/users/jackpoz/gists{/gist_id}","starred_url":"https://api.github.com/users/jackpoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackpoz/subscriptions","organizations_url":"https://api.github.com/users/jackpoz/orgs","repos_url":"https://api.github.com/users/jackpoz/repos","events_url":"https://api.github.com/users/jackpoz/events{/privacy}","received_events_url":"https://api.github.com/users/jackpoz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Branch-3.3.5a","name":"Branch-3.3.5a","color":"188846"},{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Sub-Spells","name":"Sub-Spells","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-31T14:16:08Z","updated_at":"2015-06-01T11:41:33Z","closed_at":null,"body":"Casting Corruption http://wotlk.openwow.com/spell=47813 with Improved Corruption http://wotlk.openwow.com/spell=17814 doesn't add any bonus damage. I used a fresh new lvl80 character with just Corruption rank 10 learnt and Improved Corruption rank 5 on the test dummies at Stormwing (same result with all dummies), doing always 180 dmg per tick\r\n\r\nhttps://github.com/TrinityCore/TrinityCore/commit/03a5d6d0c985cae8c1683e4ad8e8bbd6185fd896#commitcomment-11443669\r\n\r\nMight be related to https://github.com/TrinityCore/TrinityCore/issues/14812"},"comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments/107410482","html_url":"https://github.com/TrinityCore/TrinityCore/issues/14817#issuecomment-107410482","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14817","id":107410482,"user":{"login":"robinsch","id":8017650,"avatar_url":"https://avatars.githubusercontent.com/u/8017650?v=3","gravatar_id":"","url":"https://api.github.com/users/robinsch","html_url":"https://github.com/robinsch","followers_url":"https://api.github.com/users/robinsch/followers","following_url":"https://api.github.com/users/robinsch/following{/other_user}","gists_url":"https://api.github.com/users/robinsch/gists{/gist_id}","starred_url":"https://api.github.com/users/robinsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinsch/subscriptions","organizations_url":"https://api.github.com/users/robinsch/orgs","repos_url":"https://api.github.com/users/robinsch/repos","events_url":"https://api.github.com/users/robinsch/events{/privacy}","received_events_url":"https://api.github.com/users/robinsch/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T11:41:33Z","updated_at":"2015-06-01T11:41:33Z","body":"You are right.\r\n\r\n```diff\r\nFrom 45201199329528c43a010df904a0e3b83f67d41a Mon Sep 17 00:00:00 2001\r\nFrom: robinsch <robin.schriever.hude@web.de>\r\nDate: Mon, 1 Jun 2015 13:41:02 +0200\r\nSubject: [PATCH] #14817\r\n\r\n---\r\n src/server/game/Entities/Unit/Unit.cpp            | 28 +++++++++++++++--------\r\n src/server/game/Spells/Auras/SpellAuraEffects.cpp |  6 +++++\r\n 2 files changed, 24 insertions(+), 10 deletions(-)\r\n\r\ndiff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp\r\nindex 6be3d65..51fa65c 100644\r\n--- a/src/server/game/Entities/Unit/Unit.cpp\r\n+++ b/src/server/game/Entities/Unit/Unit.cpp\r\n@@ -9949,11 +9949,15 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin\r\n         DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod);\r\n     }\r\n \r\n-    // Done Percentage for DOT is already calculated, no need to do it again. The percentage mod is applied in Aura::HandleAuraSpecificMods.\r\n-    float tmpDamage = (int32(pdamage) + DoneTotal) * (damagetype == DOT ? 1.0f : SpellDamagePctDone(victim, spellProto, damagetype));\r\n-    // apply spellmod to Done damage (flat and pct)\r\n-    if (Player* modOwner = GetSpellModOwner())\r\n-        modOwner->ApplySpellMod(spellProto->Id, damagetype == DOT ? SPELLMOD_DOT : SPELLMOD_DAMAGE, tmpDamage);\r\n+    float tmpDamage = 0.0f;\r\n+    // Done Percentage for DOT will be applied in AAuraEffect::HandlePeriodicDamageAurasTick.\r\n+    if (damagetype == SPELL_DIRECT_DAMAGE)\r\n+    {\r\n+        tmpDamage = (int32(pdamage) + DoneTotal) * SpellDamagePctDone(victim, spellProto, damagetype);\r\n+        // apply spellmod to Done damage (flat and pct)\r\n+        if (Player* modOwner = GetSpellModOwner())\r\n+            modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_DAMAGE, tmpDamage);\r\n+    }\r\n \r\n     return uint32(std::max(tmpDamage, 0.0f));\r\n }\r\n@@ -10793,11 +10797,15 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui\r\n             DoneTotal = 0;\r\n     }\r\n \r\n-    // Done Percentage for DOT is already calculated, no need to do it again. The percentage mod is applied in Aura::HandleAuraSpecificMods.\r\n-    float heal = float(int32(healamount) + DoneTotal) * (damagetype == DOT ? 1.0f : SpellHealingPctDone(victim, spellProto));\r\n-    // apply spellmod to Done amount\r\n-    if (Player* modOwner = GetSpellModOwner())\r\n-        modOwner->ApplySpellMod(spellProto->Id, damagetype == DOT ? SPELLMOD_DOT : SPELLMOD_DAMAGE, heal);\r\n+    float heal = 0.0f;\r\n+    // Done Percentage for DOT will be applied in AuraEffect::HandlePeriodicHealAurasTick.\r\n+    if (damagetype == SPELL_DIRECT_DAMAGE)\r\n+    {\r\n+        heal = float(int32(healamount) + DoneTotal) * SpellHealingPctDone(victim, spellProto));\r\n+        // apply spellmod to Done amount\r\n+        if (Player* modOwner = GetSpellModOwner())\r\n+            modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_DAMAGE, heal);\r\n+    }\r\n \r\n     return uint32(std::max(heal, 0.0f));\r\n }\r\ndiff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp\r\nindex 34024d7..62f2558 100644\r\n--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp\r\n+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp\r\n@@ -5840,6 +5840,9 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const\r\n \r\n     if (GetAuraType() == SPELL_AURA_PERIODIC_DAMAGE)\r\n     {\r\n+        if (Player* modOwner = caster->GetSpellModOwner())\r\n+            modOwner->ApplySpellMod(GetSpellInfo()->Id, SPELLMOD_DOT, damage);\r\n+\r\n         if (isAreaAura)\r\n             damage = caster->SpellDamageBonusDone(target, GetSpellInfo(), damage, DOT, GetBase()->GetStackAmount()) * caster->SpellDamagePctDone(target, m_spellInfo, DOT);\r\n         else\r\n@@ -6096,6 +6099,9 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const\r\n     // Script Hook For HandlePeriodicHealAurasTick -- Allow scripts to change the Damage pre class mitigation calculations\r\n     sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage);\r\n \r\n+    if (Player* modOwner = caster->GetSpellModOwner())\r\n+        modOwner->ApplySpellMod(GetSpellInfo()->Id, SPELLMOD_DOT, damage);\r\n+\r\n     if (GetAuraType() == SPELL_AURA_OBS_MOD_HEALTH)\r\n     {\r\n         // Taken mods\r\n-- \r\n1.9.5.msysgit.1\r\n\r\n```"}}