From 789f2f8167a168dc7dcc953df4e5737dbebf23f0 Mon Sep 17 00:00:00 2001 From: reeshack Date: Tue, 11 May 2010 22:19:52 +0300 Subject: [PATCH] [9874] Fix auras with custom periodic damage not entering spell/melee bonus damage done methods Signed-off-by: Laise --- src/game/SpellAuras.cpp | 34 +++------------------------------- src/shared/revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index b4cdd908b..54fcb1050 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -4829,11 +4829,8 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real) { // Pounce Bleed if ( m_spellProto->SpellIconID == 147 && m_spellProto->SpellVisual[0] == 0 ) - { // $AP*0.18/6 bonus per tick m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 3 / 100); - return; - } break; } case SPELLFAMILY_WARRIOR: @@ -4851,7 +4848,6 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real) if (m_spellProto->CalculateSimpleValue(EFFECT_INDEX_1) !=0 && m_target->GetHealth() > m_target->GetMaxHealth() * m_spellProto->CalculateSimpleValue(EFFECT_INDEX_1) / 100) m_modifier.m_amount += m_modifier.m_amount * m_spellProto->CalculateSimpleValue(EFFECT_INDEX_2) / 100; - return; } break; } @@ -4859,24 +4855,18 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real) { // Rake if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000001000) && m_spellProto->Effect[EFFECT_INDEX_2] == SPELL_EFFECT_ADD_COMBO_POINTS) - { // $AP*0.18/3 bonus per tick m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100); - return; - } // Lacerate if (m_spellProto->SpellFamilyFlags & UI64LIT(0x000000010000000000)) - { // $AP*0.05/5 bonus per tick m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100); - return; - } // Rip if (m_spellProto->SpellFamilyFlags & UI64LIT(0x000000000000800000)) { // 0.01*$AP*cp if (caster->GetTypeId() != TYPEID_PLAYER) - return; + break; uint8 cp = ((Player*)caster)->GetComboPoints(); @@ -4891,15 +4881,11 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real) } } m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * cp / 100); - return; } // Lock Jaw if (m_spellProto->SpellFamilyFlags & UI64LIT(0x1000000000000000)) - { // 0.15*$AP m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 15 / 100); - return; - } break; } case SPELLFAMILY_ROGUE: @@ -4908,7 +4894,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real) if (m_spellProto->SpellFamilyFlags & UI64LIT(0x000000000000100000)) { if (caster->GetTypeId() != TYPEID_PLAYER) - return; + break; //1 point : ${($m1+$b1*1+0.015*$AP)*4} damage over 8 secs //2 points: ${($m1+$b1*2+0.024*$AP)*5} damage over 10 secs //3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs @@ -4918,40 +4904,27 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real) uint8 cp = ((Player*)caster)->GetComboPoints(); if (cp > 5) cp = 5; m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * AP_per_combo[cp]); - return; } // Garrote if (m_spellProto->SpellFamilyFlags & UI64LIT(0x000000000000000100)) - { // $AP*0.07 bonus per tick m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100); - return; - } // Deadly Poison if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000010000)) - { // 0.12*$AP / 4 * amount of stack m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 3 * GetStackAmount() / 100); - return; - } break; } case SPELLFAMILY_HUNTER: { // Serpent Sting if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000004000)) - { // $RAP*0.2/5 bonus per tick m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.2 / 5); - return; - } // Immolation Trap if ((m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000004)) && m_spellProto->SpellIconID == 678) - { // $RAP*0.1/5 bonus per tick m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500); - return; - } break; } case SPELLFAMILY_PALADIN: @@ -4965,7 +4938,6 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real) if (holy < 0) holy = 0; m_modifier.m_amount += int32(GetStackAmount()) * (int32(ap * 0.025f) + int32(holy * 13 / 1000)); - return; } break; } @@ -8343,4 +8315,4 @@ void Aura::HandleAllowOnlyAbility(bool apply, bool Real) m_target->UpdateDamagePhysical(BASE_ATTACK); m_target->UpdateDamagePhysical(RANGED_ATTACK); m_target->UpdateDamagePhysical(OFF_ATTACK); -} +} \ No newline at end of file diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 24a4aa6a6..d898da509 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9873" + #define REVISION_NR "9874" #endif // __REVISION_NR_H__