From b89febe07695ccb004d09e9ee249baefc9ad5e6e Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 6 Dec 2008 20:48:38 -0600 Subject: *Add bonus to amount for HOT/DOT when aura is added. This will make stackable HOT/DOT gain damage/healing bonus for each stack. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 4e31d0c2b61..c053cfd30e6 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -857,10 +857,21 @@ void Aura::_AddAura() break; } + Unit* caster = GetCaster(); + // not call total regen auras at adding switch (m_modifier.m_auraname) { - case SPELL_AURA_OBS_MOD_HEALTH: + case SPELL_AURA_PERIODIC_DAMAGE: + case SPELL_AURA_PERIODIC_LEECH: + if(caster) + m_modifier.m_amount = caster->SpellDamageBonus(m_target, m_spellProto, m_modifier.m_amount, DOT); + break; + case SPELL_AURA_PERIODIC_HEAL: + if(caster) + m_modifier.m_amount = caster->SpellHealingBonus(m_spellProto, m_modifier.m_amount, DOT, m_target); + break; + case SPELL_AURA_OBS_MOD_HEALTH: //need healing bonus? case SPELL_AURA_OBS_MOD_MANA: m_periodicTimer = m_modifier.periodictime; break; @@ -875,8 +886,6 @@ void Aura::_AddAura() if (getDiminishGroup() != DIMINISHING_NONE ) m_target->ApplyDiminishingAura(getDiminishGroup(),true); - Unit* caster = GetCaster(); - // passive auras (except totem auras) do not get placed in the slots // area auras with SPELL_AURA_NONE are not shown on target if((!m_isPassive || (caster && caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->isTotem())) && @@ -5517,7 +5526,7 @@ void Aura::PeriodicTick() pdamage = pdamageReductedArmor; } - pdamage = pCaster->SpellDamageBonus(m_target,GetSpellProto(),pdamage,DOT); + //pdamage = pCaster->SpellDamageBonus(m_target,GetSpellProto(),pdamage,DOT); // Curse of Agony damage-per-tick calculation if (GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (GetSpellProto()->SpellFamilyFlags & 0x0000000000000400LL) && GetSpellProto()->SpellIconID==544) @@ -5601,7 +5610,7 @@ void Aura::PeriodicTick() pdamage = pdamageReductedArmor; } - pdamage = pCaster->SpellDamageBonus(m_target,GetSpellProto(),pdamage,DOT); + //pdamage = pCaster->SpellDamageBonus(m_target,GetSpellProto(),pdamage,DOT); // talent Soul Siphon add bonus to Drain Life spells if( GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (GetSpellProto()->SpellFamilyFlags & 0x8) ) @@ -5727,7 +5736,7 @@ void Aura::PeriodicTick() else pdamage = amount; - pdamage = pCaster->SpellHealingBonus(GetSpellProto(), pdamage, DOT, m_target); + //pdamage = pCaster->SpellHealingBonus(GetSpellProto(), pdamage, DOT, m_target); sLog.outDetail("PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId()); -- cgit v1.2.3