From 4e03a67045237423d006fda4fdb40d5b36b2acbd Mon Sep 17 00:00:00 2001 From: Ne3x Date: Fri, 23 Nov 2012 19:10:23 -0800 Subject: Core/Spells: Fix Unholy Blight not stacking correctly Note: As of patch 3.2.0: The damage supposed to accumulate similar to Ignite and Deep wounds. Source: http://www.wowwiki.com/Unholy_Blight Closes: #8265 --- src/server/game/Entities/Unit/Unit.cpp | 12 +++++++++--- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 8 -------- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index ab2c07e1925..686b944d967 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7545,12 +7545,18 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // Unholy Blight if (dummySpell->Id == 49194) { + triggered_spell_id = 50536; + SpellInfo const* unholyBlight = sSpellMgr->GetSpellInfo(triggered_spell_id); + if (!unholyBlight) + return false; + basepoints0 = CalculatePct(int32(damage), triggerAmount); - // Glyph of Unholy Blight + + //Glyph of Unholy Blight if (AuraEffect* glyph=GetAuraEffect(63332, 0)) AddPct(basepoints0, glyph->GetAmount()); - - triggered_spell_id = 50536; + + basepoints0 = basepoints0 / (unholyBlight->GetMaxDuration() / unholyBlight->Effects[0].Amplitude); basepoints0 += victim->GetRemainingPeriodicAmount(GetGUID(), triggered_spell_id, SPELL_AURA_PERIODIC_DAMAGE); break; } diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index b29f1498152..10b38b2de65 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -658,14 +658,6 @@ int32 AuraEffect::CalculateAmount(Unit* caster) AddPct(amount, m_spellInfo->Effects[EFFECT_2].CalcValue(caster)); } } - // Unholy Blight damage over time effect - else if (GetId() == 50536) - { - m_canBeRecalculated = false; - // we're getting total damage on aura apply, change it to be damage per tick - amount = int32((float)amount / GetTotalTicks()); - } - break; case SPELL_AURA_PERIODIC_ENERGIZE: switch (m_spellInfo->Id) { -- cgit v1.2.3