diff options
-rw-r--r-- | src/game/SpellAuras.cpp | 23 | ||||
-rw-r--r-- | src/game/SpellAuras.h | 1 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 6 |
3 files changed, 20 insertions, 10 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 46e0dca47cb..9d477b16406 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -844,7 +844,7 @@ void Aura::_AddAura() // not call total regen auras at adding switch (m_modifier.m_auraname) { - case SPELL_AURA_PERIODIC_DAMAGE: + /*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); @@ -852,8 +852,8 @@ void Aura::_AddAura() 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? + break;*/ + case SPELL_AURA_OBS_MOD_HEALTH: case SPELL_AURA_OBS_MOD_MANA: m_periodicTimer = m_modifier.periodictime; break; @@ -5405,13 +5405,13 @@ void Aura::PeriodicTick() CleanDamage cleanDamage = CleanDamage(0, BASE_ATTACK, MELEE_HIT_NORMAL ); // ignore non positive values (can be result apply spellmods to aura damage - uint32 amount = GetModifierValue() > 0 ? GetModifierValue() : 0; + uint32 amount = GetModifierValuePerStack() > 0 ? GetModifierValuePerStack() : 0; uint32 pdamage; if(m_modifier.m_auraname == SPELL_AURA_PERIODIC_DAMAGE) { - pdamage = amount; + pdamage = pCaster->SpellDamageBonus(m_target,GetSpellProto(),amount,DOT); // Calculate armor mitigation if it is a physical spell // But not for bleed mechanic spells @@ -5445,6 +5445,8 @@ void Aura::PeriodicTick() if (m_target->GetTypeId()==TYPEID_PLAYER) pdamage-=((Player*)m_target)->GetDotDamageReduction(pdamage); + pdamage *= GetStackAmount(); + pCaster->CalcAbsorbResist(m_target, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist); sLog.outDetail("PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", @@ -5497,7 +5499,8 @@ void Aura::PeriodicTick() uint32 resist=0; CleanDamage cleanDamage = CleanDamage(0, BASE_ATTACK, MELEE_HIT_NORMAL ); - uint32 pdamage = m_modifier.m_amount > 0 ? m_modifier.m_amount : 0; + uint32 pdamage = GetModifierValuePerStack() > 0 ? GetModifierValuePerStack() : 0; + pdamage = pCaster->SpellDamageBonus(m_target,GetSpellProto(),pdamage,DOT); //Calculate armor mitigation if it is a physical spell if (GetSpellSchoolMask(GetSpellProto()) & SPELL_SCHOOL_MASK_NORMAL) @@ -5567,6 +5570,8 @@ void Aura::PeriodicTick() if (m_target->GetTypeId()==TYPEID_PLAYER) pdamage-=((Player*)m_target)->GetDotDamageReduction(pdamage); + pdamage *= GetStackAmount(); + pCaster->CalcAbsorbResist(m_target, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist); if(m_target->GetHealth() < pdamage) @@ -5624,14 +5629,16 @@ void Aura::PeriodicTick() return; // ignore non positive values (can be result apply spellmods to aura damage - uint32 amount = GetModifierValue() > 0 ? GetModifierValue() : 0; + uint32 amount = GetModifierValuePerStack() > 0 ? GetModifierValuePerStack() : 0; uint32 pdamage; if(m_modifier.m_auraname==SPELL_AURA_OBS_MOD_HEALTH) pdamage = uint32(m_target->GetMaxHealth() * amount/100); else - pdamage = amount; + pdamage = pCaster->SpellHealingBonus(GetSpellProto(), amount, DOT, m_target); + + pdamage *= GetStackAmount(); //pdamage = pCaster->SpellHealingBonus(GetSpellProto(), pdamage, DOT, m_target); diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index dd74142a511..1e9a8bd8c63 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -215,6 +215,7 @@ class TRINITY_DLL_SPEC Aura void SetModifier(AuraType t, int32 a, uint32 pt, int32 miscValue); Modifier* GetModifier() {return &m_modifier;} + int32 GetModifierValuePerStack() {return m_modifier.m_amount;} int32 GetModifierValue() {return m_modifier.m_amount * m_stackAmount;} int32 GetMiscValue() {return m_spellProto->EffectMiscValue[m_effIndex];} int32 GetMiscBValue() {return m_spellProto->EffectMiscValueB[m_effIndex];} diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 70ec4b47ed4..62605a4f7a7 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2351,10 +2351,12 @@ void Spell::EffectHeal( uint32 /*i*/ ) idx++; } - //int32 tickheal = caster->SpellHealingBonus(targetAura->GetSpellProto(), targetAura->GetModifier()->m_amount, DOT, unitTarget); + int32 tickheal = targetAura->GetModifierValuePerStack(); + if(Unit* auraCaster = targetAura->GetCaster()) + tickheal = auraCaster->SpellHealingBonus(targetAura->GetSpellProto(), tickheal, DOT, unitTarget); //int32 tickheal = targetAura->GetSpellProto()->EffectBasePoints[idx] + 1; //It is said that talent bonus should not be included - int32 tickheal = targetAura->GetModifierValue(); + //int32 tickheal = targetAura->GetModifierValue(); int32 tickcount = GetSpellDuration(targetAura->GetSpellProto()) / targetAura->GetSpellProto()->EffectAmplitude[idx]; addhealth += tickheal * tickcount; unitTarget->RemoveAurasDueToCasterSpell(targetAura->GetId(), targetAura->GetCasterGUID()); |